Top Fields Constructors Methods
io.vertx.core.eventbus.impl.codecs

public Class ClusterSerializableCodec

extends Object
implements MessageCodec<ClusterSerializable, ClusterSerializable>
Class Inheritance
All Implemented Interfaces
io.vertx.core.eventbus.MessageCodec
Imports
io.netty.util.CharsetUtil, io.vertx.core.buffer.Buffer, io.vertx.core.eventbus.MessageCodec, io.vertx.core.eventbus.impl.CodecManager, io.vertx.core.shareddata.impl.ClusterSerializable

Field Summary

Modifier and TypeField and Description
private final CodecManager

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public ClusterSerializable
decodeFromWire(int
the position in the buffer where the message should be read from.
pos
,
Buffer
the buffer to read the message from
buffer
)

Implements io.vertx.core.eventbus.MessageCodec.decodeFromWire.

References Deprecated Buffer and ClusterSerializable are deprecated or reference (maybe indirectly) at least one deprecated element.

Called by Vert.x when a message is decoded from the wire.

public void
encodeToWire(Buffer
the message should be written into this buffer
buffer
,
ClusterSerializable
the message that is being sent
obj
)

Implements io.vertx.core.eventbus.MessageCodec.encodeToWire.

References Deprecated Buffer and ClusterSerializable are deprecated or reference (maybe indirectly) at least one deprecated element.

Called by Vert.x when marshalling a message to the wire.

private static ClassLoader
public String
name()

Implements io.vertx.core.eventbus.MessageCodec.name.

The codec name.

public byte
systemCodecID()

Implements io.vertx.core.eventbus.MessageCodec.systemCodecID.

Used to identify system codecs.

public ClusterSerializable
transform(ClusterSerializable
the sent message
obj
)

Implements io.vertx.core.eventbus.MessageCodec.transform.

References Deprecated ClusterSerializable is deprecated or references (maybe indirectly) at least one deprecated element.

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

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

codecManagerback to summary
private final CodecManager codecManager

Constructor Detail

ClusterSerializableCodecback to summary
public ClusterSerializableCodec(CodecManager codecManager)

Method Detail

decodeFromWireback to summary
public ClusterSerializable decodeFromWire(int pos, Buffer buffer)

Implements io.vertx.core.eventbus.MessageCodec.decodeFromWire.

Doc from io.vertx.core.eventbus.MessageCodec.decodeFromWire.

References Deprecated

Buffer and ClusterSerializable are deprecated or reference (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Called by Vert.x when a message is decoded from the wire.

Parameters
pos:int

the position in the buffer where the message should be read from.

buffer:Buffer

the buffer to read the message from

Returns:ClusterSerializable

the read message

Annotations
@Override
encodeToWireback to summary
public void encodeToWire(Buffer buffer, ClusterSerializable obj)

Implements io.vertx.core.eventbus.MessageCodec.encodeToWire.

Doc from io.vertx.core.eventbus.MessageCodec.encodeToWire.

References Deprecated

Buffer and ClusterSerializable are deprecated or reference (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Called by Vert.x when marshalling a message to the wire.

Parameters
buffer:Buffer

the message should be written into this buffer

obj:ClusterSerializable

the message that is being sent

Annotations
@Override
getClassLoaderback to summary
private static ClassLoader getClassLoader()
nameback to summary
public String name()

Implements io.vertx.core.eventbus.MessageCodec.name.

Doc from io.vertx.core.eventbus.MessageCodec.name.

The codec name. Each codec must have a unique name. This is used to identify a codec when sending a message and for unregistering codecs.

Returns:String

the name

Annotations
@Override
systemCodecIDback to summary
public byte systemCodecID()

Implements io.vertx.core.eventbus.MessageCodec.systemCodecID.

Doc from io.vertx.core.eventbus.MessageCodec.systemCodecID.

Used to identify system codecs. Should always return -1 for a user codec.

Returns:byte

-1 for a user codec.

Annotations
@Override
transformback to summary
public ClusterSerializable transform(ClusterSerializable obj)

Implements io.vertx.core.eventbus.MessageCodec.transform.

Doc from io.vertx.core.eventbus.MessageCodec.transform.

References Deprecated

ClusterSerializable is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

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

Parameters
obj:ClusterSerializable

the sent message

Returns:ClusterSerializable

the transformed message

Annotations
@Override