Package org.apache.avro.ipc.specific
Class SpecificRequestor
java.lang.Object
org.apache.avro.ipc.Requestor
org.apache.avro.ipc.specific.SpecificRequestor
- All Implemented Interfaces:
InvocationHandler
- Direct Known Subclasses:
ReflectRequestor
Requestor
for generated interfaces.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.avro.ipc.Requestor
Requestor.TransceiverCallback<T>
-
Field Summary
Fields inherited from class org.apache.avro.ipc.Requestor
rpcMetaPlugins
-
Constructor Summary
ModifierConstructorDescriptionSpecificRequestor
(Class<?> iface, Transceiver transceiver) SpecificRequestor
(Class<?> iface, Transceiver transceiver, SpecificData data) protected
SpecificRequestor
(Protocol protocol, Transceiver transceiver) SpecificRequestor
(Protocol protocol, Transceiver transceiver, SpecificData data) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
getClient
(Class<T> iface, SpecificRequestor requestor) Create a proxy instance whose methods invoke RPCs.static <T> T
getClient
(Class<T> iface, Transceiver transceiver) Create a proxy instance whose methods invoke RPCs.static <T> T
getClient
(Class<T> iface, Transceiver transceiver, SpecificData data) Create a proxy instance whose methods invoke RPCs.protected DatumReader
<Object> getDatumReader
(Schema schema) Deprecated.protected DatumReader
<Object> getDatumReader
(Schema writer, Schema reader) protected DatumWriter
<Object> getDatumWriter
(Schema schema) static Protocol
Return the remote protocol for a proxy.Reads an error message.readResponse
(Schema writer, Schema reader, Decoder in) Reads a response message.void
writeRequest
(Schema schema, Object request, Encoder out) Writes a request message.Methods inherited from class org.apache.avro.ipc.Requestor
addRPCPlugin, getLocal, getRemote, getTransceiver, readError, readResponse, request, request
-
Constructor Details
-
SpecificRequestor
- Throws:
IOException
-
SpecificRequestor
- Throws:
IOException
-
SpecificRequestor
public SpecificRequestor(Class<?> iface, Transceiver transceiver, SpecificData data) throws IOException - Throws:
IOException
-
SpecificRequestor
public SpecificRequestor(Protocol protocol, Transceiver transceiver, SpecificData data) throws IOException - Throws:
IOException
-
-
Method Details
-
getSpecificData
-
invoke
- Specified by:
invoke
in interfaceInvocationHandler
- Throws:
Throwable
-
getDatumWriter
-
getDatumReader
Deprecated. -
getDatumReader
-
writeRequest
Description copied from class:Requestor
Writes a request message.- Specified by:
writeRequest
in classRequestor
- Throws:
IOException
-
readResponse
Description copied from class:Requestor
Reads a response message.- Specified by:
readResponse
in classRequestor
- Throws:
IOException
-
readError
Description copied from class:Requestor
Reads an error message.- Specified by:
readError
in classRequestor
- Throws:
IOException
-
getClient
Create a proxy instance whose methods invoke RPCs.- Throws:
IOException
-
getClient
public static <T> T getClient(Class<T> iface, Transceiver transceiver, SpecificData data) throws IOException Create a proxy instance whose methods invoke RPCs.- Throws:
IOException
-
getClient
Create a proxy instance whose methods invoke RPCs.- Throws:
IOException
-
getRemote
Return the remote protocol for a proxy.- Throws:
IOException
-