|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.tribe.channel.AbstractChannelPool
org.objectweb.tribe.channel.tcp.TcpChannelPool
This class defines a TcpChannelPool
Field Summary |
Fields inherited from class org.objectweb.tribe.channel.AbstractChannelPool |
channels, keyBuffers, serverChannels |
Constructor Summary | |
TcpChannelPool()
Creates a new TcpChannelPool object |
Method Summary | |
AbstractReliableFifoChannel |
getChannel(Address destination)
Get a reliable fifo serverSocket to the given destination. |
static AbstractChannelPool |
getChannelPool()
Returns a static instance of the serverSocket pool. |
AbstractServerChannel |
getServerChannel(Address serverAddress)
Get a server socket on the given address. |
boolean |
removeChannelFromPool(AbstractReliableFifoChannel channel)
Terminates the TCP reader thread as well. |
boolean |
removeServerChannelFromPool(AbstractServerChannel channel)
Terminates the TCP accepter thread as well. |
Methods inherited from class org.objectweb.tribe.channel.AbstractChannelPool |
registerReceiveBuffer, send, unregisterReceiveBuffer |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TcpChannelPool()
TcpChannelPool
object
Method Detail |
public AbstractReliableFifoChannel getChannel(Address destination) throws ChannelException
AbstractChannelPool
If no serverSocket exist, a new one is created else an existing one may be returned.
getChannel
in class AbstractChannelPool
destination
- destination address to reach
ChannelException
- if an error occursorg.objectweb.tribe.serverSocket.pool.AbstractChannelPool#getChannel(org.objectweb.tribe.common.Address)
public AbstractServerChannel getServerChannel(Address serverAddress) throws ChannelException
AbstractChannelPool
If no server Socket exist, a new one is created else an existing one may be returned.
getServerChannel
in class AbstractChannelPool
serverAddress
- server address to bind
ChannelException
- if an error occursAbstractChannelPool.getServerChannel(org.objectweb.tribe.common.Address)
public static AbstractChannelPool getChannelPool()
TcpChannelPool
public boolean removeChannelFromPool(AbstractReliableFifoChannel channel)
removeChannelFromPool
in class AbstractChannelPool
channel
- the channel to remove
AbstractChannelPool.removeChannelFromPool(org.objectweb.tribe.channel.AbstractReliableFifoChannel)
public boolean removeServerChannelFromPool(AbstractServerChannel channel)
removeServerChannelFromPool
in class AbstractChannelPool
channel
- the channel to remove
AbstractChannelPool.removeServerChannelFromPool(org.objectweb.tribe.channel.AbstractServerChannel)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |