|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avro.ipc.RPCContext
public class RPCContext
This class represents the context of an RPC call or RPC handshake. Designed to provide information to RPC plugin writers, this class encapsulates information about the rpc exchange, including handshake and call metadata. Note: this data includes full copies of the RPC payload, so plugins which store RPCContexts beyond the life of each call should be conscious of memory use.
Field Summary | |
---|---|
protected Exception |
error
|
protected Map<CharSequence,ByteBuffer> |
requestCallMeta
|
protected Object |
response
|
protected Map<CharSequence,ByteBuffer> |
responseCallMeta
|
Constructor Summary | |
---|---|
RPCContext()
|
Method Summary | |
---|---|
Exception |
error()
The exception generated at the server, or null if no such exception has occured |
HandshakeRequest |
getHandshakeRequest()
Get the handshake request of this RPC. |
HandshakeResponse |
getHandshakeResponse()
Get the handshake response of this RPC. |
Protocol.Message |
getMessage()
Returns the Protocol.Message corresponding to this RPC |
List<ByteBuffer> |
getRequestPayload()
Returns the serialized payload of the request in this RPC. |
List<ByteBuffer> |
getResponsePayload()
Returns the serialized payload of the response in this RPC. |
boolean |
isError()
Indicates whether an exception was generated at the server |
Map<CharSequence,ByteBuffer> |
requestCallMeta()
This is an access method for the per-call state provided by the client to the server. |
Map<CharSequence,ByteBuffer> |
requestHandshakeMeta()
This is an access method for the handshake state provided by the client to the server. |
Object |
response()
The response object generated at the server, if it exists. |
Map<CharSequence,ByteBuffer> |
responseCallMeta()
This is an access method for the per-call state provided by the server back to the client. |
Map<CharSequence,ByteBuffer> |
responseHandshakeMeta()
This is an access method for the handshake state provided by the server back to the client |
void |
setHandshakeRequest(HandshakeRequest handshakeRequest)
Set the handshake request of this RPC. |
void |
setHandshakeResponse(HandshakeResponse handshakeResponse)
Set the handshake response of this RPC. |
void |
setMessage(Protocol.Message message)
Sets the Protocol.Message corresponding to this RPC |
void |
setRequestPayload(List<ByteBuffer> payload)
Sets the serialized payload of the request in this RPC. |
void |
setResponsePayload(List<ByteBuffer> payload)
Sets the serialized payload of the response in this RPC. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Map<CharSequence,ByteBuffer> requestCallMeta
protected Map<CharSequence,ByteBuffer> responseCallMeta
protected Object response
protected Exception error
Constructor Detail |
---|
public RPCContext()
Method Detail |
---|
public void setHandshakeRequest(HandshakeRequest handshakeRequest)
public HandshakeRequest getHandshakeRequest()
public void setHandshakeResponse(HandshakeResponse handshakeResponse)
public HandshakeResponse getHandshakeResponse()
public Map<CharSequence,ByteBuffer> requestHandshakeMeta()
public Map<CharSequence,ByteBuffer> responseHandshakeMeta()
public Map<CharSequence,ByteBuffer> requestCallMeta()
public Map<CharSequence,ByteBuffer> responseCallMeta()
public Object response()
public Exception error()
public boolean isError()
public void setMessage(Protocol.Message message)
Protocol.Message
corresponding to this RPC
public Protocol.Message getMessage()
Protocol.Message
corresponding to this RPC
Protocol.Message
public void setRequestPayload(List<ByteBuffer> payload)
public List<ByteBuffer> getRequestPayload()
public List<ByteBuffer> getResponsePayload()
public void setResponsePayload(List<ByteBuffer> payload)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |