|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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 |
|---|
| 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(org.ow2.jonas.versioning.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()
|
org.ow2.jonas.lib.management.javaee.J2EEServerState |
getState()
|
Long[] |
getTableMeasures()
|
org.ow2.jonas.lib.timer.TimerManager |
getTimerManager()
|
String |
getVersions()
|
void |
halt()
Halt the server. |
void |
handleNotification(Notification notification,
Object handback)
Treat JMX notifications. |
void |
initRepositoryDirs()
The repositoryDirs must contain at least the 'deploy' directory. |
boolean |
isActivated()
|
boolean |
isDeployed(String fileName)
|
boolean |
isFailed()
|
boolean |
isRunning()
|
boolean |
isStarting()
|
boolean |
isStopped()
|
boolean |
isStopping()
|
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)
|
boolean |
removeModuleFile(String fileName)
Remove a specified J2EE module |
void |
runGC()
|
String |
sendFile(byte[] fileContent,
String fileName,
boolean replaceExisting)
|
void |
setArchiveManager(org.ow2.util.archive.api.IArchiveManager archiveManager)
|
void |
setConfigManager(org.ow2.jonas.configuration.ConfigurationManager configManager)
|
void |
setDeployerManager(org.ow2.util.ee.deploy.api.deployer.IDeployerManager deployerManager)
|
void |
setDirectories(String dirs)
|
void |
setEasyBeansService(org.ow2.jonas.ejb3.IEasyBeansService easyBeansService)
|
void |
setFailed()
|
void |
setRange(int range)
|
void |
setRegistryService(org.ow2.jonas.registry.RegistryService registryService)
|
void |
setRunning()
|
void |
setServerProperties(org.ow2.jonas.properties.ServerProperties serverProperties)
|
void |
setServiceManager(org.ow2.jonas.management.ServiceManager serviceManager)
|
void |
setSizeTableMeasures(int sizeTableMeasures)
|
void |
setStarting()
|
void |
setStopped()
|
void |
setStopping()
|
void |
setTimerManager(org.ow2.jonas.lib.timer.TimerManager timerManager)
|
void |
start()
Start the server by starting all the non-mandatory services. |
void |
startJ2EEServer()
|
void |
startRecursive()
|
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. |
String |
wsgenLocalFile(String pathname,
Boolean unpacked)
Apply WsGen on a local file and generate webservices artifacts. |
| Methods inherited from class org.ow2.jonas.lib.management.javaee.J2EEManagedObject |
|---|
getObjectName, isEventProvider, isStateManageable, isStatisticsProvider, sendNotification, sendReconfigNotification, sendSaveNotification, setEventProvider, setModelMBean, setObjectName, setStateManageable, setStatisticsProvider |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public J2EEServer()
| Method Detail |
|---|
public void startJ2EEServer()
throws Exception
Exceptionpublic 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 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(org.ow2.jonas.versioning.VersioningService versioningService)
versioningService - The versioning service to set.public void unbindVersioningService()
public void start()
throws Exception
Exception
public void startRecursive()
throws Exception
Exception
public void stop()
throws Exception
Exception
public void halt()
throws Exception
Exception
public void handleNotification(Notification notification,
Object handback)
handleNotification in interface NotificationListenernotification - received notificationhandback - hand back objectpublic void postDeregister()
postDeregister in interface MBeanRegistrationpublic void postRegister(Boolean registrationDone)
postRegister in interface MBeanRegistration
public void preDeregister()
throws Exception
preDeregister in interface MBeanRegistrationException
public ObjectName preRegister(MBeanServer server,
ObjectName name)
throws Exception
preRegister in interface MBeanRegistrationExceptionpublic void setStarting()
setStarting in interface org.ow2.jonas.management.J2EEServerServicepublic void setRunning()
setRunning in interface org.ow2.jonas.management.J2EEServerServicepublic void setStopping()
setStopping in interface org.ow2.jonas.management.J2EEServerServicepublic void setStopped()
setStopped in interface org.ow2.jonas.management.J2EEServerServicepublic void setFailed()
setFailed in interface org.ow2.jonas.management.J2EEServerServicepublic org.ow2.jonas.lib.management.javaee.J2EEServerState getState()
public boolean isStarting()
isStarting in interface org.ow2.jonas.management.J2EEServerServicepublic boolean isRunning()
isRunning in interface org.ow2.jonas.management.J2EEServerServicepublic boolean isFailed()
isFailed in interface org.ow2.jonas.management.J2EEServerServicepublic boolean isStopping()
isStopping in interface org.ow2.jonas.management.J2EEServerServicepublic boolean isStopped()
isStopped in interface org.ow2.jonas.management.J2EEServerServicepublic void setDeployerManager(org.ow2.util.ee.deploy.api.deployer.IDeployerManager deployerManager)
deployerManager - reference to the deployerManagerpublic void setArchiveManager(org.ow2.util.archive.api.IArchiveManager archiveManager)
archiveManager - reference to the archiveManagerpublic void setServiceManager(org.ow2.jonas.management.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
Exceptionpublic String getJvmInfos()
public void runGC()
throws RemoteException
RemoteExceptionpublic Properties getConfigFileEnv()
public void setConfigManager(org.ow2.jonas.configuration.ConfigurationManager configManager)
public org.ow2.jonas.lib.timer.TimerManager getTimerManager()
public void setTimerManager(org.ow2.jonas.lib.timer.TimerManager timerManager)
public void setServerProperties(org.ow2.jonas.properties.ServerProperties serverProperties)
public void setRegistryService(org.ow2.jonas.registry.RegistryService registryService)
public void setEasyBeansService(org.ow2.jonas.ejb3.IEasyBeansService easyBeansService)
public void initRepositoryDirs()
public void setDirectories(String dirs)
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 fails
public String wsgenLocalFile(String pathname,
Boolean unpacked)
pathname - : local path name to the componentunpacked - true if we want to have an unpacked directory as result
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)
service - the service name.public void stopService(String service)
service - the service name.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||