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