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 transciever)
Create a proxy instance whose methods invoke RPCs.
|
static <T> T |
getClient(Class<T> iface,
Transceiver transciever,
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, request
public SpecificRequestor(Class<?> iface, Transceiver transceiver) throws IOException
IOException
protected SpecificRequestor(Protocol protocol, Transceiver transceiver) throws IOException
IOException
public SpecificRequestor(Class<?> iface, Transceiver transceiver, SpecificData data) throws IOException
IOException
public SpecificRequestor(Protocol protocol, Transceiver transceiver, SpecificData data) throws IOException
IOException
public SpecificData getSpecificData()
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
invoke
in interface InvocationHandler
Throwable
protected 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
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
public static <T> T getClient(Class<T> iface, Transceiver transciever) throws IOException
IOException
public static <T> T getClient(Class<T> iface, Transceiver transciever, SpecificData data) throws IOException
IOException
public static <T> T getClient(Class<T> iface, SpecificRequestor requestor) throws IOException
IOException
public static Protocol getRemote(Object proxy) throws IOException
IOException
Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.