public final class WebsocketGatewayClientCodec extends Object implements GatewayClientCodec<io.netty.buffer.ByteBuf>
| Constructor and Description |
|---|
WebsocketGatewayClientCodec(io.scalecube.services.transport.api.DataCodec dataCodec)
Constructor for codec which encode/decode client message to/from websocket gateway message
represented by json and transformed in
ByteBuf. |
WebsocketGatewayClientCodec(io.scalecube.services.transport.api.DataCodec dataCodec,
boolean releaseDataOnEncode)
Constructor for codec which encode/decode client message to/from websocket gateway message
represented by json and transformed in
ByteBuf. |
| Modifier and Type | Method and Description |
|---|---|
io.scalecube.services.api.ServiceMessage |
decode(io.netty.buffer.ByteBuf encodedMessage)
Decodes message represented by
T type to ServiceMessage object. |
io.netty.buffer.ByteBuf |
encode(io.scalecube.services.api.ServiceMessage message)
Encodes
ServiceMessage to T type. |
io.scalecube.services.transport.api.DataCodec |
getDataCodec()
Returns codec which is used to decode data object of
ServiceMessage. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdecodeDatapublic WebsocketGatewayClientCodec(io.scalecube.services.transport.api.DataCodec dataCodec)
ByteBuf.dataCodec - data message codec.public WebsocketGatewayClientCodec(io.scalecube.services.transport.api.DataCodec dataCodec,
boolean releaseDataOnEncode)
ByteBuf.dataCodec - data message codec.releaseDataOnEncode - release data on encode flag.public io.scalecube.services.transport.api.DataCodec getDataCodec()
GatewayClientCodecServiceMessage.getDataCodec in interface GatewayClientCodec<io.netty.buffer.ByteBuf>GatewayClientCodec.decodeData(ServiceMessage, Type)public io.netty.buffer.ByteBuf encode(io.scalecube.services.api.ServiceMessage message)
GatewayClientCodecServiceMessage to T type.encode in interface GatewayClientCodec<io.netty.buffer.ByteBuf>message - client message to encodeT typepublic io.scalecube.services.api.ServiceMessage decode(io.netty.buffer.ByteBuf encodedMessage)
GatewayClientCodecT type to ServiceMessage object.decode in interface GatewayClientCodec<io.netty.buffer.ByteBuf>encodedMessage - message to decodeServiceMessage typeCopyright © 2015–2021. All rights reserved.