| org.apache.catalina.cluster.MembershipService
All known Subclasses: org.apache.catalina.cluster.mcast.McastService,
MembershipService | public interface MembershipService (Code) | | The membership service helps the cluster determine the membership
logic in the cluster.
author: Filip Hanik version: $Revision: 1.5 $, $Date: 2004/05/26 16:31:27 $ |
addMembershipListener | public void addMembershipListener(MembershipListener listener)(Code) | | Sets the membership listener, only one listener can be added.
If you call this method twice, the last listener will be used.
Parameters: listener - The listener |
getLocalMember | public Member getLocalMember()(Code) | | Returns the member object that defines this member
|
getMembers | public Member[] getMembers()(Code) | | Returns a list of all the members in the cluster.
|
removeMembershipListener | public void removeMembershipListener()(Code) | | removes the membership listener.
|
setLocalMemberProperties | public void setLocalMemberProperties(String listenHost, int listenPort)(Code) | | Sets the local member properties for broadcasting
|
setProperties | public void setProperties(java.util.Properties properties)(Code) | | Sets the properties for the membership service. This must be called before
the start() method is called.
The properties are implementation specific.
Parameters: properties - - to be used to configure the membership service. |
start | public void start() throws java.lang.Exception(Code) | | 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
throws: java.lang.Exception - if the service fails to start. |
start | public void start(int level) throws java.lang.Exception(Code) | | Starts the membership service. If a membership listeners is added
the listener will start to receive membership events.
Parameters: level - - level 1 starts listening for members, level 2 starts broad casting the server throws: java.lang.Exception - if the service fails to start. |
stop | public void stop()(Code) | | Stops the membership service
|
|
|