public void onNetworkMessage(NetworkEvent networkEvent)
{
Session session = getSession();
boolean writeable = session.isWriteable();
MessageSender messageSender = null;
if (networkEvent.getDeliveryGuaranty().getGuaranty() == DeliveryGuarantyOptions.FAST
.getGuaranty())
{
messageSender = session.getUdpMessageSender();
}
else
{
messageSender = session.getTcpMessageSender();
}
if (writeable && null != networkEvent)
{
messageSender.sendMessage(networkEvent);
}
}