|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.catalina.cluster.StandardCluster
A Cluster implementation. Responsible for setting up a cluster and provides callers with a valid multicast receiver/sender.
Fields inherited from interface org.apache.catalina.Lifecycle |
START_EVENT,
STOP_EVENT |
Constructor Summary | |
StandardCluster()
|
Method Summary | |
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. |
ClusterSender |
getClusterSender(java.lang.String senderId)
Returns a ClusterSender which is the interface
to use when sending information in the Cluster. |
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. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public StandardCluster()
Method Detail |
public java.lang.String getInfo()
<description>/<version>
.protected java.lang.String getName()
String
containing the name of this
Cluster implementation, used for loggingpublic void setDebug(int debug)
debug
- The debug levelpublic int getDebug()
public void setClusterName(java.lang.String clusterName)
clusterName
- The clustername to joinpublic java.lang.String getClusterName()
public void setContainer(Container container)
container
- The Container to usepublic Container getContainer()
public void setMulticastPort(int multicastPort)
port
- The Port to usepublic int getMulticastPort()
public void setMulticastAddress(java.lang.String multicastAddress)
port
- The Groupaddress to usepublic java.net.InetAddress getMulticastAddress()
public void setCheckInterval(int checkInterval)
checkInterval
- The time to sleeppublic int getCheckInterval()
public ClusterMemberInfo[] getRemoteClusterMembers()
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.public ClusterMemberInfo getLocalClusterMember()
public ClusterSender getClusterSender(java.lang.String senderId)
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
public ClusterReceiver getClusterReceiver(java.lang.String senderId)
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.protected void log(java.lang.String message)
message
- Message to be loggedpublic void addLifecycleListener(LifecycleListener listener)
listener
- The listener to addpublic void removeLifecycleListener(LifecycleListener listener)
listener
- The listener to removepublic void start() throws LifecycleException
configure()
,
and before any of the public methods of the component are utilized.public void stop() throws LifecycleException
public void run()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |