public abstract class GenericResponder extends Responder
Responder
implementation for generic Java data.rpcMetaPlugins
Constructor and Description |
---|
GenericResponder(Protocol local) |
GenericResponder(Protocol local,
GenericData data) |
Modifier and Type | Method and Description |
---|---|
protected DatumReader<Object> |
getDatumReader(Schema actual,
Schema expected) |
protected DatumWriter<Object> |
getDatumWriter(Schema schema) |
GenericData |
getGenericData() |
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.
|
public GenericResponder(Protocol local)
public GenericResponder(Protocol local, GenericData data)
public GenericData getGenericData()
protected DatumWriter<Object> getDatumWriter(Schema schema)
protected DatumReader<Object> getDatumReader(Schema actual, Schema expected)
public Object readRequest(Schema actual, Schema expected, Decoder in) throws IOException
Responder
readRequest
in class Responder
IOException
public void writeResponse(Schema schema, Object response, Encoder out) throws IOException
Responder
writeResponse
in class Responder
IOException
public void writeError(Schema schema, Object error, Encoder out) throws IOException
Responder
writeError
in class Responder
IOException
Copyright © 2009–2016 The Apache Software Foundation. All rights reserved.