|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.management.NotificationBroadcasterSupport org.objectweb.jonas.management.ReconfigDispatcher org.objectweb.jonas.management.j2eemanagement.J2EEManagedObject org.objectweb.jonas.server.J2EEServer
public class J2EEServer
MBean class for Server management. Two classes are used to provide all management services : J2EEServer and J2EEServerMBean. This class provide the notification's process when add or remove resources.
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 | |
---|---|
J2EEServer(java.lang.String objectName,
Server server,
java.lang.String serverName,
java.lang.String serverVersion,
java.lang.String serverVendor,
java.lang.String protocols,
java.lang.String versions)
MBean constructor |
Method Summary | |
---|---|
void |
addDeployedObject(java.lang.String objectName)
Add an object name to the deployedObjects list. |
void |
addJavaVM(java.lang.String objectName)
Add an object name to the javaVMs list. |
void |
addNotificationListener(javax.management.NotificationListener listner,
javax.management.NotificationFilter filter,
java.lang.Object handback)
Add a new listener. |
void |
addResource(java.lang.String pObjectName)
Add an object name to the resources list. |
java.lang.String |
deployEar(java.lang.String fileName)
Deploy a J2EE application packaged in a EAR file |
java.lang.String |
deployJar(java.lang.String fileName)
Deploy a stand-alone J2EE module packaged in a JAR file |
java.lang.String |
deployRar(java.lang.String fileName)
Deploy a J2EE application packaged in a RAR file |
void |
deployWar(java.lang.String fileName)
Deploy a stand-alone J2EE module packaged in a WAR file |
long |
getCurrentTotalMemory()
get jvm total memory |
long |
getCurrentUsedMemory()
get jvm used memory |
java.util.List |
getDeployedObjects()
Return the list of MBean names corresponding to the deployed J2EEModules and J2EEApplications |
java.util.List |
getJavaVMs()
Return the list of MBean names corresponding to the JVMs on which this server has running threads |
java.lang.String |
getJonasBase()
|
java.lang.String |
getProtocols()
Protocols supported by this Server |
int |
getRange()
get range |
java.util.List |
getResources()
Return the list of MBean names corresponding to the resources available on this server |
java.lang.String |
getServerName()
Server name |
java.lang.String |
getServerVendor()
Server vendor |
java.lang.String |
getServerVersion()
Server version |
int |
getSizeTableMeasures()
Get the size of the table of measures |
java.lang.Long[] |
getTableMeasures()
get the table of value |
java.lang.String |
getVersions()
|
void |
handleNotification(javax.management.Notification notification,
java.lang.Object handback)
Treat the notifications emitted by the JMX server. |
boolean |
isActivated()
get monitoring activation |
java.lang.Boolean |
isEarDeployed(java.lang.String fileName)
Test if the specified filename is already deployed or not. |
java.lang.Boolean |
isJarDeployed(java.lang.String fileName)
Test if the specified filename is already deployed or not. |
java.lang.Boolean |
isRarDeployed(java.lang.String fileName)
Test if the specified filename is already deployed or not. |
java.lang.Boolean |
isWarDeployed(java.lang.String fileName)
Test if the specified filename is already deployed or not. |
void |
removeDeployedObject(java.lang.String objectName)
Remove an object name to the deployedObjects list. |
java.lang.String |
removeResource(java.lang.String pObjectName)
Remove an object name from the resources list. |
void |
runGC()
run the garbage collector |
void |
sendNotification(javax.management.Notification notification)
Send a notification to the listener. |
void |
setActivated(boolean pActivated)
set monitoring activation |
void |
setJonasBase(java.lang.String jonasBase)
|
void |
setRange(int range)
set range |
void |
setSizeTableMeasures(int sizeMeasuresTable)
Set the size of the table of measures |
void |
stop()
Stop server (with stopping the JVM) |
void |
timeoutExpired(java.lang.Object arg)
The measures timeout has expired Do not synchronize this method to avoid deadlocks! |
void |
unDeployEar(java.lang.String fileName)
undeploy a J2EE application packaged in a EAR file |
void |
unDeployJar(java.lang.String fileName)
Uneploy a stand-alone J2EE module packaged in a JAR file |
void |
unDeployRar(java.lang.String fileName)
undeploy a J2EE application packaged in a RAR file |
void |
unDeployWar(java.lang.String fileName)
Uneploy a stand-alone J2EE module packaged in a WAR file |
Methods inherited from class org.objectweb.jonas.management.j2eemanagement.J2EEManagedObject |
---|
getObjectName, isEventProvider, isStateManageable, isStatisticsProvider |
Methods inherited from class org.objectweb.jonas.management.ReconfigDispatcher |
---|
getFilter, getHandback, getListener, getNotificationInfo, initLogger, removeNotificationListener, sendReconfigNotification, sendSaveNotification |
Methods inherited from class javax.management.NotificationBroadcasterSupport |
---|
handleNotification, removeNotificationListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public J2EEServer(java.lang.String objectName, Server server, java.lang.String serverName, java.lang.String serverVersion, java.lang.String serverVendor, java.lang.String protocols, java.lang.String versions)
objectName
- object name of the managed objectserver
- Server objectserverName
- server nameserverVersion
- JOnAS versionserverVendor
- is JOnASprotocols
- protocols supportedMethod Detail |
---|
public java.lang.String getServerName()
public java.lang.String getServerVersion()
public java.lang.String getServerVendor()
public java.util.List getDeployedObjects()
public void addDeployedObject(java.lang.String objectName)
deployedObjects
list.
objectName
- Object name corresponding to a J2EEDeployedObject MBeanpublic void removeDeployedObject(java.lang.String objectName)
deployedObjects
list.
objectName
- Object name corresponding to a J2EEDeployedObject MBeanpublic java.util.List getResources()
public java.util.List getJavaVMs()
public void addJavaVM(java.lang.String objectName)
javaVMs
list.
objectName
- Object name correspondig to a JVM MBeanpublic java.lang.String getProtocols()
public void stop() throws java.lang.Exception
java.lang.Exception
public void runGC()
public long getCurrentUsedMemory()
public long getCurrentTotalMemory()
public void setRange(int range)
range
- range for free memory measurementpublic int getRange()
public void setSizeTableMeasures(int sizeMeasuresTable)
sizeMeasuresTable
- Number of measurespublic int getSizeTableMeasures()
public java.lang.Long[] getTableMeasures()
public void timeoutExpired(java.lang.Object arg)
timeoutExpired
in interface TimerEventListener
arg
- Objectpublic void setActivated(boolean pActivated)
pActivated
- true is activatedpublic boolean isActivated()
public java.lang.String deployJar(java.lang.String fileName) throws java.lang.Exception
fileName
- the file name of the JAR to be be deployed.
java.lang.Exception
- Management operation could not be executed or failedpublic java.lang.Boolean isJarDeployed(java.lang.String fileName) throws java.lang.Exception
fileName
- the name of the jar file.
java.lang.Exception
- Management operation could not be executedpublic void unDeployJar(java.lang.String fileName) throws java.lang.Exception
fileName
- the file name of the JAR to be be undeployed.
java.lang.Exception
- Management operation could not be executed or failedpublic java.lang.Boolean isWarDeployed(java.lang.String fileName) throws java.lang.Exception
fileName
- the name of the war file.
java.lang.Exception
- Management operation could not be executedpublic void deployWar(java.lang.String fileName) throws java.lang.Exception
fileName
- the file name of the WAR to be be deployed.
java.lang.Exception
- Management operation could not be executed or failedpublic void unDeployWar(java.lang.String fileName) throws java.lang.Exception
fileName
- the file name of the WAR to be be undeployed.
java.lang.Exception
- Management operation could not be executed or failedpublic java.lang.String deployEar(java.lang.String fileName) throws java.lang.Exception
fileName
- the file name of the EAR to be be deployed.
java.lang.Exception
- Management operation could not be executed or failedpublic java.lang.Boolean isEarDeployed(java.lang.String fileName) throws java.lang.Exception
fileName
- the name of the ear file.
java.lang.Exception
- Management operation could not be executed or failedpublic void unDeployEar(java.lang.String fileName) throws java.lang.Exception
fileName
- the file name of the EAR to be be undeployed.
java.lang.Exception
- Management operation could not be executed or failedpublic java.lang.String deployRar(java.lang.String fileName) throws java.lang.Exception
fileName
- the file name of the RAR to be be deployed.
java.lang.Exception
- Management operation could not be executed or failedpublic java.lang.Boolean isRarDeployed(java.lang.String fileName) throws java.lang.Exception
fileName
- the name of the rar file.
java.lang.Exception
- Management operation could not be executed or failedpublic void unDeployRar(java.lang.String fileName) throws java.lang.Exception
fileName
- the file name of the RAR to be be undeployed.
java.lang.Exception
- Management operation could not be executed or failedpublic void addResource(java.lang.String pObjectName)
resources
list.
pObjectName
- Object name correspondig to a J2EEResource MBeanpublic java.lang.String removeResource(java.lang.String pObjectName)
resources
list.
pObjectName
- Object name correspondig to a J2EEResource MBean
public void sendNotification(javax.management.Notification notification)
sendNotification
in class javax.management.NotificationBroadcasterSupport
notification
- The notification to sendpublic void addNotificationListener(javax.management.NotificationListener listner, javax.management.NotificationFilter filter, java.lang.Object handback) throws java.lang.IllegalArgumentException
addNotificationListener
in interface javax.management.NotificationBroadcaster
addNotificationListener
in class ReconfigDispatcher
listner
- Listener to notifyfilter
- Notification filterhandback
- ??
java.lang.IllegalArgumentException
public void handleNotification(javax.management.Notification notification, java.lang.Object handback)
handleNotification
in interface javax.management.NotificationListener
notification
- received notificationhandback
- received handback objectpublic java.lang.String getVersions()
public java.lang.String getJonasBase()
public void setJonasBase(java.lang.String jonasBase)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |