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