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, readResponse
public GenericRequestor(Protocol protocol, Transceiver transceiver) throws IOException
IOException
public GenericRequestor(Protocol protocol, Transceiver transceiver, GenericData data) throws IOException
IOException
public GenericData getGenericData()
public Object request(String messageName, Object request) throws IOException
Requestor
request
in class Requestor
IOException
public <T> void request(String messageName, Object request, Callback<T> callback) throws IOException
Requestor
request
in class Requestor
T
- 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.IOException
public void writeRequest(Schema schema, Object request, Encoder out) throws IOException
Requestor
writeRequest
in class Requestor
IOException
public Object readResponse(Schema writer, Schema reader, Decoder in) throws IOException
Requestor
readResponse
in class Requestor
IOException
public Exception readError(Schema writer, Schema reader, Decoder in) throws IOException
Requestor
readError
in class Requestor
IOException
Copyright © 2009–2016 The Apache Software Foundation. All rights reserved.