jrunx.cluster
Class ClusterManager

jrunx.kernel.ServiceAdapter
  |
  +--jrunx.kernel.ServicePartition
        |
        +--jrunx.kernel.ConfigurableServicePartition
              |
              +--jrunx.cluster.ClusterManager
All Implemented Interfaces:
ClusterConstants, ClusterManagerMBean, ConfigurableServicePartitionMBean, javax.naming.Referenceable, java.io.Serializable, Service, ServiceMBean, ServicePartitionMBean

public class ClusterManager
extends ConfigurableServicePartition
implements ClusterManagerMBean, ClusterConstants

Service that encapsulates the JINI lookup service and referees ClusterableService discovery, joins, and events.

Author:
PS Neville
See Also:
Serialized Form

Field Summary
static boolean PROCESS_CLUSTERED
           
 
Fields inherited from class jrunx.kernel.ServicePartition
sortedServices
 
Fields inherited from class jrunx.kernel.ServiceAdapter
DEFAULT_DEACTIVATED, DEFAULT_DOMAIN, DOMAIN_NAME_SEPARATOR, DOMAIN_NAME_SUFFIX, domainName, jndiBindable, LOGGER_CACHE_TIME, SCHEDULER_SERVICE, SECURITY_MANAGER, server, status, TRANSACTION_MANAGER
 
Fields inherited from interface jrunx.cluster.ClusterManagerMBean
OBJECT_NAME
 
Fields inherited from interface jrunx.kernel.Service
INITIALIZED, STARTED, STARTING, STOPPED, STOPPING, UNINITIALIZED
 
Fields inherited from interface jrunx.cluster.ClusterConstants
AVAILABLE_SERVICES, CLUSTER_MANAGER_JNDI, DEFAULT_CLUSTER_DOMAIN, DEFAULT_ENABLED, JINI_CODE_BASE_JAR, PRIMARY_SERVICE, SECONDARY_SERVICE
 
Constructor Summary
ClusterManager()
           
 
Method Summary
 void destroy()
          Every service is eventually destroyed.
 java.lang.String getClusterDomain()
           
 java.util.ArrayList getClusteredHostAddresses()
           
 java.util.ArrayList getClusteredServerNames()
           
 java.util.ArrayList getClusteredServersInfo()
           
 java.lang.String getClusterManagerJAR()
           
 java.util.ArrayList getLocators()
           
 java.lang.String getLogDirectory()
           
 java.lang.String getPolicy()
           
 java.lang.String getTemporaryDirectory()
           
 java.lang.String getUnicastPeer()
           
 void init()
          Not every service needs to init, implement it out of convenience.
 boolean isEnabled()
           
 void setClusterDomain(java.lang.String clusterDomain)
           
 void setClusterManagerJAR(java.lang.String clusterManagerJAR)
           
 void setEnabled(boolean enabled)
           
 void setLogDirectory(java.lang.String logLocation)
           
 void setPolicy(java.lang.String policy)
           
 void setTemporaryDirectory(java.lang.String temporaryDirectory)
           
 void setUnicastPeer(java.lang.String host)
           
protected  void updateClusterServers(ClusterableService stub, boolean addFlag)
           
 
Methods inherited from class jrunx.kernel.ConfigurableServicePartition
destroyServices, initServices, loadAndInit, loadChildren, setChildElements, start, startServices, stop, stopServices
 
Methods inherited from class jrunx.kernel.ServicePartition
addService, addService, getServices, invokeChain, iterator, removeService, removeService
 
Methods inherited from class jrunx.kernel.ServiceAdapter
bind, findObjectInstance, findObjectInstance, findObjectInstance, getBindToJNDI, getDeactivated, getDomainName, getDomainSearchPath, getJRunService, getLogger, getName, getParentService, getReference, getResourceManager, getServerName, getServerProperties, getStatus, invokeMethod, isInPartition, isPartition, lookup, postDeregister, postRegister, preDeregister, preRegister, requestServer, scheduleRunnable, setBindToJNDI, setDeactivated, setDomainName, setName, setParentService, toString, unbind, unscheduleRunnable, updateStatus
 
Methods inherited from interface jrunx.kernel.ConfigurableServicePartitionMBean
setChildElements
 
Methods inherited from interface jrunx.kernel.ServicePartitionMBean
addService, addService, iterator, removeService, removeService
 
Methods inherited from interface jrunx.kernel.ServiceMBean
bind, getBindToJNDI, getDeactivated, getDomainName, getJRunService, getLogger, getName, getParentService, getServerName, requestServer, setBindToJNDI, setDeactivated, setDomainName, setName, setParentService, unbind
 
Methods inherited from interface jrunx.kernel.Service
getStatus, start, stop, updateStatus
 

Field Detail

PROCESS_CLUSTERED

public static boolean PROCESS_CLUSTERED
Constructor Detail

ClusterManager

public ClusterManager()
Method Detail

init

public void init()
          throws java.lang.Exception
Description copied from class: ServiceAdapter
Not every service needs to init, implement it out of convenience.
Specified by:
init in interface Service
Overrides:
init in class ConfigurableServicePartition

destroy

public void destroy()
             throws java.lang.Exception
Description copied from class: ServiceAdapter
Every service is eventually destroyed. Convenience implementation.
Specified by:
destroy in interface Service
Overrides:
destroy in class ConfigurableServicePartition

isEnabled

public boolean isEnabled()
Specified by:
isEnabled in interface ClusterManagerMBean

setEnabled

public void setEnabled(boolean enabled)
Specified by:
setEnabled in interface ClusterManagerMBean

setUnicastPeer

public void setUnicastPeer(java.lang.String host)
Specified by:
setUnicastPeer in interface ClusterManagerMBean

getUnicastPeer

public java.lang.String getUnicastPeer()
Specified by:
getUnicastPeer in interface ClusterManagerMBean

getLocators

public java.util.ArrayList getLocators()
Specified by:
getLocators in interface ClusterManagerMBean

getClusterManagerJAR

public java.lang.String getClusterManagerJAR()

setClusterManagerJAR

public void setClusterManagerJAR(java.lang.String clusterManagerJAR)

getPolicy

public java.lang.String getPolicy()

setPolicy

public void setPolicy(java.lang.String policy)

getLogDirectory

public java.lang.String getLogDirectory()

setLogDirectory

public void setLogDirectory(java.lang.String logLocation)

getTemporaryDirectory

public java.lang.String getTemporaryDirectory()
Specified by:
getTemporaryDirectory in interface ClusterManagerMBean

setTemporaryDirectory

public void setTemporaryDirectory(java.lang.String temporaryDirectory)
Specified by:
setTemporaryDirectory in interface ClusterManagerMBean

getClusterDomain

public java.lang.String getClusterDomain()
Specified by:
getClusterDomain in interface ClusterManagerMBean

setClusterDomain

public void setClusterDomain(java.lang.String clusterDomain)
Specified by:
setClusterDomain in interface ClusterManagerMBean

getClusteredServerNames

public java.util.ArrayList getClusteredServerNames()
Specified by:
getClusteredServerNames in interface ClusterManagerMBean

getClusteredHostAddresses

public java.util.ArrayList getClusteredHostAddresses()
Specified by:
getClusteredHostAddresses in interface ClusterManagerMBean

getClusteredServersInfo

public java.util.ArrayList getClusteredServersInfo()
Specified by:
getClusteredServersInfo in interface ClusterManagerMBean

updateClusterServers

protected void updateClusterServers(ClusterableService stub,
                                    boolean addFlag)


Copyright � 2002 Macromedia Corporation. All Rights Reserved.