Save This Page
Home » apache-tomcat-6.0.16-src » org.apache » catalina » cluster » mcast » [javadoc | source]
org.apache.catalina.cluster.mcast
public class: McastService [javadoc | source]
java.lang.Object
   org.apache.catalina.cluster.mcast.McastService

All Implemented Interfaces:
    MembershipService, MembershipListener

Direct Known Subclasses:
    MockMcastService

A membership implementation using simple multicast. This is the representation of a multicast membership service. This class is responsible for maintaining a list of active cluster nodes in the cluster. If a node fails to send out a heartbeat, the node will be dismissed. FIXME i18n messages
Field Summary
protected  StringManager sm    The string manager for this package. 
protected  Properties properties    The implementation specific properties 
protected  McastServiceImpl impl    A handle to the actual low level implementation 
protected  MembershipListener listener    A membership listener delegate (should be the cluster :) 
protected  McastMember localMember    The local member 
Constructor:
 public McastService() 
Method from org.apache.catalina.cluster.mcast.McastService Summary:
addMembershipListener,   findMemberByName,   getCatalinaCluster,   getInfo,   getLocalMember,   getLocalMemberName,   getMcastAddr,   getMcastBindAddress,   getMcastClusterDomain,   getMcastDropTime,   getMcastFrequency,   getMcastPort,   getMcastSoTimeout,   getMcastTTL,   getMembers,   getMembersByName,   getObjectName,   getProperties,   hasProperty,   initMBeans,   main,   memberAdded,   memberDisappeared,   registerMBean,   removeMembershipListener,   setCatalinaCluster,   setLocalMemberProperties,   setMcastAddr,   setMcastBindAddress,   setMcastClusterDomain,   setMcastDropTime,   setMcastFrequency,   setMcastPort,   setMcastSoTimeout,   setMcastTTL,   setObjectName,   setProperties,   start,   start,   stop,   unregisterMBean
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.catalina.cluster.mcast.McastService Detail:
 public  void addMembershipListener(MembershipListener listener) 
    Add a membership listener, this version only supports one listener per service, so calling this method twice will result in only the second listener being active.
 public Member findMemberByName(String name) 
    Return the member by name
 public Cluster getCatalinaCluster() 
    Return the cluster for this membership service
 public String getInfo() 
    Return descriptive information about this implementation and the corresponding version number, in the format <description>/<version>.
 public Member getLocalMember() 
    Return the local member
 public String getLocalMemberName() 
    Return the local member name
 public String getMcastAddr() 
 public String getMcastBindAddress() 
 public String getMcastClusterDomain() 
 public long getMcastDropTime() 
 public long getMcastFrequency() 
 public int getMcastPort() 
 public int getMcastSoTimeout() 
 public int getMcastTTL() 
 public Member[] getMembers() 
    Return all the members
 public String[] getMembersByName() 
    Return all the members by name
 public ObjectName getObjectName() 
 public Properties getProperties() 
    Return the properties, see setProperties
 protected  void hasProperty(Properties properties,
    String name) 
    Check if a required property is available.
 protected  void initMBeans() throws Exception 
    register mbean descriptor for package mcast
 public static  void main(String[] args) throws Exception 
    Simple test program
 public  void memberAdded(Member member) 
 public  void memberDisappeared(Member member) 
    Callback from the impl when a new member has been received
 protected  void registerMBean() 
    register MBeans for Membership
 public  void removeMembershipListener() 
    Remove the membership listener
 public  void setCatalinaCluster(SimpleTcpCluster cluster) 
 public  void setLocalMemberProperties(String listenHost,
    int listenPort) 
    Sets the local member properties for broadcasting
 public  void setMcastAddr(String addr) 
 public  void setMcastBindAddress(String bindaddr) 
 public  void setMcastClusterDomain(String clusterDomain) 
 public  void setMcastDropTime(long time) 
 public  void setMcastFrequency(long time) 
 public  void setMcastPort(int port) 
 public  void setMcastSoTimeout(int mcastSoTimeout) 
 public  void setMcastTTL(int mcastTTL) 
 public  void setObjectName(ObjectName name) 
    Transmitter ObjectName
 public  void setProperties(Properties properties) 
 public  void start() throws Exception 
    Start broadcasting and listening to membership pings
 public  void start(int level) throws Exception 
 public  void stop() 
    Stop broadcasting and listening to membership pings
 protected  void unregisterMBean() 
    unregister MBeans for Membership