Package org.apache.avro.ipc.reflect
Class ReflectRequestor
java.lang.Object
org.apache.avro.ipc.Requestor
org.apache.avro.ipc.specific.SpecificRequestor
org.apache.avro.ipc.reflect.ReflectRequestor
- All Implemented Interfaces:
InvocationHandler
A
Requestor for existing 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
ConstructorsModifierConstructorDescriptionReflectRequestor(Class<?> iface, Transceiver transceiver) ReflectRequestor(Class<?> iface, Transceiver transceiver, ReflectData data) protectedReflectRequestor(Protocol protocol, Transceiver transceiver) ReflectRequestor(Protocol protocol, Transceiver transceiver, ReflectData data) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TgetClient(Class<T> iface, ReflectRequestor rreq) Create a proxy instance whose methods invoke RPCs.static <T> TgetClient(Class<T> iface, Transceiver transceiver) Create a proxy instance whose methods invoke RPCs.static <T> TgetClient(Class<T> iface, Transceiver transceiver, ReflectData reflectData) Create a proxy instance whose methods invoke RPCs.protected DatumReader<Object> getDatumReader(Schema writer, Schema reader) protected DatumWriter<Object> getDatumWriter(Schema schema) Methods inherited from class org.apache.avro.ipc.specific.SpecificRequestor
getClient, getClient, getDatumReader, getRemote, getSpecificData, invoke, readError, readResponse, writeRequestMethods inherited from class org.apache.avro.ipc.Requestor
addRPCPlugin, getLocal, getRemote, getTransceiver, readError, readResponse, request, request
-
Constructor Details
-
ReflectRequestor
- Throws:
IOException
-
ReflectRequestor
- Throws:
IOException
-
ReflectRequestor
public ReflectRequestor(Class<?> iface, Transceiver transceiver, ReflectData data) throws IOException - Throws:
IOException
-
ReflectRequestor
public ReflectRequestor(Protocol protocol, Transceiver transceiver, ReflectData data) throws IOException - Throws:
IOException
-
-
Method Details
-
getReflectData
-
getDatumWriter
- Overrides:
getDatumWriterin classSpecificRequestor
-
getDatumReader
- Overrides:
getDatumReaderin classSpecificRequestor
-
getClient
Create a proxy instance whose methods invoke RPCs.- Throws:
IOException
-
getClient
public static <T> T getClient(Class<T> iface, Transceiver transceiver, ReflectData reflectData) throws IOException Create a proxy instance whose methods invoke RPCs.- Throws:
IOException
-
getClient
Create a proxy instance whose methods invoke RPCs.- Throws:
IOException
-