public class SpecificRequestor extends Requestor implements InvocationHandler
Requestor for generated interfaces.Requestor.TransceiverCallback<T>rpcMetaPlugins| Modifier | Constructor and Description |
|---|---|
|
SpecificRequestor(Class<?> iface,
Transceiver transceiver) |
|
SpecificRequestor(Class<?> iface,
Transceiver transceiver,
SpecificData data) |
protected |
SpecificRequestor(Protocol protocol,
Transceiver transceiver) |
|
SpecificRequestor(Protocol protocol,
Transceiver transceiver,
SpecificData data) |
| Modifier and Type | Method and Description |
|---|---|
static <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 |
getRemote(Object proxy)
Return the remote protocol for a proxy.
|
SpecificData |
getSpecificData() |
Object |
invoke(Object proxy,
Method method,
Object[] args) |
Exception |
readError(Schema writer,
Schema reader,
Decoder in)
Reads an error message.
|
Object |
readResponse(Schema writer,
Schema reader,
Decoder in)
Reads a response message.
|
void |
writeRequest(Schema schema,
Object request,
Encoder out)
Writes a request message.
|
addRPCPlugin, getLocal, getRemote, getTransceiver, readError, readResponse, request, requestpublic SpecificRequestor(Class<?> iface, Transceiver transceiver) throws IOException
IOExceptionprotected SpecificRequestor(Protocol protocol, Transceiver transceiver) throws IOException
IOExceptionpublic SpecificRequestor(Class<?> iface, Transceiver transceiver, SpecificData data) throws IOException
IOExceptionpublic SpecificRequestor(Protocol protocol, Transceiver transceiver, SpecificData data) throws IOException
IOExceptionpublic SpecificData getSpecificData()
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
invoke in interface InvocationHandlerThrowableprotected DatumWriter<Object> getDatumWriter(Schema schema)
@Deprecated protected DatumReader<Object> getDatumReader(Schema schema)
protected DatumReader<Object> getDatumReader(Schema writer, Schema reader)
public 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 RequestorIOExceptionpublic static <T> T getClient(Class<T> iface, Transceiver transceiver) throws IOException
IOExceptionpublic static <T> T getClient(Class<T> iface, Transceiver transceiver, SpecificData data) throws IOException
IOExceptionpublic static <T> T getClient(Class<T> iface, SpecificRequestor requestor) throws IOException
IOExceptionpublic static Protocol getRemote(Object proxy) throws IOException
IOExceptionCopyright © 2009–2023 The Apache Software Foundation. All rights reserved.