T
- typepublic class RemoteEventCodec<T> extends Object implements Codec<RemoteEvent<T>>
Constructor and Description |
---|
RemoteEventCodec(Codec<T> codec)
Constructs a remote event codec.
|
Modifier and Type | Method and Description |
---|---|
RemoteEvent<T> |
decode(byte[] data)
Decodes a remote event object from the bytes.
|
byte[] |
encode(RemoteEvent<T> obj)
Encodes the remote event object to bytes.
|
public RemoteEventCodec(Codec<T> codec)
codec
- the codec for the eventpublic byte[] encode(RemoteEvent<T> obj)
encode
in interface Encoder<RemoteEvent<T>>
obj
- the remote event objectpublic RemoteEvent<T> decode(byte[] data)
decode
in interface Decoder<RemoteEvent<T>>
data
- the byte arrayCopyright © 2017 The Apache Software Foundation. All rights reserved.