Save This Page
Home » glassfish-v2ur2-b04-src » org.apache » catalina » cluster » [javadoc | source]
org.apache.catalina.cluster
public interface: MembershipService [javadoc | source]

All Known Implementing Classes:
    MockMcastService, McastService

The membership service helps the cluster determine the membership logic in the cluster.
Method from org.apache.catalina.cluster.MembershipService Summary:
addMembershipListener,   findMemberByName,   getLocalMember,   getMembers,   getMembersByName,   getProperties,   removeMembershipListener,   setCatalinaCluster,   setLocalMemberProperties,   setProperties,   start,   start,   stop
Method from org.apache.catalina.cluster.MembershipService Detail:
 public  void addMembershipListener(MembershipListener listener)
    Sets the membership listener, only one listener can be added. If you call this method twice, the last listener will be used.
 public Member findMemberByName(String name)
    Return the member by name
 public Member getLocalMember()
    Returns the member object that defines this member
 public Member[] getMembers()
    Returns a list of all the members in the cluster.
 public String[] getMembersByName()
    Return all members by name
 public Properties getProperties()
    Returns the properties for the configuration used.
 public  void removeMembershipListener()
    removes the membership listener.
 public  void setCatalinaCluster(SimpleTcpCluster cluster)
 public  void setLocalMemberProperties(String listenHost,
    int listenPort)
    Sets the local member properties for broadcasting
 public  void setProperties(Properties properties)
    Sets the properties for the membership service. This must be called before the start() method is called. The properties are implementation specific.
 public  void start() throws Exception
    Starts the membership service. If a membership listeners is added the listener will start to receive membership events. Performs a start level 1 and 2
 public  void start(int level) throws Exception
    Starts the membership service. If a membership listeners is added the listener will start to receive membership events.
 public  void stop()
    Stops the membership service