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