public class NettyTCPMessageSender extends Object implements MessageSender.Reliable
Channel to transmit the message.MessageSender.Fast, MessageSender.Reliable| Modifier and Type | Field and Description |
|---|---|
private io.netty.channel.Channel |
channel |
private static DeliveryGuaranty |
DELIVERY_GUARANTY |
private static org.slf4j.Logger |
LOG |
| Constructor and Description |
|---|
NettyTCPMessageSender(io.netty.channel.Channel channel) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Writes an the
Events.DISCONNECT to the client, flushes
all the pending writes and closes the channel. |
io.netty.channel.Channel |
getChannel() |
DeliveryGuaranty |
getDeliveryGuaranty()
Returns the delivery guaranty of the implementation.
|
Object |
sendMessage(Object message)
This method delegates to the underlying native session object to send a
message to the client.
|
String |
toString() |
private final io.netty.channel.Channel channel
private static final DeliveryGuaranty DELIVERY_GUARANTY
private static final org.slf4j.Logger LOG
public NettyTCPMessageSender(io.netty.channel.Channel channel)
public Object sendMessage(Object message)
MessageSendersendMessage in interface MessageSendermessage - The message to be sent to client.public DeliveryGuaranty getDeliveryGuaranty()
MessageSendergetDeliveryGuaranty in interface MessageSenderpublic io.netty.channel.Channel getChannel()
public void close()
Events.DISCONNECT to the client, flushes
all the pending writes and closes the channel.close in interface MessageSenderCopyright © 2013. All Rights Reserved.