|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ResponseChannel
An interface for delivering asynchronous RPC method responses.
An instance of this is passed to the
AsynchronousRequestHandler.handleRequest(RpcCall, RpcCallContext, ResponseChannel)
method. When a response is available it may be sent using this class. This makes it
possible to hand work off to application threads, leaving the calling thread
to return to the task of handling HTTP responses.
Method Summary | |
---|---|
void |
close()
Close the channel on which the original RPC method call was received. |
void |
respond(HttpResponseException e)
Deliver an HTTP error response to a remote caller. |
void |
respond(RpcResponse rsp)
Deliver an RPC method response to a remote caller. |
Method Detail |
---|
void respond(RpcResponse rsp) throws java.io.IOException, MarshallingException
rsp
- The response to marshal and send back.
java.io.IOException
- An exception may be raised while attempting to
send the response to the client.
MarshallingException
void respond(HttpResponseException e) throws java.io.IOException
e
- The response to marshal and send back.
java.io.IOException
- An exception may be raised while attempting to
send the response to the client.void close() throws java.io.IOException
Implementations are not required to close this channel under normal operations. Typically closing this channel is only required when an error occurs that may corrupt this channel's state.
java.io.IOException
- An exception may be raised while attempting to close
the underlying channel.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |