org.apache.avro.ipc.specific
Class SpecificResponder

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

public class SpecificResponder
extends GenericResponder

Responder for generated interfaces.


Field Summary
 
Fields inherited from class org.apache.avro.ipc.Responder
rpcMetaPlugins
 
Constructor Summary
  SpecificResponder(Class iface, Object impl)
           
  SpecificResponder(Protocol protocol, Object impl)
           
protected SpecificResponder(Protocol protocol, Object impl, SpecificData data)
           
 
Method Summary
protected  DatumReader<Object> getDatumReader(Schema actual, Schema expected)
           
protected  DatumWriter<Object> getDatumWriter(Schema schema)
           
 Object respond(Protocol.Message message, Object request)
          Computes the response for a message.
 void writeError(Schema schema, Object error, Encoder out)
          Writes an error message.
 
Methods inherited from class org.apache.avro.ipc.generic.GenericResponder
readRequest, writeResponse
 
Methods inherited from class org.apache.avro.ipc.Responder
addRPCPlugin, getLocal, getRemote, respond, respond
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpecificResponder

public SpecificResponder(Class iface,
                         Object impl)

SpecificResponder

public SpecificResponder(Protocol protocol,
                         Object impl)

SpecificResponder

protected SpecificResponder(Protocol protocol,
                            Object impl,
                            SpecificData data)
Method Detail

getDatumWriter

protected DatumWriter<Object> getDatumWriter(Schema schema)
Overrides:
getDatumWriter in class GenericResponder

getDatumReader

protected DatumReader<Object> getDatumReader(Schema actual,
                                             Schema expected)
Overrides:
getDatumReader in class GenericResponder

writeError

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

Overrides:
writeError in class GenericResponder
Throws:
IOException

respond

public Object respond(Protocol.Message message,
                      Object request)
               throws Exception
Description copied from class: Responder
Computes the response for a message.

Specified by:
respond in class Responder
Throws:
Exception


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