| Modifier and Type | Field and Description |
|---|---|
Schema<T> |
wrappedSchema |
| Constructor and Description |
|---|
Pipe.Schema(Schema<T> wrappedSchema) |
| Modifier and Type | Method and Description |
|---|---|
String |
getFieldName(int number)
Gets the field name associated with the number.
|
int |
getFieldNumber(String name)
Gets the field number associated with the name.
|
boolean |
isInitialized(Pipe message)
Always returns true since we're just transferring data.
|
void |
mergeFrom(Input input,
Pipe pipe)
Deserializes a message/object from the
input. |
String |
messageFullName()
Returns the full name of the message tied to this schema.
|
String |
messageName()
Returns the simple name of the message tied to this schema.
|
Pipe |
newMessage()
Creates the message/object tied to this schema.
|
protected abstract void |
transfer(Pipe pipe,
Input input,
Output output)
|
Class<Pipe> |
typeClass()
Gets the class of the message.
|
void |
writeTo(Output output,
Pipe pipe)
Serializes a message/object to the
output. |
public String getFieldName(int number)
Schemareturn String.valueOf(number);
getFieldName in interface Schema<Pipe>public int getFieldNumber(String name)
Schemareturn Integer.parseInt(name);
getFieldNumber in interface Schema<Pipe>public boolean isInitialized(Pipe message)
isInitialized in interface Schema<Pipe>public String messageFullName()
SchemamessageFullName in interface Schema<Pipe>public String messageName()
SchemamessageName in interface Schema<Pipe>public Pipe newMessage()
SchemanewMessage in interface Schema<Pipe>public Class<Pipe> typeClass()
Schemapublic final void writeTo(Output output, Pipe pipe) throws IOException
Schemaoutput.writeTo in interface Schema<Pipe>IOExceptionpublic final void mergeFrom(Input input, Pipe pipe) throws IOException
Schemainput.mergeFrom in interface Schema<Pipe>IOExceptionprotected abstract void transfer(Pipe pipe, Input input, Output output) throws IOException
IOExceptionCopyright © 2009–2016. All rights reserved.