|
||||||||||
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 two data structures:
myServers
and managedServersToUrls
.
The first one containes the OBJECT_NAMEs of the J2EEServers the domain is
supposed to contain, and the second containes the JMX Connector URLs
each server provides for management.
Both are updated by addServer() and removeServer() methods.
Field Summary |
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)
|
void |
addServer(java.lang.String serverOn,
java.lang.String[] connectorServerURLs,
boolean handleNotification)
Add an OBJECT_NAME to the servers 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[] |
getConnectorServerURLs(java.lang.String serverName)
Return the connector server urls for a given server. |
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 running in this domain. |
void |
handleNotification(javax.management.Notification notification,
java.lang.Object handback)
|
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 |
setGlobalErrorReport(java.lang.String globalErrorReport)
|
void |
setJmxService(JmxService jmxService)
|
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 |
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[] getServerNames()
public java.lang.String[] getConnectorServerURLs(java.lang.String serverName)
serverName
- the server we are inquiring for
public void addServer(java.lang.String serverOn, java.lang.String[] connectorServerURLs, boolean handleNotification) throws javax.management.MalformedObjectNameException, java.lang.Exception
servers
list. If this method is not called by a handleNotification, then this method uses
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 domainconnectorServerURLs
- 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
javax.management.MalformedObjectNameException
java.lang.Exception
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |