Requestor.TransceiverCallback<T>rpcMetaPlugins| Constructor and Description |
|---|
GenericRequestor(Protocol protocol,
Transceiver transceiver) |
GenericRequestor(Protocol protocol,
Transceiver transceiver,
GenericData data) |
| Modifier and Type | Method and Description |
|---|---|
GenericData |
getGenericData() |
Exception |
readError(Schema writer,
Schema reader,
Decoder in)
Reads an error message.
|
Object |
readResponse(Schema writer,
Schema reader,
Decoder in)
Reads a response message.
|
Object |
request(String messageName,
Object request)
Writes a request message and reads a response or error message.
|
<T> void |
request(String messageName,
Object request,
Callback<T> callback)
Writes a request message and returns the result through a Callback.
|
void |
writeRequest(Schema schema,
Object request,
Encoder out)
Writes a request message.
|
addRPCPlugin, getLocal, getRemote, getTransceiver, readError, readResponsepublic GenericRequestor(Protocol protocol, Transceiver transceiver) throws IOException
IOExceptionpublic GenericRequestor(Protocol protocol, Transceiver transceiver, GenericData data) throws IOException
IOExceptionpublic GenericData getGenericData()
public Object request(String messageName, Object request) throws IOException
Requestorrequest in class RequestorIOExceptionpublic <T> void request(String messageName, Object request, Callback<T> callback) throws IOException
Requestorrequest in class RequestorT - the return type of the message.messageName - the name of the message to invoke.request - the request data to send.callback - the callback which will be invoked when the response is returned
or an error occurs.IOExceptionpublic void writeRequest(Schema schema, Object request, Encoder out) throws IOException
RequestorwriteRequest in class RequestorIOExceptionpublic Object readResponse(Schema writer, Schema reader, Decoder in) throws IOException
RequestorreadResponse in class RequestorIOExceptionpublic Exception readError(Schema writer, Schema reader, Decoder in) throws IOException
RequestorreadError in class RequestorIOExceptionCopyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.