|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ow2.jonas.lib.management.javaee.ManagedObject org.ow2.jonas.lib.management.javaee.J2EEManagedObject org.ow2.jonas.lib.management.domain.J2EEDomain
public class J2EEDomain
Implements a managed object which represents a management domain. The complete interface is described in mbeans-descriptors.xml
Field Summary |
---|
Fields inherited from class org.ow2.jonas.lib.management.javaee.J2EEManagedObject |
---|
J2EE_TYPE_APPLICATION, J2EE_TYPE_SERVER, NAME |
Constructor Summary | |
---|---|
J2EEDomain(String objectName)
MBean constructor. |
Method Summary | |
---|---|
String |
createCluster(String name)
Create a logical cluster (used by jonasAdmin). |
void |
deployEar(String[] target,
String fileName)
Deploy a EAR file on a multiple management target composed of servers and/or clusters. |
void |
deployJar(String[] target,
String fileName)
Deploy a JAR file on a multiple management target composed of servers and/or clusters. |
void |
deployRar(String[] target,
String fileName)
Deploy a RAR file on a multiple management target composed of servers and/or clusters. |
void |
deployWar(String[] target,
String fileName)
Deploy a WAR file on a multiple management target composed of servers and/or clusters. |
void |
forgetAllDeploy()
Forget all deploy information. |
String[] |
getClusterDaemons()
Implement clusterDaemons management attribute. |
String |
getClusterdaemonState(String clusterdaemonName)
Return the state of a cluster daemon in the domain. |
String[] |
getClusters()
Implement clusters management attribute. |
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. |
String[] |
getDeployServers(String fileName)
Get the list of servers where a file is being deployed. |
String |
getDeployState(String fileName,
String serverName)
Get the current state of deployment operation. |
String |
getDescription()
Implement description management attribute. |
DomainMonitor |
getDomainMonitor()
Get the domainMonitor, or null if slave server. |
String |
getErrorMessage(String filename,
String servername)
Get the error message associated to the error state. |
static J2EEDomain |
getInstance()
Singleton: Each server (master or slave) must have 1 unique J2EEDomain object. |
String |
getMyName()
Implement myName management attribute. |
String |
getServerClusterdaemon(String serverName)
Return the cluster daemon name of a server in the domain. |
String[] |
getServerNames()
Implement serverNames management attribute. |
String[] |
getServers()
Implement servers JSR77 management attribute. |
String[] |
getServersInCluster(String clusterName)
Get the name of the servers in the domain that are belonging to a cluster. |
String[] |
getServersNotInCluster(String clusterName)
Get the name of the servers in the domain except the ones that are already belonging to this cluster. |
String |
getServerState(String serverName)
Return the state of a server in the domain. |
String[] |
getStartedServers()
Implement startedServers management attribute. |
void |
haltServer(String serverName)
Halt a Remote JOnAS Server. |
boolean |
isMaster()
Implement master management attribute. |
void |
postDeregister()
|
void |
postRegister(Boolean registrationDone)
Add J2EEDomain MBean (myself) as listener to registration/unregistration notifications of JOnAS management MBeans. |
void |
preDeregister()
|
ObjectName |
preRegister(MBeanServer mbeanServer,
ObjectName name)
|
void |
setJmxService(JmxService jmxService)
|
void |
setMaster(boolean ismaster,
String serverName)
Set this server as the master. |
void |
setMyJ2EEServerOn(String myJ2EEServerOn)
Set the local server's OBJECT_NAME. |
boolean |
startRemoteTarget(String target)
Start a remote target on the behalf of ClientAdmin. |
void |
startServer(String serverName)
Start a Remote JOnAS Server. |
boolean |
stopRemoteTarget(String target)
Stop a remote target on the behalf of ClientAdmin. |
void |
stopServer(String serverName)
Stop a Remote JOnAS Server. |
void |
unDeployEar(String[] target,
String fileName)
Undeploy a EAR file of a multiple management target composed of servers and/or clusters. |
void |
unDeployJar(String[] target,
String fileName)
Undeploy a JAR file of a multiple management target composed of servers and/or clusters. |
void |
unDeployRar(String[] target,
String fileName)
Undeploy a RAR file of a multiple management target composed of servers and/or clusters. |
void |
unDeployWar(String[] target,
String fileName)
Undeploy a WAR file of a multiple management target composed of servers and/or clusters. |
void |
uploadDeployEar(String[] target,
String fileName,
boolean replaceExisting)
Upload and deploy an EAR file on a multiple management target composed of servers and/or clusters. |
boolean |
uploadDeployFileOn(String target,
String filename)
Upload and deploy a module to a target on the behalf of Adm. |
void |
uploadDeployJar(String[] target,
String fileName,
boolean replaceExisting)
Upload and deploy a JAR file on a multiple management target composed of servers and/or clusters. |
void |
uploadDeployRar(String[] target,
String fileName,
boolean replaceExisting)
Upload and deploy a RAR file on a multiple management target composed of servers and/or clusters. |
void |
uploadDeployWar(String[] target,
String fileName,
boolean replaceExisting)
Upload and deploy a WAR file on a multiple management target composed of servers and/or clusters. |
Methods inherited from class org.ow2.jonas.lib.management.javaee.J2EEManagedObject |
---|
getObjectName, isEventProvider, isStateManageable, isStatisticsProvider, setEventProvider, setObjectName, setStateManageable, setStatisticsProvider |
Methods inherited from class org.ow2.jonas.lib.management.javaee.ManagedObject |
---|
sendNotification, sendReconfigNotification, sendSaveNotification, setModelMBean |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public J2EEDomain(String objectName) throws JMException
objectName
- object name of the managed object
JMException
- ..Method Detail |
---|
public String getErrorMessage(String filename, String servername)
filename
- file to deployservername
- server where deployment is done
public void forgetAllDeploy()
public String[] getClusterDaemons()
clusterDaemons
management attribute.
public String[] getClusters()
clusters
management attribute.
Return the MBeans OBJECT_NAMEs of the clusters in this domain
public String getDescription()
description
management attribute.
public boolean isMaster()
master
management attribute.
public String getMyName()
myName
management attribute.
public String[] getServerNames()
serverNames
management attribute.
public String[] getServers()
servers
JSR77 management attribute.
Return the MBean OBJECT_NAMEs of the servers belonging to this domain
public String[] getStartedServers()
startedServers
management attribute.
public String createCluster(String name)
name
- the cluster's name
public void startServer(String serverName)
serverName
- Name of the jonas serverpublic void haltServer(String serverName)
serverName
- Name of the jonas serverpublic void stopServer(String serverName)
serverName
- Name of the jonas serverpublic void deployJar(String[] target, String fileName)
target
- list of server and/or cluster namesfileName
- file to be deployedpublic void deployEar(String[] target, String fileName)
target
- list of server and/or cluster namesfileName
- file to be deployedpublic void deployWar(String[] target, String fileName)
target
- list of server and/or cluster namesfileName
- file to be deployedpublic void deployRar(String[] target, String fileName)
target
- list of server and/or cluster namesfileName
- file to be deployedpublic void uploadDeployJar(String[] target, String fileName, boolean replaceExisting)
target
- list of server and/or cluster namesfileName
- file to be deployedreplaceExisting
- true if the uploaded file can replace a file with the same name in the jars directorypublic void uploadDeployWar(String[] target, String fileName, boolean replaceExisting)
target
- list of server and/or cluster namesfileName
- file to be deployedreplaceExisting
- true if the uploaded file can replace a file with the same name in the wars directorypublic void uploadDeployEar(String[] target, String fileName, boolean replaceExisting)
target
- list of server and/or cluster namesfileName
- file to be deployedreplaceExisting
- true if the uploaded file can replace a file with the same name in the apps directorypublic void uploadDeployRar(String[] target, String fileName, boolean replaceExisting)
target
- list of server and/or cluster namesfileName
- file to be deployedreplaceExisting
- true if the uploaded file can replace a file with the same name in the rars directorypublic void unDeployJar(String[] target, String fileName)
target
- list of server and/or cluster namesfileName
- file to be undeployedpublic void unDeployWar(String[] target, String fileName)
target
- list of server and/or cluster namesfileName
- file to be undeployedpublic void unDeployEar(String[] target, String fileName)
target
- list of server and/or cluster namesfileName
- file to be undeployedpublic void unDeployRar(String[] target, String fileName)
target
- list of server and/or cluster namesfileName
- file to be undeployedpublic String[] getDeployServers(String fileName)
fileName
- file in deployment
public String getDeployState(String fileName, String serverName)
fileName
- file to deployserverName
- server where deployment is done
public String[] getServersNotInCluster(String clusterName)
clusterName
- the cluster name
public String[] getServersInCluster(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 name
public String getClusterType(String clusterName)
clusterName
- the cluster name
public String getServerClusterdaemon(String serverName)
serverName
- the server name
public static J2EEDomain getInstance()
public DomainMonitor getDomainMonitor()
public void setMaster(boolean ismaster, String serverName)
ismaster
- true if the current server is masterserverName
- current server namepublic void setMyJ2EEServerOn(String myJ2EEServerOn)
myJ2EEServerOn
- the local server's OBJECT_NAMEpublic boolean startRemoteTarget(String target) throws JMException
target
- the target to start
JMException
- problem when trying to startpublic boolean stopRemoteTarget(String target) throws JMException
target
- the target to stop
JMException
- problem when trying to stoppublic boolean uploadDeployFileOn(String target, String filename)
target
- the target to deploy onfilename
- the file containing the module
public ObjectName preRegister(MBeanServer mbeanServer, ObjectName name) throws Exception
preRegister
in interface MBeanRegistration
mbeanServer
- The MBean server in which the MBean will be registered.name
- The object name of the MBean
Exception
- This exception will be caught by the MBean server and re-thrown as an MBeanRegistrationExceptionpublic void postRegister(Boolean registrationDone)
postRegister
in interface MBeanRegistration
registrationDone
- Indicates whether or not the MBean has been successfully registeredpublic void preDeregister() throws Exception
preDeregister
in interface MBeanRegistration
Exception
MBeanRegistration.preDeregister()
public void postDeregister()
postDeregister
in interface MBeanRegistration
MBeanRegistration.postDeregister()
public void setJmxService(JmxService jmxService)
jmxService
- the jmxService to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |