public class TransactionImpl extends java.lang.Object implements Transaction
Modifier and Type | Class and Description |
---|---|
static interface |
TransactionImpl.ResponseSender |
Constructor and Description |
---|
TransactionImpl(Session session,
Request<?> request,
TransactionImpl.ResponseSender responseSender) |
Modifier and Type | Method and Description |
---|---|
Session |
getSession() |
boolean |
isAsync() |
boolean |
isNotification() |
void |
sendError(int code,
java.lang.String message,
java.lang.String data) |
void |
sendError(ResponseError error) |
void |
sendError(java.lang.Throwable e) |
void |
sendResponse(java.lang.Object result) |
void |
sendResponseObject(Response<? extends java.lang.Object> response) |
void |
sendVoidResponse() |
boolean |
setRespondedIfNot() |
void |
startAsync() |
public TransactionImpl(Session session, Request<?> request, TransactionImpl.ResponseSender responseSender)
public void sendResponse(java.lang.Object result) throws java.io.IOException
sendResponse
in interface Transaction
java.io.IOException
public Session getSession()
getSession
in interface Transaction
public void startAsync()
startAsync
in interface Transaction
public boolean isAsync()
public boolean setRespondedIfNot()
public void sendError(int code, java.lang.String message, java.lang.String data) throws java.io.IOException
sendError
in interface Transaction
java.io.IOException
public void sendError(java.lang.Throwable e) throws java.io.IOException
sendError
in interface Transaction
java.io.IOException
public boolean isNotification()
isNotification
in interface Transaction
public void sendResponseObject(Response<? extends java.lang.Object> response) throws java.io.IOException
sendResponseObject
in interface Transaction
java.io.IOException
public void sendVoidResponse() throws java.io.IOException
sendVoidResponse
in interface Transaction
java.io.IOException
public void sendError(ResponseError error) throws java.io.IOException
sendError
in interface Transaction
java.io.IOException