org.apache.catalina.cluster
クラス StandardCluster

java.lang.Object
  |
  +--org.apache.catalina.cluster.StandardCluster
すべての実装インタフェース:
Cluster, Lifecycle, java.lang.Runnable

public final class StandardCluster
extends java.lang.Object
implements Cluster, Lifecycle, java.lang.Runnable

A Cluster implementation. Responsible for setting up a cluster and provides callers with a valid multicast receiver/sender.

バージョン:
$Revision: 1.4 $, $Date: 2001/07/22 20:25:06 $
作成者:
Bip Thelin

インタフェース org.apache.catalina.Lifecycle から継承したフィールド
START_EVENT, STOP_EVENT
 
コンストラクタの概要
StandardCluster()
           
 
メソッドの概要
 void addLifecycleListener(LifecycleListener listener)
          Add a lifecycle event listener to this component.
 int getCheckInterval()
          Get the time in seconds this Cluster sleeps
 java.lang.String getClusterName()
          Return the name of the cluster that this Server is currently configured to operate within.
 ClusterReceiver getClusterReceiver(java.lang.String senderId)
          Returns a ClusterReceiver which is the interface to use when receiving information in the Cluster. senderId is used as a indentifier, only information send through the ClusterSender with the same senderId can be received.
 ClusterSender getClusterSender(java.lang.String senderId)
          Returns a ClusterSender which is the interface to use when sending information in the Cluster. senderId is used as a identifier so that information sent through this instance can only be used with the respectice ClusterReceiver
 Container getContainer()
          Get the Container associated with our Cluster
 int getDebug()
          Get the debug level for this component
 java.lang.String getInfo()
          Return descriptive information about this Cluster implementation and the corresponding version number, in the format <description>/<version>.
 ClusterMemberInfo getLocalClusterMember()
          Return cluster information about the local host
 java.net.InetAddress getMulticastAddress()
          Get the Groupaddress associated with our Cluster
 int getMulticastPort()
          Get the Port associated with our Cluster
protected  java.lang.String getName()
          Return a String containing the name of this Cluster implementation, used for logging
 ClusterMemberInfo[] getRemoteClusterMembers()
          Returns a collection containing ClusterMemberInfo on the remote members of this Cluster.
protected  void log(java.lang.String message)
          Log a message on the Logger associated with our Container (if any).
 void removeLifecycleListener(LifecycleListener listener)
          Remove a lifecycle event listener from this component.
 void run()
          The background thread.
 void setCheckInterval(int checkInterval)
          Set the time in seconds for this component to Sleep before it checks for new received data in the Cluster
 void setClusterName(java.lang.String clusterName)
          Set the name of the cluster to join, if no cluster with this name is present create one.
 void setContainer(Container container)
          Set the Container associated with our Cluster
 void setDebug(int debug)
          Set the debug level for this component
 void setMulticastAddress(java.lang.String multicastAddress)
          Set the Groupaddress associated with our Cluster
 void setMulticastPort(int multicastPort)
          Set the Port associated with our Cluster
 void start()
          Prepare for the beginning of active use of the public methods of this component.
 void stop()
          Gracefully terminate the active use of the public methods of this component.
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

StandardCluster

public StandardCluster()
メソッドの詳細

getInfo

public java.lang.String getInfo()
Return descriptive information about this Cluster implementation and the corresponding version number, in the format <description>/<version>.
定義:
インタフェース Cluster 内の getInfo

getName

protected java.lang.String getName()
Return a String containing the name of this Cluster implementation, used for logging
戻り値:
The Cluster implementation

setDebug

public void setDebug(int debug)
Set the debug level for this component
定義:
インタフェース Cluster 内の setDebug
パラメータ:
debug - The debug level

getDebug

public int getDebug()
Get the debug level for this component
定義:
インタフェース Cluster 内の getDebug
戻り値:
The debug level

setClusterName

public void setClusterName(java.lang.String clusterName)
Set the name of the cluster to join, if no cluster with this name is present create one.
定義:
インタフェース Cluster 内の setClusterName
パラメータ:
clusterName - The clustername to join

getClusterName

public java.lang.String getClusterName()
Return the name of the cluster that this Server is currently configured to operate within.
定義:
インタフェース Cluster 内の getClusterName
戻り値:
The name of the cluster associated with this server

