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