org.granite.gravity.udp
Class AbstractUdpChannel

java.lang.Object
  extended by org.granite.gravity.udp.AbstractUdpChannel
All Implemented Interfaces:
UdpChannel
Direct Known Subclasses:
UdpIOChannel, UdpNIOChannel

public abstract class AbstractUdpChannel
extends Object
implements UdpChannel

Author:
Franck WOLFF

Field Summary
protected  InetSocketAddress address
           
protected  UdpChannelFactory channelFactory
           
protected  org.granite.gravity.AbstractChannel gravityChannel
           
 
Fields inherited from interface org.granite.gravity.udp.UdpChannel
MAX_PACKET_SIZE
 
Constructor Summary
AbstractUdpChannel(UdpChannelFactory channelFactory, org.granite.gravity.AbstractChannel gravityChannel, InetSocketAddress address)
           
 
Method Summary
 void close()
           
 org.granite.gravity.AbstractChannel getGravityChannel()
           
 int write(byte[] data)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.granite.gravity.udp.UdpChannel
getClientAddress, getServerPort, write
 

Field Detail

channelFactory

protected UdpChannelFactory channelFactory

gravityChannel

protected org.granite.gravity.AbstractChannel gravityChannel

address

protected InetSocketAddress address
Constructor Detail

AbstractUdpChannel

public AbstractUdpChannel(UdpChannelFactory channelFactory,
                          org.granite.gravity.AbstractChannel gravityChannel,
                          InetSocketAddress address)
Method Detail

getGravityChannel

public org.granite.gravity.AbstractChannel getGravityChannel()
Specified by:
getGravityChannel in interface UdpChannel

write

public int write(byte[] data)
          throws IOException
Specified by:
write in interface UdpChannel
Throws:
IOException

close

public void close()
Specified by:
close in interface UdpChannel