org.jgroups.protocols
Class TCP
- ConnectionTable.ConnectionListener, ConnectionTable.Receiver
TCP based protocol. Creates a server socket, which gives us the local address of this group member. For
each accept() on the server socket, a new thread is created that listens on the socket.
For each outgoing message m, if m.dest is in the ougoing hashtable, the associated socket will be reused
to send message, otherwise a new socket is created and put in the hashtable.
When a socket connection breaks or a member is removed from the group, the corresponding items in the
incoming and outgoing hashtables will be removed as well.
This functionality is in ConnectionTable, which isT used by TCP. TCP sends messages using ct.send() and
registers with the connection table to receive all incoming messages.
down_handler , down_prot , down_queue , down_thread , down_thread_prio , log , observer , props , stack , up_handler , up_prot , up_queue , up_thread , up_thread_prio |
destroy , down , getDownProtocol , getDownQueue , getName , getProperties , getUpProtocol , getUpQueue , handleSpecialDownEvent , init , passDown , passUp , providedDownServices , providedUpServices , receiveDownEvent , receiveUpEvent , requiredDownServices , requiredUpServices , setDownProtocol , setObserver , setProperties , setPropertiesInternal , setProtocolStack , setUpProtocol , start , startDownHandler , startUpHandler , stop , stopInternal , up |
down
public void down(Event evt)
Sent to destination(s) using the ConnectionTable class.
- down in interface Protocol
getConnectionTable
protected ConnectionTable getConnectionTable(long ri,
long cet,
InetAddress b_addr,
int s_port)
throws Exception
ri
- cet
- b_addr
- s_port
-
- ConnectionTable
Sub classes overrides this method to initialize a different version of
ConnectionTable.
setProperties
public boolean setProperties(Properties props)
Setup the Protocol instance acording to the configuration string
- setProperties in interface Protocol
start
public void start()
throws Exception
- start in interface Protocol
startUpHandler
public void startUpHandler()
DON'T REMOVE ! This prevents the up-handler thread to be created, which essentially is superfluous:
messages are received from the network rather than from a layer below.
- startUpHandler in interface Protocol
toString
public String toString()
Copyright B) 2001,2002 www.jgroups.com . All Rights Reserved.