public class NettyTCPMessageSender extends Object implements MessageSender.Reliable
Channel
to transmit the message.MessageSender.Fast, MessageSender.Reliable
Modifier and Type | Field and Description |
---|---|
private org.jboss.netty.channel.Channel |
channel |
private static DeliveryGuaranty |
DELIVERY_GUARANTY |
private static org.slf4j.Logger |
LOG |
Constructor and Description |
---|
NettyTCPMessageSender(org.jboss.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. |
org.jboss.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 org.jboss.netty.channel.Channel channel
private static final DeliveryGuaranty DELIVERY_GUARANTY
private static final org.slf4j.Logger LOG
public NettyTCPMessageSender(org.jboss.netty.channel.Channel channel)
public Object sendMessage(Object message)
MessageSender
sendMessage
in interface MessageSender
message
- The message to be sent to client.public DeliveryGuaranty getDeliveryGuaranty()
MessageSender
getDeliveryGuaranty
in interface MessageSender
public org.jboss.netty.channel.Channel getChannel()
public void close()
Events.DISCONNECT
to the client, flushes
all the pending writes and closes the channel.close
in interface MessageSender
Copyright © 2013. All Rights Reserved.