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
ConstructorsModifierConstructorDescriptionSpecificRequestor(Class<?> iface, Transceiver transceiver) SpecificRequestor(Class<?> iface, Transceiver transceiver, org.apache.avro.specific.SpecificData data) protectedSpecificRequestor(org.apache.avro.Protocol protocol, Transceiver transceiver) SpecificRequestor(org.apache.avro.Protocol protocol, Transceiver transceiver, org.apache.avro.specific.SpecificData data) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TgetClient(Class<T> iface, SpecificRequestor requestor) 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, org.apache.avro.specific.SpecificData data) Create a proxy instance whose methods invoke RPCs.protected org.apache.avro.io.DatumReader<Object> getDatumReader(org.apache.avro.Schema schema) Deprecated.protected org.apache.avro.io.DatumReader<Object> getDatumReader(org.apache.avro.Schema writer, org.apache.avro.Schema reader) protected org.apache.avro.io.DatumWriter<Object> getDatumWriter(org.apache.avro.Schema schema) static org.apache.avro.ProtocolReturn the remote protocol for a proxy.org.apache.avro.specific.SpecificDatareadError(org.apache.avro.Schema writer, org.apache.avro.Schema reader, org.apache.avro.io.Decoder in) Reads an error message.readResponse(org.apache.avro.Schema writer, org.apache.avro.Schema reader, org.apache.avro.io.Decoder in) Reads a response message.voidwriteRequest(org.apache.avro.Schema schema, Object request, org.apache.avro.io.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
protected SpecificRequestor(org.apache.avro.Protocol protocol, Transceiver transceiver) throws IOException - Throws:
IOException
-
SpecificRequestor
public SpecificRequestor(Class<?> iface, Transceiver transceiver, org.apache.avro.specific.SpecificData data) throws IOException - Throws:
IOException
-
SpecificRequestor
public SpecificRequestor(org.apache.avro.Protocol protocol, Transceiver transceiver, org.apache.avro.specific.SpecificData data) throws IOException - Throws:
IOException
-
-
Method Details
-
getSpecificData
public org.apache.avro.specific.SpecificData getSpecificData() -
invoke
- Specified by:
invokein interfaceInvocationHandler- Throws:
Throwable
-
getDatumWriter
-
getDatumReader
@Deprecated protected org.apache.avro.io.DatumReader<Object> getDatumReader(org.apache.avro.Schema schema) Deprecated. -
getDatumReader
protected org.apache.avro.io.DatumReader<Object> getDatumReader(org.apache.avro.Schema writer, org.apache.avro.Schema reader) -
writeRequest
public void writeRequest(org.apache.avro.Schema schema, Object request, org.apache.avro.io.Encoder out) throws IOException Description copied from class:RequestorWrites a request message.- Specified by:
writeRequestin classRequestor- Throws:
IOException
-
readResponse
public Object readResponse(org.apache.avro.Schema writer, org.apache.avro.Schema reader, org.apache.avro.io.Decoder in) throws IOException Description copied from class:RequestorReads a response message.- Specified by:
readResponsein classRequestor- Throws:
IOException
-
readError
public Exception readError(org.apache.avro.Schema writer, org.apache.avro.Schema reader, org.apache.avro.io.Decoder in) throws IOException Description copied from class:RequestorReads an error message.- Specified by:
readErrorin 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, org.apache.avro.specific.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
-