public abstract class AbstractTransaction extends Object implements Transaction
Modifier and Type | Field and Description |
---|---|
protected boolean |
async |
protected Request<?> |
request |
protected Session |
session |
Constructor and Description |
---|
AbstractTransaction(Session session,
Request<?> request) |
Modifier and Type | Method and Description |
---|---|
Session |
getSession() |
protected abstract void |
internalSendResponse(Response<? extends Object> response) |
boolean |
isAsync() |
boolean |
isNotification() |
void |
sendError(int code,
String type,
String data) |
void |
sendError(int code,
String type,
String message,
String data) |
void |
sendError(ResponseError error) |
void |
sendError(Throwable e) |
void |
sendResponse(Object result) |
void |
sendResponseObject(Response<? extends Object> response) |
void |
sendVoidResponse() |
void |
startAsync() |
protected final Session session
protected boolean async
protected final Request<?> request
public Session getSession()
getSession
in interface Transaction
public void startAsync()
startAsync
in interface Transaction
public boolean isAsync()
public void sendResponse(Object result) throws IOException
sendResponse
in interface Transaction
IOException
public void sendError(int code, String type, String data) throws IOException
sendError
in interface Transaction
IOException
public void sendError(int code, String type, String message, String data) throws IOException
sendError
in interface Transaction
IOException
public void sendError(Throwable e) throws IOException
sendError
in interface Transaction
IOException
public void sendVoidResponse() throws IOException
sendVoidResponse
in interface Transaction
IOException
public void sendError(ResponseError error) throws IOException
sendError
in interface Transaction
IOException
public void sendResponseObject(Response<? extends Object> response) throws IOException
sendResponseObject
in interface Transaction
IOException
public boolean isNotification()
isNotification
in interface Transaction
protected abstract void internalSendResponse(Response<? extends Object> response) throws IOException
IOException
Copyright © 2017 Kurento. All rights reserved.