|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.avro.ipc.Requestor
org.apache.avro.reflect.ReflectRequestor
public class ReflectRequestor
A Requestor for existing interfaces via Java reflection.
| Field Summary | |
|---|---|
protected String |
packageName
|
| Fields inherited from class org.apache.avro.ipc.Requestor |
|---|
rpcMetaPlugins |
| Constructor Summary | |
|---|---|
|
ReflectRequestor(Class<?> iface,
Transceiver transceiver)
|
|
ReflectRequestor(Class<?> iface,
Transceiver transceiver,
ReflectData reflectData)
|
protected |
ReflectRequestor(Protocol protocol,
Transceiver transceiver)
|
protected |
ReflectRequestor(Protocol protocol,
Transceiver transceiver,
ReflectData reflectData)
|
| Method Summary | |
|---|---|
static Object |
getClient(Class<?> iface,
ReflectRequestor rreq)
Create a proxy instance whose methods invoke RPCs. |
static Object |
getClient(Class<?> iface,
Transceiver transciever)
Create a proxy instance whose methods invoke RPCs. |
static Object |
getClient(Class<?> iface,
Transceiver transciever,
ReflectData reflectData)
Create a proxy instance whose methods invoke RPCs. |
protected DatumReader<Object> |
getDatumReader(Schema schema)
|
protected DatumWriter<Object> |
getDatumWriter(Schema schema)
|
Object |
invoke(Object proxy,
Method method,
Object[] args)
|
AvroRemoteException |
readError(Schema schema,
Decoder in)
Reads an error message. |
Object |
readResponse(Schema schema,
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, request |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String packageName
| Constructor Detail |
|---|
public ReflectRequestor(Class<?> iface,
Transceiver transceiver)
throws IOException
IOException
protected ReflectRequestor(Protocol protocol,
Transceiver transceiver)
throws IOException
IOException
public ReflectRequestor(Class<?> iface,
Transceiver transceiver,
ReflectData reflectData)
throws IOException
IOException
protected ReflectRequestor(Protocol protocol,
Transceiver transceiver,
ReflectData reflectData)
throws IOException
IOException| Method Detail |
|---|
public Object invoke(Object proxy,
Method method,
Object[] args)
throws Throwable
invoke in interface InvocationHandlerThrowableprotected DatumWriter<Object> getDatumWriter(Schema schema)
protected DatumReader<Object> getDatumReader(Schema schema)
public void writeRequest(Schema schema,
Object request,
Encoder out)
throws IOException
Requestor
writeRequest in class RequestorIOException
public Object readResponse(Schema schema,
Decoder in)
throws IOException
Requestor
readResponse in class RequestorIOException
public AvroRemoteException readError(Schema schema,
Decoder in)
throws IOException
Requestor
readError in class RequestorIOException
public static Object getClient(Class<?> iface,
Transceiver transciever)
throws IOException
IOException
public static Object getClient(Class<?> iface,
Transceiver transciever,
ReflectData reflectData)
throws IOException
IOException
public static Object getClient(Class<?> iface,
ReflectRequestor rreq)
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||