public class NettyUDPMessageSender extends Object implements MessageSender.IFast
Events.CONNECT
event is sent to a Session
MessageSender.IFast, MessageSender.IReliable
Modifier and Type | Field and Description |
---|---|
private org.jboss.netty.channel.socket.DatagramChannel |
channel |
private static DeliveryGuaranty |
DELIVERY_GUARANTY |
private SocketAddress |
remoteAddress |
Constructor and Description |
---|
NettyUDPMessageSender(SocketAddress remoteAddress,
org.jboss.netty.channel.socket.DatagramChannel channel) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Cleanup hook which can be called when a session is disconnected or
closed.
|
org.jboss.netty.channel.socket.DatagramChannel |
getChannel() |
DeliveryGuaranty |
getDeliveryGuaranty()
Returns the delivery guaranty of the implementation.
|
SocketAddress |
getRemoteAddress() |
Object |
sendMessage(Object message)
This method delegates to the underlying native session object to send a
message to the client.
|
String |
toString() |
private final SocketAddress remoteAddress
private final org.jboss.netty.channel.socket.DatagramChannel channel
private static final DeliveryGuaranty DELIVERY_GUARANTY
public NettyUDPMessageSender(SocketAddress remoteAddress, org.jboss.netty.channel.socket.DatagramChannel 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 void close()
MessageSender
close
in interface MessageSender
public SocketAddress getRemoteAddress()
public org.jboss.netty.channel.socket.DatagramChannel getChannel()
Copyright © 2012. All Rights Reserved.