|
||||||||||
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.reconfig.emitter.ReconfigEmitter
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.reconfig.emitter.ReconfigEmitter |
---|
RECONFIG_TYPE, SAVE_RECONFIG_TYPE |
Constructor Summary | |
---|---|
J2EEServer(String objectName,
Server server,
String serverName,
String serverVersion,
String serverVendor,
String protocols,
String versions)
J2EEServer MBean constructor. |
Method Summary | |
---|---|
void |
addDeployedObject(String objectName)
Add an object name to the deployedObjects list. |
void |
addJavaVM(String objectName)
Add an object name to the javaVMs list. |
void |
addResource(String pObjectName)
Add an object name to the resources list. |
String |
deployEar(String fileName)
Deploy a J2EE application packaged in a EAR file. |
String |
deployJar(String fileName)
Deploy a stand-alone J2EE module packaged in a JAR file. |
String |
deployRar(String fileName)
Deploy a J2EE application packaged in a RAR file. |
void |
deployWar(String fileName)
Deploy a stand-alone J2EE module packaged in a WAR file. |
String |
getAppsDirectory()
Return the Apps directory. |
long |
getCurrentTotalMemory()
Get jvm total memory. |
long |
getCurrentUsedMemory()
Get jvm used memory. |
List |
getDeployableEars()
Return the list of installed Applications ready to deploy. |
List |
getDeployableJars()
Return the list of installed EJB container ready to deploy. |
List |
getDeployableRars()
Return the list of installed RAR container ready to deploy. |
List |
getDeployableWars()
Return the list of installed web applications ready to deploy. |
List |
getDeployedEars()
Return the list of all loaded Applications. |
List |
getDeployedJars()
Return the list of all loaded EJB container. |
List |
getDeployedObjects()
Return the list of MBean names corresponding to the deployed J2EEModules and J2EEApplications. |
List |
getDeployedRars()
|
List |
getDeployedWars()
Return the list of all loaded web applications. |
String |
getJarsDirectory()
Return the Ejbjars directory. |
List |
getJavaVMs()
Return the list of MBean names corresponding to the JVMs on which this server has running threads |
String |
getJonasBase()
|
String |
getProtocols()
Protocols supported by this Server |
int |
getRange()
Get range. |
String |
getRarsDirectory()
Return the Rars directory. |
List |
getResources()
Return the list of MBean names corresponding to the resources available on this server. |
String |
getServerName()
Server name. |
String |
getServerVendor()
Server vendor. |
String |
getServerVersion()
Server version. |
int |
getSizeTableMeasures()
Get the size of the table of measures. |
Long[] |
getTableMeasures()
Get the table of value. |
String |
getVersions()
|
String |
getWarsDirectory()
Return the WebApps directory. |
void |
handleNotification(Notification notification,
Object handback)
Treat the notifications emitted by the JMX server. |
boolean |
isActivated()
Get monitoring activation. |
Boolean |
isEarDeployed(String fileName)
Test if the specified filename is already deployed or not. |
Boolean |
isJarDeployed(String fileName)
Test if the specified filename is already deployed or not. |
Boolean |
isRarDeployed(String fileName)
Test if the specified filename is already deployed or not. |
boolean |
isRarLoaded(String fileName)
Test if the specified filename is already deployed or not. |
Boolean |
isWarDeployed(String fileName)
Test if the specified filename is already deployed or not. |
void |
removeDeployedObject(String objectName)
Remove an object name to the deployedObjects list. |
String |
removeResource(String pObjectName)
Remove an object name from the resources list. |
void |
runGC()
Run the garbage collector. |
void |
setActivated(boolean pActivated)
set monitoring activation |
void |
setJonasBase(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(Object arg)
The measures timeout has expired Do not synchronize this method to avoid deadlocks! |
void |
unDeployEar(String fileName)
undeploy a J2EE application packaged in a EAR file. |
void |
unDeployJar(String fileName)
Uneploy a stand-alone J2EE module packaged in a JAR file. |
void |
unDeployRar(String fileName)
undeploy a J2EE application packaged in a RAR file |
void |
unDeployWar(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.reconfig.emitter.ReconfigEmitter |
---|
initLogger, sendReconfigNotification, sendSaveNotification |
Methods inherited from class javax.management.NotificationBroadcasterSupport |
---|
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public J2EEServer(String objectName, Server server, String serverName, String serverVersion, String serverVendor, String protocols, String versions)
objectName
- object name of the managed objectserver
- Server objectserverName
- server nameserverVersion
- JOnAS versionserverVendor
- is JOnASprotocols
- protocols supportedversions
- the modules versions cf. VERSIONS file contentMethod Detail |
---|
public String getServerName()
public String getServerVersion()
public String getServerVendor()
public String getJonasBase()
public List getDeployedObjects()
public void addDeployedObject(String objectName)
deployedObjects
list.
objectName
- Object name corresponding to a J2EEDeployedObject MBeanpublic void removeDeployedObject(String objectName)
deployedObjects
list.
objectName
- Object name corresponding to a J2EEDeployedObject MBeanpublic List getResources()
public List getJavaVMs()
public void addJavaVM(String objectName)
javaVMs
list.
objectName
- Object name correspondig to a JVM MBeanpublic String getProtocols()
public String getVersions()
public long getCurrentUsedMemory()
public long getCurrentTotalMemory()
public int getRange()
public int getSizeTableMeasures()
public Long[] getTableMeasures()
public boolean isActivated()
public void stop() throws Exception
Exception
public void runGC()
public void setJonasBase(String jonasBase)
jonasBase
- JONAS_BASE environment propertypublic void setRange(int range)
range
- range for free memory measurementpublic void setSizeTableMeasures(int sizeMeasuresTable)
sizeMeasuresTable
- Number of measurespublic void timeoutExpired(Object arg)
timeoutExpired
in interface TimerEventListener
arg
- Objectpublic void setActivated(boolean pActivated)
pActivated
- true is activatedpublic String deployJar(String fileName) throws Exception
fileName
- the file name of the JAR to be be deployed.
Exception
- Management operation could not be executed or failedpublic Boolean isJarDeployed(String fileName) throws Exception
fileName
- the name of the jar file.
Exception
- Management operation could not be executedpublic void unDeployJar(String fileName) throws Exception
fileName
- the file name of the JAR to be be undeployed.
Exception
- Management operation could not be executed or failedpublic List getDeployedJars() throws Exception
Exception
public List getDeployableJars() throws Exception
Exception
public String getJarsDirectory() throws Exception
Exception
public Boolean isWarDeployed(String fileName) throws Exception
fileName
- the name of the war file.
Exception
- Management operation could not be executedpublic void deployWar(String fileName) throws Exception
fileName
- the file name of the WAR to be be deployed.
Exception
- Management operation could not be executed or failedpublic void unDeployWar(String fileName) throws Exception
fileName
- the file name of the WAR to be be undeployed.
Exception
- Management operation could not be executed or failedpublic List getDeployableWars() throws Exception
Exception
- if the deployable wars can't be returnedpublic List getDeployedWars() throws Exception
Exception
- if the deployed wars can't be returnedpublic String getWarsDirectory() throws Exception
Exception
- if the webapps directory can't be returnedpublic String deployEar(String fileName) throws Exception
fileName
- the file name of the EAR to be be deployed.
Exception
- Management operation could not be executed or failedpublic Boolean isEarDeployed(String fileName) throws Exception
fileName
- the name of the ear file.
Exception
- Management operation could not be executed or failedpublic void unDeployEar(String fileName) throws Exception
fileName
- the file name of the EAR to be be undeployed.
Exception
- Management operation could not be executed or failedpublic String getAppsDirectory() throws Exception
Exception
public List getDeployedEars() throws Exception
Exception
- if the list of deployed ears can't be returnedpublic List getDeployableEars() throws Exception
Exception
- if the list of deployable ears can't be returnedpublic String deployRar(String fileName) throws Exception
fileName
- the file name of the RAR to be be deployed.
Exception
- Management operation could not be executed or failedpublic Boolean isRarDeployed(String fileName) throws Exception
fileName
- the name of the rar file.
Exception
- Management operation could not be executed or failedpublic void unDeployRar(String fileName) throws Exception
fileName
- the file name of the RAR to be be undeployed.
Exception
- Management operation could not be executed or failedpublic boolean isRarLoaded(String fileName) throws Exception
fileName
- the name of the rar file.
Exception
public List getDeployableRars() throws Exception
Exception
- if error retrieving the listpublic List getDeployedRars() throws Exception
Exception
- if error retrieving the listpublic String getRarsDirectory() throws Exception
Exception
public void addResource(String pObjectName)
resources
list.
pObjectName
- Object name correspondig to a J2EEResource MBeanpublic String removeResource(String pObjectName)
resources
list.
pObjectName
- Object name correspondig to a J2EEResource MBean
public void handleNotification(Notification notification, Object handback)
handleNotification
in interface NotificationListener
notification
- received notificationhandback
- received handback object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |