|
||||||||||
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.jmbeans.J2EEServer
public class J2EEServer
The JSR77 J2EEServer MBean implementation. Implement the StateManagement and Events specified in the JSR77.
Field Summary | |
---|---|
static String |
DEPL_EXTENSION
file extension containing a deployment plan |
Fields inherited from class org.ow2.jonas.lib.management.javaee.J2EEManagedObject |
---|
J2EE_TYPE_APPLICATION, J2EE_TYPE_SERVER, NAME |
Constructor Summary | |
---|---|
J2EEServer()
MBean constructor. |
Method Summary | |
---|---|
void |
addJavaVM(String objectName)
Add an object name to the javaVMs list. |
void |
bindVersioningService(VersioningService versioningService)
|
void |
deploy(String fileName)
Deploy a file to a local deployer. |
String |
distribute(String fileName,
byte[] fileContent)
Dump the given bytes to a local file and then return the path to this file. |
Properties |
getConfigFileEnv()
|
long |
getCurrentTotalMemory()
|
long |
getCurrentUsedMemory()
|
protected org.ow2.util.ee.deploy.api.deployable.IDeployable |
getDeployable(String fileName)
Convert a ready to deploy file to a deployable object. |
ArrayList<String> |
getDeployableEars()
|
ArrayList<String> |
getDeployableFiles()
|
ArrayList<String> |
getDeployableJars()
|
ArrayList<String> |
getDeployableRars()
|
ArrayList<String> |
getDeployableWars()
|
ArrayList<String> |
getDeployedEars()
|
ArrayList<String> |
getDeployedFiles()
|
ArrayList<String> |
getDeployedJars()
|
List<String> |
getDeployedObjects()
|
ArrayList<String> |
getDeployedRars()
|
ArrayList<String> |
getDeployedWars()
|
String |
getDomainName()
|
String[] |
getEventTypes()
|
String[] |
getJavaVMs()
|
String |
getJonasBase()
|
String |
getJonasRoot()
|
String |
getJvmInfos()
|
String |
getProtocols()
|
int |
getRange()
|
List<String> |
getResources()
|
String |
getServerName()
|
String |
getServerVendor()
|
String |
getServerVersion()
|
String |
getServiceDescription(String service)
Get a service description. |
List<String> |
getServices()
Return the all the services names, whatever their state is. |
String |
getServiceState(String service)
Get a service state. |
int |
getSizeTableMeasures()
|
long |
getStartTime()
|
J2EEServerState |
getState()
|
Long[] |
getTableMeasures()
|
String |
getThreadStackDump()
Return a JVM thread stack dump. |
TabularData |
getThreadStackDumpList()
Return a TabularData containing a JVM thread stack dump. |
TimerManager |
getTimerManager()
|
String |
getUploadDirectory()
Get the directory in which J2EEServer uploads files |
String |
getVersions()
|
void |
halt()
Halt the server. |
void |
handleNotification(Notification notification,
Object handback)
Treat JMX notifications. |
boolean |
isActivated()
|
boolean |
isDeployed(String fileName)
|
boolean |
isFailed()
Is the server FAILED. |
boolean |
isRunning()
Is the server RUNNING. |
boolean |
isStarting()
Is the server STARTING. |
boolean |
isStopped()
Is the server STOPPED. |
boolean |
isStopping()
Is the server STOPPING. |
void |
logThreadStackDump()
Log a JVM thread stack dump in JOnAS log file (level : info). |
void |
postDeregister()
|
void |
postRegister(Boolean registrationDone)
After registering, add myself as listener to notifications emitted by: - the MBeanServerDelegate (to receive JMX registration/un-registration notifications). |
void |
preDeregister()
|
ObjectName |
preRegister(MBeanServer server,
ObjectName name)
|
void |
printThreadStackDump(String filename)
Print a JVM thread stack dump in a given file. |
boolean |
removeModuleFile(String fileName)
Remove a specified J2EE module |
void |
runGC()
|
String |
sendFile(byte[] fileContent,
String fileName,
boolean replaceExisting)
|
void |
setActivated(boolean activated)
Set memory monitoring activation. |
void |
setArchiveManager(org.ow2.util.archive.api.IArchiveManager archiveManager)
|
void |
setConfigManager(ConfigurationManager configManager)
|
void |
setDeployerManager(org.ow2.util.ee.deploy.api.deployer.IDeployerManager deployerManager)
|
void |
setEasyBeansService(IEasyBeansService easyBeansService)
|
void |
setFailed()
Set the server state to FAILED and perform a notification. |
void |
setRange(int range)
|
void |
setRegistryService(RegistryService registryService)
|
void |
setRepositoryManager(org.ow2.util.plan.repository.api.IRepositoryManager repositoryManager)
Set the repository manager used by this service. |
void |
setRunning()
Set the server state to RUNNING and perform a notification. |
void |
setServerProperties(ServerProperties serverProperties)
|
void |
setServiceManager(ServiceManager serviceManager)
|
void |
setSizeTableMeasures(int sizeTableMeasures)
|
void |
setStarting()
Set the server state to STARTING and perform a notification. |
void |
setStopped()
Set the server state to STOPPED and perform a notification. |
void |
setStopping()
Set the server state to STOPPING and perform a notification. |
void |
setTimerManager(TimerManager timerManager)
|
void |
start()
Start the server by starting all the non-mandatory services. |
void |
start(boolean standby)
Start the server by starting all the non-mandatory services. |
void |
startJ2EEServer()
|
void |
startRecursive(boolean standby)
Start recursive. |
void |
startService(String service)
Start a service. |
void |
stop()
Stop the server by stopping all the non-mandatory services. |
void |
stopService(String service)
Stop a service. |
void |
unbindVersioningService()
Sets the versioning service to null. |
void |
undeploy(String fileName)
Undeploy a file from a local deployer. |
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 |
Field Detail |
---|
public static final String DEPL_EXTENSION
Constructor Detail |
---|
public J2EEServer()
Method Detail |
---|
public void startJ2EEServer() throws Exception
Exception
public String[] getEventTypes()
public long getStartTime()
public String getServerVendor()
public String getServerVersion()
public String getServerName()
public String getJonasBase()
public String getJonasRoot()
public String getProtocols()
public String getVersions()
public boolean isActivated()
public void setActivated(boolean activated)
activated
- public long getCurrentUsedMemory()
public long getCurrentTotalMemory()
public int getRange()
public void setRange(int range)
public int getSizeTableMeasures()
public void setSizeTableMeasures(int sizeTableMeasures)
public Long[] getTableMeasures()
public List<String> getResources()
public List<String> getDeployedObjects()
public String getDomainName()
public String[] getJavaVMs()
public void addJavaVM(String objectName)
javaVMs
list.
objectName
- Object name corresponding to a JVM MBeanpublic void bindVersioningService(VersioningService versioningService)
versioningService
- The versioning service to set.public void unbindVersioningService()
public void start() throws Exception
Exception
public void start(boolean standby) throws Exception
standby
- true
to activate standby mode.
Exception
- any.public void startRecursive(boolean standby) throws Exception
standby
- true
to activate standby mode.
Exception
- any.public void stop() throws Exception
Exception
public void halt() throws Exception
Exception
public void handleNotification(Notification notification, Object handback)
handleNotification
in interface NotificationListener
notification
- received notificationhandback
- hand back objectpublic void postDeregister()
postDeregister
in interface MBeanRegistration
public void postRegister(Boolean registrationDone)
postRegister
in interface MBeanRegistration
public void preDeregister() throws Exception
preDeregister
in interface MBeanRegistration
Exception
public ObjectName preRegister(MBeanServer server, ObjectName name) throws Exception
preRegister
in interface MBeanRegistration
Exception
public void setStarting()
J2EEServerService
setStarting
in interface J2EEServerService
public void setRunning()
J2EEServerService
setRunning
in interface J2EEServerService
public void setStopping()
J2EEServerService
setStopping
in interface J2EEServerService
public void setStopped()
J2EEServerService
setStopped
in interface J2EEServerService
public void setFailed()
J2EEServerService
setFailed
in interface J2EEServerService
public J2EEServerState getState()
public boolean isStarting()
J2EEServerService
isStarting
in interface J2EEServerService
public boolean isRunning()
J2EEServerService
isRunning
in interface J2EEServerService
public boolean isFailed()
J2EEServerService
isFailed
in interface J2EEServerService
public boolean isStopping()
J2EEServerService
isStopping
in interface J2EEServerService
public boolean isStopped()
J2EEServerService
isStopped
in interface J2EEServerService
public void setDeployerManager(org.ow2.util.ee.deploy.api.deployer.IDeployerManager deployerManager)
deployerManager
- reference to the deployerManagerpublic void setRepositoryManager(org.ow2.util.plan.repository.api.IRepositoryManager repositoryManager)
repositoryManager
- the new repository manager.public void setArchiveManager(org.ow2.util.archive.api.IArchiveManager archiveManager)
archiveManager
- reference to the archiveManagerpublic void setServiceManager(ServiceManager serviceManager)
serviceManager
- reference to the serviceManagerpublic void deploy(String fileName)
fileName
- the name of the file to deploypublic void undeploy(String fileName)
fileName
- the name of the file to undeployprotected org.ow2.util.ee.deploy.api.deployable.IDeployable getDeployable(String fileName)
fileName
- the name of the file
public boolean isDeployed(String fileName) throws Exception
Exception
public String getJvmInfos()
public void runGC() throws RemoteException
RemoteException
public Properties getConfigFileEnv()
public void setConfigManager(ConfigurationManager configManager)
public TimerManager getTimerManager()
public void setTimerManager(TimerManager timerManager)
public void setServerProperties(ServerProperties serverProperties)
public void setRegistryService(RegistryService registryService)
public void setEasyBeansService(IEasyBeansService easyBeansService)
public ArrayList<String> getDeployableFiles()
public ArrayList<String> getDeployableJars()
public ArrayList<String> getDeployableEars()
public ArrayList<String> getDeployableWars()
public ArrayList<String> getDeployableRars()
public ArrayList<String> getDeployedWars() throws Exception
NullPointerException
MalformedObjectNameException
ReflectionException
MBeanException
InstanceNotFoundException
AttributeNotFoundException
Exception
public ArrayList<String> getDeployedJars() throws Exception
Exception
public ArrayList<String> getDeployedRars() throws Exception
Exception
public ArrayList<String> getDeployedEars() throws Exception
Exception
public ArrayList<String> getDeployedFiles() throws Exception
Exception
public String sendFile(byte[] fileContent, String fileName, boolean replaceExisting) throws Exception
Exception
public String distribute(String fileName, byte[] fileContent) throws Exception
fileName
- the name of the file to distributefileContent
- the content of the given file
Exception
public boolean removeModuleFile(String fileName) throws Exception
fileName
- Name of file to remove
Exception
- if remove failspublic String getUploadDirectory()
getUploadDirectory
in interface J2EEServerService
public List<String> getServices()
public String getServiceDescription(String service)
service
- the service name.
public String getServiceState(String service)
service
- the service name.
public void startService(String service) throws Exception
service
- the service name.
Exception
- If the startup of the service failspublic void stopService(String service) throws Exception
service
- the service name.
Exception
- If the stop of the service failspublic String getThreadStackDump()
public void printThreadStackDump(String filename)
filename
- the file namepublic void logThreadStackDump()
public TabularData getThreadStackDumpList()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |