public class ShortMessageCodec extends Object implements MessageCodec<Short,Short>
Constructor and Description |
---|
ShortMessageCodec() |
Modifier and Type | Method and Description |
---|---|
Short |
decodeFromWire(int pos,
Buffer buffer)
Called by Vert.x when a message is decoded from the wire.
|
void |
encodeToWire(Buffer buffer,
Short s)
Called by Vert.x when marshalling a message to the wire.
|
String |
name()
The codec name.
|
byte |
systemCodecID()
Used to identify system codecs.
|
Short |
transform(Short s)
If a message is sent locally across the event bus, this method is called to transform the message from
the sent type S to the received type R
|
public void encodeToWire(Buffer buffer, Short s)
MessageCodec
encodeToWire
in interface MessageCodec<Short,Short>
buffer
- the message should be written into this buffers
- the message that is being sentpublic Short decodeFromWire(int pos, Buffer buffer)
MessageCodec
decodeFromWire
in interface MessageCodec<Short,Short>
pos
- the position in the buffer where the message should be read from.buffer
- the buffer to read the message frompublic Short transform(Short s)
MessageCodec
transform
in interface MessageCodec<Short,Short>
s
- the sent messagepublic String name()
MessageCodec
name
in interface MessageCodec<Short,Short>
public byte systemCodecID()
MessageCodec
systemCodecID
in interface MessageCodec<Short,Short>
Copyright © 2015. All Rights Reserved.