public class ByteMessageCodec extends Object implements MessageCodec<Byte,Byte>
| Constructor and Description |
|---|
ByteMessageCodec() |
| Modifier and Type | Method and Description |
|---|---|
Byte |
decodeFromWire(int pos,
Buffer buffer)
Called by Vert.x when a message is decoded from the wire.
|
void |
encodeToWire(Buffer buffer,
Byte b)
Called by Vert.x when marshalling a message to the wire.
|
String |
name()
The codec name.
|
byte |
systemCodecID()
Used to identify system codecs.
|
Byte |
transform(Byte b)
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, Byte b)
MessageCodecencodeToWire in interface MessageCodec<Byte,Byte>buffer - the message should be written into this bufferb - the message that is being sentpublic Byte decodeFromWire(int pos, Buffer buffer)
MessageCodecdecodeFromWire in interface MessageCodec<Byte,Byte>pos - the position in the buffer where the message should be read from.buffer - the buffer to read the message frompublic Byte transform(Byte b)
MessageCodectransform in interface MessageCodec<Byte,Byte>b - the sent messagepublic String name()
MessageCodecname in interface MessageCodec<Byte,Byte>public byte systemCodecID()
MessageCodecsystemCodecID in interface MessageCodec<Byte,Byte>Copyright © 2020. All rights reserved.