setContainer

public void setContainer(Container container)
Set the Container associated with our Cluster
定義:
インタフェース Cluster 内の setContainer
パラメータ:
container - The Container to use

getContainer

public Container getContainer()
Get the Container associated with our Cluster
定義:
インタフェース Cluster 内の getContainer
戻り値:
The Container associated with our Cluster

setMulticastPort

public void setMulticastPort(int multicastPort)
Set the Port associated with our Cluster
パラメータ:
port - The Port to use

getMulticastPort

public int getMulticastPort()
Get the Port associated with our Cluster
戻り値:
The Port associated with our Cluster

setMulticastAddress

public void setMulticastAddress(java.lang.String multicastAddress)
Set the Groupaddress associated with our Cluster
パラメータ:
port - The Groupaddress to use

getMulticastAddress

public java.net.InetAddress getMulticastAddress()
Get the Groupaddress associated with our Cluster
戻り値:
The Groupaddress associated with our Cluster

setCheckInterval

public void setCheckInterval(int checkInterval)
Set the time in seconds for this component to Sleep before it checks for new received data in the Cluster
定義:
インタフェース Cluster 内の setCheckInterval
パラメータ:
checkInterval - The time to sleep

getCheckInterval

public int getCheckInterval()
Get the time in seconds this Cluster sleeps
定義:
インタフェース Cluster 内の getCheckInterval
戻り値:
The time in seconds this Cluster sleeps

getRemoteClusterMembers

public ClusterMemberInfo[] getRemoteClusterMembers()
Returns a collection containing ClusterMemberInfo on the remote members of this Cluster. This method does not include the local host, to retrieve ClusterMemberInfo on the local host use getLocalClusterInfo() instead.
定義:
インタフェース Cluster 内の getRemoteClusterMembers
戻り値:
Collection with all members in the Cluster

getLocalClusterMember

public ClusterMemberInfo getLocalClusterMember()
Return cluster information about the local host
定義:
インタフェース Cluster 内の getLocalClusterMember
戻り値:
Cluster information

getClusterSender

public ClusterSender getClusterSender(java.lang.String senderId)
Returns a ClusterSender which is the interface to use when sending information in the Cluster. senderId is used as a identifier so that information sent through this instance can only be used with the respectice ClusterReceiver
定義:
インタフェース Cluster 内の getClusterSender
戻り値:
The ClusterSender

getClusterReceiver

public ClusterReceiver getClusterReceiver(java.lang.String senderId)
Returns a ClusterReceiver which is the interface to use when receiving information in the Cluster. senderId is used as a indentifier, only information send through the ClusterSender with the same senderId can be received.
定義:
インタフェース Cluster 内の getClusterReceiver
戻り値:
The ClusterReceiver

log

protected void log(java.lang.String message)
Log a message on the Logger associated with our Container (if any).
パラメータ:
message - Message to be logged

addLifecycleListener

public void addLifecycleListener(LifecycleListener listener)
Add a lifecycle event listener to this component.
定義:
インタフェース Lifecycle 内の addLifecycleListener
パラメータ:
listener - The listener to add

removeLifecycleListener

public void removeLifecycleListener(LifecycleListener listener)
Remove a lifecycle event listener from this component.
定義:
インタフェース Lifecycle 内の removeLifecycleListener
パラメータ:
listener - The listener to remove

start

public void start()
           throws LifecycleException
Prepare for the beginning of active use of the public methods of this component. This method should be called after configure(), and before any of the public methods of the component are utilized.
定義:
インタフェース Lifecycle 内の start
例外:
java.lang.IllegalStateException - if this component has already been started
LifecycleException - if this component detects a fatal error that prevents this component from being used

stop

public void stop()
          throws LifecycleException
Gracefully terminate the active use of the public methods of this component. This method should be the last one called on a given instance of this component.
定義:
インタフェース Lifecycle 内の stop
例外:
java.lang.IllegalStateException - if this component has not been started
LifecycleException - if this component detects a fatal error that needs to be reported

run

public void run()
The background thread.
定義:
インタフェース java.lang.Runnable 内の run


Copyright ? 2000-2001 Apache Software Foundation. All Rights Reserved.