|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.jonas.management.monitoring.DomainMonitor
public class DomainMonitor
This class represents the Master Server of the Domain. It manages the servers and the clusters in the domain.
Constructor Summary | |
---|---|
DomainMonitor(String domain)
Constructor |
Method Summary | |
---|---|
ServerProxy |
addLocalServer(String svname,
Collection urls)
Add the local J2EEServer to the list of servers |
String |
createCluster(String name)
Create a logical cluster |
void |
deployOnTarget(String target,
String fileName)
Deploy a module on a target which may be a server or a cluster |
void |
discoveryNotification(DiscoveryEvent event)
Handle Notifications from Discovery Service |
BaseCluster |
findCluster(String name)
Get a Cluster by its name. |
ClusterDaemonProxy |
findClusterDaemonProxy(String name)
Get a ClusterDaemon by its name |
ServerProxy |
findServerProxy(String name)
Get a Server by its name |
void |
forgetAllDeploy()
Forget all deploy information |
Collection |
getClusterDaemonList()
Get the list of all ClusterDaemonProxy |
String[] |
getClusterDaemons()
|
String |
getClusterdaemonState(String clusterdaemonName)
Return the state of a cluster daemon in the domain. |
String[] |
getClusters()
MBean method |
String |
getClusterState(String clusterName)
Return the state of a cluster in the domain. |
String |
getClusterType(String clusterName)
Return the type of a cluster in the domain. |
MBeanServerConnection |
getConnection(String serverName)
Return a JMX connection to a given server in the domain. |
String[] |
getConnectorServerURLs(String serverName)
Return the JMX ConnectorServerURLs of a given server in the domain. |
String[] |
getDeployServers(String filename)
Get the list of server where a file is being deployed |
String |
getDeployState(String filename,
String servername)
Get the current state (string form) of deployment operation |
String |
getDescription()
|
String |
getDomainName()
|
String |
getErrorMessage(String filename,
String servername)
Get the error message associated to the error state |
static DomainMonitor |
getInstance()
Singleton: Each server (master or slave) must have 1 unique DomainMonitor object. |
Collection |
getLogicalClusterList()
Get the list of logical clusters |
int |
getMonitoringPeriod()
|
String[] |
getProxys()
MBean method To be replaced by J2EEDomain.getServers() |
String |
getServerClusterdaemon(String serverName)
Return the cluster daemon name of a server in the domain. |
Collection |
getServerList()
Get the list of ServerProxy |
String[] |
getServerNames()
|
String[] |
getServerNames(String clusterName)
|
String[] |
getServers(boolean started)
|
String[] |
getServersInCluster(String clusterName)
|
String[] |
getServersNotInCluster(String clusterName)
|
String |
getServerState(String serverName)
Return the state of a server in the domain. |
Collection |
getTotalClusterList()
Get the list of all clusters of any type |
boolean |
isCluster(String clusterName)
Check if a cluster exists. |
boolean |
isMaster()
|
void |
notifyServerProxyRunning(ServerProxy sp)
Notify to all the cluster factories that a server started in the domain |
void |
readDomainConfig()
|
void |
refreshStates()
Try to refresh the server states TODO notify thread only. |
boolean |
registerDeployAction(DeployAction action)
Register a DeployAction |
void |
setMaster()
|
void |
setMonitoringPeriod(int sec)
|
boolean |
startRemoteTarget(String target)
Start a server or a cluster |
void |
startServer(String serverName)
Start a managed JOnAS Server |
boolean |
stopRemoteTarget(String target)
Stop a server or a cluster |
void |
stopServer(String serverName)
Stop a managed JOnAS Server |
void |
unDeployOnTarget(String target,
String fileName)
Undeploy a module on a target which may be a server or a cluster |
boolean |
uploadDeployFileOn(String target,
String filename)
Upload and deploy a module on a target. |
void |
uploadDeployOnTarget(String target,
String fileName,
boolean replaceExisting)
Upload a module on a target which may be a server or a cluster |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DomainMonitor(String domain)
Method Detail |
---|
public static DomainMonitor getInstance()
public void setMaster()
public boolean isMaster()
public void readDomainConfig()
public String getDescription()
public String getDomainName()
public void setMonitoringPeriod(int sec)
public int getMonitoringPeriod()
public ServerProxy addLocalServer(String svname, Collection urls)
public BaseCluster findCluster(String name)
name
- The name of the cluster
public ServerProxy findServerProxy(String name)
name
- The name of the server
public ClusterDaemonProxy findClusterDaemonProxy(String name)
name
- The name of the clusterdaemon
public Collection getServerList()
public Collection getClusterDaemonList()
public Collection getTotalClusterList()
public Collection getLogicalClusterList()
public String[] getProxys()
public String[] getClusters()
public void discoveryNotification(DiscoveryEvent event)
event
- public void notifyServerProxyRunning(ServerProxy sp)
sp
- the server's proxypublic boolean registerDeployAction(DeployAction action)
public String[] getDeployServers(String filename)
filename
- file to deploy
public String getDeployState(String filename, String servername)
filename
- file to deployservername
- server where deployment is done
public String getErrorMessage(String filename, String servername)
filename
- file to deployservername
- server where deployment is done
public void forgetAllDeploy()
public void refreshStates()
public MBeanServerConnection getConnection(String serverName)
serverName
- the name of the server
public String[] getConnectorServerURLs(String serverName)
serverName
- the name of the server
public String[] getServers(boolean started)
started
- if true, return only the servers which are in RUNNING state
anyway, don't pat attention to the servers state
public String[] getServerNames()
public String[] getServerNames(String clusterName)
clusterName
- the cluster name
public String getServerState(String serverName)
serverName
- the server name
public String getClusterState(String clusterName)
clusterName
- the cluster name
public String getClusterdaemonState(String clusterdaemonName)
clusterdaemonName
- the cluster daemon name
public String getClusterType(String clusterName)
clusterName
- the cluster name
public String[] getClusterDaemons()
public String createCluster(String name)
name
- the name of the cluster
public void startServer(String serverName)
serverName
- name of the serverpublic void stopServer(String serverName)
serverName
- name of the serverpublic void deployOnTarget(String target, String fileName)
target
- target namefileName
- file containing the modulepublic void uploadDeployOnTarget(String target, String fileName, boolean replaceExisting)
target
- target namefileName
- file containing the modulereplaceExisting
- true if the file can replace an existing one (same name)public void unDeployOnTarget(String target, String fileName)
target
- target namefileName
- file containing the modulepublic boolean stopRemoteTarget(String target) throws JMException
target
- the name of the target to be stoped
JMException
- problem when trying to stoppublic boolean startRemoteTarget(String target) throws JMException
target
- the name of the target to be started
JMException
- problem when trying to startpublic boolean uploadDeployFileOn(String target, String filename)
target
- the target namefilename
- the file containing the module
public boolean isCluster(String clusterName)
clusterName
- the name of the cluster to check
public String[] getServersNotInCluster(String clusterName)
clusterName
- Name of the cluster
public String[] getServersInCluster(String clusterName)
clusterName
- Name of the cluster
public String getServerClusterdaemon(String serverName)
serverName
- the server name
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |