|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.tribe.channel.AbstractChannelPool
This class defines a AbstractChannelPool
Field Summary | |
protected java.util.HashMap |
channels
|
protected java.util.HashMap |
keyBuffers
|
protected java.util.HashMap |
serverChannels
|
Constructor Summary | |
AbstractChannelPool()
Creates a new AbstractChannelPool object |
Method Summary | |
abstract AbstractReliableFifoChannel |
getChannel(Address destination)
Get a reliable fifo serverSocket to the given destination. |
abstract AbstractServerChannel |
getServerChannel(Address serverAddress)
Get a server socket on the given address. |
void |
registerReceiveBuffer(ReceiveBuffer buffer)
Register a new receive buffer (which includes the group identifier the client is interested in). |
boolean |
removeChannelFromPool(AbstractReliableFifoChannel channel)
Removed the specified channel from the pool. |
boolean |
removeServerChannelFromPool(AbstractServerChannel channel)
Removed the specified channel from the pool. |
java.util.ArrayList |
send(ChannelMessage msg,
java.util.ArrayList members)
Sends a message to the given list of recipients. |
boolean |
unregisterReceiveBuffer(ReceiveBuffer buffer)
Unregister a receive buffer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.HashMap channels
protected java.util.HashMap serverChannels
protected java.util.HashMap keyBuffers
Constructor Detail |
public AbstractChannelPool()
AbstractChannelPool
object
Method Detail |
public abstract AbstractReliableFifoChannel getChannel(Address destination) throws ChannelException
If no serverSocket exist, a new one is created else an existing one may be returned.
destination
- destination address to reach
ChannelException
- if an error occurspublic boolean removeChannelFromPool(AbstractReliableFifoChannel channel)
channel
- the channel to remove
public abstract AbstractServerChannel getServerChannel(Address serverAddress) throws ChannelException
If no server Socket exist, a new one is created else an existing one may be returned.
serverAddress
- server address to bind
ChannelException
- if an error occurspublic boolean removeServerChannelFromPool(AbstractServerChannel channel)
channel
- the channel to remove
public void registerReceiveBuffer(ReceiveBuffer buffer)
buffer
- ReceiveBuffer to registerpublic boolean unregisterReceiveBuffer(ReceiveBuffer buffer)
buffer
- ReceiveBuffer to unregister
public java.util.ArrayList send(ChannelMessage msg, java.util.ArrayList members)
msg
- message to sendmembers
- list of destination members
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |