org.jgroups.stack
Class GossipServer

java.lang.Object
  extended byorg.jgroups.stack.GossipServer

Deprecated. Use GossipRouter instead

public class GossipServer
extends java.lang.Object

Maintains a cache of member addresses for each group. There are essentially 2 functions: get the members for a given group and register a new member for a given group. Clients have to periodically renew their registrations (like in JINI leasing), otherwise the cache will be cleaned periodically (oldest entries first).

The server should be running at a well-known port. This can be done by for example adding an entry to /etc/inetd.conf on UNIX systems, e.g. gossipsrv stream tcp nowait root /bin/start-gossip-server. gossipsrv has to be defined in /etc/services and start-gossip-server is a script which starts the GossipServer at the well-known port (define in /etc/services). The protocol between GossipServer and GossipClient consists of REGISTER_REQ, GET_MEMBERS_REQ and GET_MEMBERS_RSP protocol data units.

The server does not spawn a thread/request, but does all of its processing on the main thread. This should not be a problem as all requests are short-lived. However, the server would essentially cease processing requests if a telnet connected to it.

Requires JDK >= 1.3 due to the use of Timer

Author:
Bela Ban Oct 4 2001

Field Summary
protected  org.apache.commons.logging.Log log
          Deprecated.  
 
Constructor Summary
GossipServer(int port)
          Deprecated.  
GossipServer(int port, long expiry_time)
          Deprecated.  
GossipServer(int port, long expiry_time, java.net.InetAddress bind_address)
          Deprecated.  
 
Method Summary
static void main(java.lang.String[] args)
          Deprecated.  
 void run()
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected final org.apache.commons.logging.Log log
Deprecated. 
Constructor Detail

GossipServer

public GossipServer(int port)
             throws java.lang.Exception
Deprecated. 

GossipServer

public GossipServer(int port,
                    long expiry_time)
             throws java.lang.Exception
Deprecated. 

GossipServer

public GossipServer(int port,
                    long expiry_time,
                    java.net.InetAddress bind_address)
             throws java.lang.Exception
Deprecated. 
Method Detail

run

public void run()
Deprecated. 

main

public static void main(java.lang.String[] args)
                 throws java.net.UnknownHostException
Deprecated. 
Throws:
java.net.UnknownHostException


Copyright ? 1998-2005 Bela Ban. All Rights Reserved.