org.apache.avro.ipc.generic
Class GenericResponder

java.lang.Object
  extended by org.apache.avro.ipc.Responder
      extended by org.apache.avro.ipc.generic.GenericResponder
Direct Known Subclasses:
SpecificResponder

public abstract class GenericResponder
extends Responder

Responder implementation for generic Java data.


Field Summary
 
Fields inherited from class org.apache.avro.ipc.Responder
rpcMetaPlugins
 
Constructor Summary
GenericResponder(Protocol local)
           
 
Method Summary
protected  DatumReader<Object> getDatumReader(Schema actual, Schema expected)
           
protected  DatumWriter<Object> getDatumWriter(Schema schema)
           
 Object readRequest(Schema actual, Schema expected, Decoder in)
          Reads a request message.
 void writeError(Schema schema, Object error, Encoder out)
          Writes an error message.
 void writeResponse(Schema schema, Object response, Encoder out)
          Writes a response message.
 
Methods inherited from class org.apache.avro.ipc.Responder
addRPCPlugin, getLocal, getRemote, respond, respond, respond
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericResponder

public GenericResponder(Protocol local)
Method Detail

getDatumWriter

protected DatumWriter<Object> getDatumWriter(Schema schema)

getDatumReader

protected DatumReader<Object> getDatumReader(Schema actual,
                                             Schema expected)

readRequest

public Object readRequest(Schema actual,
                          Schema expected,
                          Decoder in)
                   throws IOException
Description copied from class: Responder
Reads a request message.

Specified by:
readRequest in class Responder
Throws:
IOException

writeResponse

public void writeResponse(Schema schema,
                          Object response,
                          Encoder out)
                   throws IOException
Description copied from class: Responder
Writes a response message.

Specified by:
writeResponse in class Responder
Throws:
IOException

writeError

public void writeError(Schema schema,
                       Object error,
                       Encoder out)
                throws IOException
Description copied from class: Responder
Writes an error message.

Specified by:
writeError in class Responder
Throws:
IOException


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.