org.apache.avro.reflect
Class ReflectResponder
java.lang.Object
org.apache.avro.ipc.Responder
org.apache.avro.reflect.ReflectResponder
- Direct Known Subclasses:
- SpecificResponder
public class ReflectResponder
- extends Responder
Responder
for existing interfaces via Java reflection.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
packageName
protected String packageName
ReflectResponder
public ReflectResponder(Class iface,
Object impl)
ReflectResponder
public ReflectResponder(Class iface,
Object impl,
ReflectData reflectData)
getDatumWriter
protected DatumWriter<Object> getDatumWriter(Schema schema)
getDatumReader
protected DatumReader<Object> getDatumReader(Schema schema)
readRequest
public Object readRequest(Schema schema,
Decoder in)
throws IOException
- Reads a request message.
- Specified by:
readRequest
in class Responder
- Throws:
IOException
writeResponse
public void writeResponse(Schema schema,
Object response,
Encoder out)
throws IOException
- Writes a response message.
- Specified by:
writeResponse
in class Responder
- Throws:
IOException
writeError
public void writeError(Schema schema,
AvroRemoteException error,
Encoder out)
throws IOException
- Writes an error message.
- Specified by:
writeError
in class Responder
- Throws:
IOException
respond
public Object respond(Protocol.Message message,
Object request)
throws AvroRemoteException
- Description copied from class:
Responder
- Computes the response for a message.
- Specified by:
respond
in class Responder
- Throws:
AvroRemoteException
Copyright © 2009 The Apache Software Foundation