|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.management.NotificationBroadcasterSupport
org.objectweb.jonas.management.ReconfigDispatcher
org.objectweb.jonas.management.j2eemanagement.J2EEManagedObject
org.objectweb.jonas.management.j2eemanagement.J2EEDomain
Implements a managed object which represents a management domain. Domain management information is present in the folowwing data structures:
myServers
containes the OBJECT_NAMEs of the J2EEServers in the domainmanagedServersToUrls
containes the JMX Connector URLs
each server provides for managementmyCluster
containes the OBJECT_NAMEs of the J2EEDomains this domain contains
Field Summary | |
static java.lang.String |
STARTED
|
static java.lang.String |
STOPPED
|
Fields inherited from class org.objectweb.jonas.management.j2eemanagement.J2EEManagedObject |
J2EE_TYPE_APPLICATION, J2EE_TYPE_SERVER, NAME |
Fields inherited from class org.objectweb.jonas.management.ReconfigDispatcher |
RECONFIG_TYPE, SAVE_RECONFIG_TYPE |
Constructor Summary | |
J2EEDomain(java.lang.String objectName,
boolean stateManageable,
boolean statisticsProvider,
boolean eventProvider)
MBean constructor |
Method Summary | |
void |
addServer(java.lang.String serverOn,
java.lang.String[] connectorServerURLs)
Create a J2EEServer MBean and add its OBJECT_NAME to the servers list. |
void |
addServer(java.lang.String serverOn,
java.lang.String[] connectorServerURLs,
java.lang.String state,
boolean handleNotification)
Create a J2EEServer MBean corresponding and add its OBJECT_NAME to the servers list. |
java.lang.String |
createCluster(java.lang.String clusterName)
Create a J2EEDomain MBean corresponding to a cluster and add it to the clusters list. |
boolean |
deployEar(java.lang.String[] target,
java.lang.String fileName)
Deploy a EAR module on a target if no other deployment operation is executing. |
boolean |
deployJar(java.lang.String[] target,
java.lang.String fileName)
Deploy a JAR module on a target if no other deployment operation is executing. |
boolean |
deployRar(java.lang.String[] target,
java.lang.String fileName)
Deploy a RAR module on a target if no other deployment operation is executing. |
boolean |
deployWar(java.lang.String[] target,
java.lang.String fileName)
Deploy a WAR module on a target if no other deployment operation is executing. |
java.lang.String[] |
getClusters()
Return the MBeans OBJECT_NAMEs of the clusters in this domain (or cluster). |
java.lang.String[] |
getConnectorServerURLs(java.lang.String serverName)
Return the connector server urls for a given server. |
java.lang.String |
getDescription()
|
java.lang.String |
getGlobalErrorReport()
|
JmxService |
getJmxService()
|
java.lang.String |
getProgress()
|
java.util.HashMap |
getProgressReport()
|
java.lang.String[] |
getServerNames()
Returns the names of the servers currently managed. |
java.lang.String[] |
getServers()
Return the MBeans OBJECT_NAMEs of the servers belonging to this domain (or cluster) Convert myServers ArrayList of OBJECT_NAMEs to an array of Strings of OBJECT_NAMEs |
java.lang.String |
getServerState(java.lang.String serverName)
Return the state of a server belonging to this domain (or cluster) |
java.lang.String[] |
getStartedServers()
Return the names of the STARTED servers |
void |
handleNotification(javax.management.Notification notification,
java.lang.Object handback)
|
boolean |
isCluster()
|
boolean |
isMaster()
|
void |
postDeregister()
|
void |
postRegister(java.lang.Boolean registrationDone)
Add J2EEDomain MBean (myself) as listener to registration/unregistration notifications of JOnAS management MBeans. |
void |
preDeregister()
|
javax.management.ObjectName |
preRegister(javax.management.MBeanServer server,
javax.management.ObjectName name)
|
java.lang.String |
removeServer(java.lang.String serverOn)
Remove an object name from the servers list. |
void |
resetProgress()
Set progress to null |
void |
setDescription(java.lang.String description)
|
void |
setGlobalErrorReport(java.lang.String globalErrorReport)
|
void |
setJmxService(JmxService jmxService)
|
void |
setMaster(boolean master)
|
void |
setProgressReport(java.util.HashMap report)
|
boolean |
unDeployEar(java.lang.String[] target,
java.lang.String fileName)
Un-deploy a EAR module on a target if no other deployment operation is executing. |
boolean |
unDeployJar(java.lang.String[] target,
java.lang.String fileName)
Un-deploy a JAR module on a target if no other deployment operation is executing. |
boolean |
unDeployRar(java.lang.String[] target,
java.lang.String fileName)
Un-deploy a RAR module on a target if no other deployment operation is executing. |
boolean |
unDeployWar(java.lang.String[] target,
java.lang.String fileName)
Un-deploy a WAR module on a target if no other deployment operation is executing. |
boolean |
uploadDeployEar(java.lang.String[] target,
java.lang.String fileName,
boolean replaceExisting)
Upload an EAR modlue to all targets and deploy the new module. |
boolean |
uploadDeployJar(java.lang.String[] target,
java.lang.String fileName,
boolean replaceExisting)
Upload an JAR modlue to all targets and deploy the new module. |
boolean |
uploadDeployRar(java.lang.String[] target,
java.lang.String fileName,
boolean replaceExisting)
Upload an RAR modlue to all targets and deploy the new module. |
boolean |
uploadDeployWar(java.lang.String[] target,
java.lang.String fileName,
boolean replaceExisting)
Upload an WAR modlue to all targets and deploy the new module. |
boolean |
uploadFile(java.lang.String[] target,
java.lang.String fileName,
boolean replaceExisting)
Upload a module to each of the target servers. |
Methods inherited from class org.objectweb.jonas.management.j2eemanagement.J2EEManagedObject |
getObjectName, isEventProvider, isStateManageable, isStatisticsProvider |
Methods inherited from class org.objectweb.jonas.management.ReconfigDispatcher |
addNotificationListener, getFilter, getHandback, getListener, getNotificationInfo, initLogger, removeNotificationListener, sendReconfigNotification, sendSaveNotification |
Methods inherited from class javax.management.NotificationBroadcasterSupport |
handleNotification, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String STARTED
public static final java.lang.String STOPPED
Constructor Detail |
public J2EEDomain(java.lang.String objectName, boolean stateManageable, boolean statisticsProvider, boolean eventProvider) throws javax.management.JMException
objectName
- object name of the managed objectstateManageable
- if true, this managed object implements J2EE State Management ModelstatisticsProvider
- if true, this managed object implements the J2EE StatisticProvide ModeleventProvider
- if true, this managed object implements the J2EE EventProvider Model
javax.management.JMException
- ..Method Detail |
public java.lang.String[] getServers()
public java.lang.String[] getClusters()
public java.lang.String[] getServerNames()
public java.lang.String[] getConnectorServerURLs(java.lang.String serverName)
serverName
- the server we are inquiring for
public java.lang.String getServerState(java.lang.String serverName)
serverName
- the server we are inquiring for
public java.lang.String[] getStartedServers()
public void addServer(java.lang.String serverOn, java.lang.String[] connectorServerURLs, java.lang.String state, boolean handleNotification) throws javax.management.MalformedObjectNameException, java.lang.Exception
servers
list.
If this method is not called by a handleNotification, use the Enroller MBean to send a discovery notification
towards the JMX service in order to create a connection.
serverOn
- ObjectName (String form) of a J2EEServer to be add in this domain (or cluster)connectorServerURLs
- connector server urls for this serverhandleNotification
- true if the method is called by a handleNotification method, false otherwise
javax.management.MalformedObjectNameException
java.lang.Exception
public void addServer(java.lang.String serverOn, java.lang.String[] connectorServerURLs) throws javax.management.MalformedObjectNameException, java.lang.Exception
servers
list.
This method is exposed as a management operation by the J2EEDomain MBean and can be used
to add servers to a domain (or cluster) by a management application or by the entity who reads
the discovery.xml file (currently the discovery service).
serverOn
- ObjectName (String form) of a J2EEServer to be add in this domain (or cluster)connectorServerURLs
- connector server urls for this server
javax.management.MalformedObjectNameException
java.lang.Exception
public java.lang.String createCluster(java.lang.String clusterName)
clusters
list.
clusterName
- the cluster's name
public java.lang.String removeServer(java.lang.String serverOn)
servers
list.
serverOn
- ObjectName (String form) of a J2EEServer to be removed from
this domain
public javax.management.ObjectName preRegister(javax.management.MBeanServer server, javax.management.ObjectName name) throws java.lang.Exception
preRegister
in interface javax.management.MBeanRegistration
server
- The MBean server in which the MBean will be registered.name
- The object name of the MBean
java.lang.Exception
public void postRegister(java.lang.Boolean registrationDone)
postRegister
in interface javax.management.MBeanRegistration
registrationDone
- Indicates whether or not the MBean has been successfully registeredpublic void preDeregister() throws java.lang.Exception
preDeregister
in interface javax.management.MBeanRegistration
java.lang.Exception
MBeanRegistration.preDeregister()
public void postDeregister()
postDeregister
in interface javax.management.MBeanRegistration
MBeanRegistration.postDeregister()
public void handleNotification(javax.management.Notification notification, java.lang.Object handback)
handleNotification
in interface javax.management.NotificationListener
notification
- received notificationhandback
- received handbackpublic java.lang.String getProgress()
public void resetProgress()
public boolean deployJar(java.lang.String[] target, java.lang.String fileName)
target
- The OBJECT_NAMES of the J2EEServers composing the targetfileName
- file containing the module (installed on each target)
public boolean unDeployJar(java.lang.String[] target, java.lang.String fileName)
target
- The OBJECT_NAMES of the J2EEServers composing the targetfileName
- file containing the module
public boolean deployWar(java.lang.String[] target, java.lang.String fileName)
target
- The OBJECT_NAMES of the J2EEServers composing the targetfileName
- file containing the module (installed on each target)
public boolean unDeployWar(java.lang.String[] target, java.lang.String fileName)
target
- The OBJECT_NAMES of the J2EEServers composing the targetfileName
- file containing the module
public boolean deployRar(java.lang.String[] target, java.lang.String fileName)
target
- The OBJECT_NAMES of the J2EEServers composing the targetfileName
- file containing the module (installed on each target)
public boolean unDeployRar(java.lang.String[] target, java.lang.String fileName)
target
- The OBJECT_NAMES of the J2EEServers composing the targetfileName
- file containing the module
public boolean deployEar(java.lang.String[] target, java.lang.String fileName)
target
- The OBJECT_NAMES of the J2EEServers composing the targetfileName
- file containing the module (installed on each target)
public boolean unDeployEar(java.lang.String[] target, java.lang.String fileName)
target
- The OBJECT_NAMES of the J2EEServers composing the targetfileName
- file containing the module
public boolean uploadDeployEar(java.lang.String[] target, java.lang.String fileName, boolean replaceExisting)
target
- a list target serversfileName
- file containing the modulereplaceExisting
- should a file with the same name on the target server be overwritten
public boolean uploadDeployWar(java.lang.String[] target, java.lang.String fileName, boolean replaceExisting)
target
- a list target serversfileName
- file containing the modulereplaceExisting
- should a file with the same name on the target server be overwritten
public boolean uploadDeployJar(java.lang.String[] target, java.lang.String fileName, boolean replaceExisting)
target
- a list target serversfileName
- file containing the modulereplaceExisting
- should a file with the same name on the target server be overwritten
public boolean uploadDeployRar(java.lang.String[] target, java.lang.String fileName, boolean replaceExisting)
target
- a list target serversfileName
- file containing the modulereplaceExisting
- should a file with the same name on the target server be overwritten
public boolean uploadFile(java.lang.String[] target, java.lang.String fileName, boolean replaceExisting)
target
- a list of the target serversfileName
- file containing the modulereplaceExisting
- should a file with the same name on the target server be overwritten
public JmxService getJmxService()
public void setJmxService(JmxService jmxService)
jmxService
- The jmxService to set.public java.util.HashMap getProgressReport()
public void setProgressReport(java.util.HashMap report)
report
- The report to set.public java.lang.String getGlobalErrorReport()
public void setGlobalErrorReport(java.lang.String globalErrorReport)
globalErrorReport
- The globalErrorReport to set.public boolean isCluster()
public java.lang.String getDescription()
public void setDescription(java.lang.String description)
description
- The description to set.public boolean isMaster()
public void setMaster(boolean master)
master
- The master to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |