|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.jonas.lib.jmbeans.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.jmbeans.J2EEManagedObject |
|---|
J2EE_TYPE_APPLICATION, J2EE_TYPE_SERVER, NAME |
| Constructor Summary | |
|---|---|
J2EEServer(String objectName)
MBean constructor. |
|
J2EEServer(String objectName,
boolean stateManageable,
boolean statisticsProvider,
boolean eventProvider,
org.osgi.framework.BundleContext bc)
MBean constructor. |
|
| Method Summary | |
|---|---|
void |
addJavaVM(String objectName)
Add an object name to the javaVMs list. |
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()
|
ArrayList<String> |
getDeployedObjects()
|
ArrayList<String> |
getDeployedRars()
|
ArrayList<String> |
getDeployedWars()
|
String |
getDomainName()
|
String[] |
getEventTypes()
|
String[] |
getJavaVMs()
|
String |
getJonasBase()
|
String |
getJonasRoot()
|
String |
getJvmInfos()
|
String |
getProtocols()
|
int |
getRange()
|
ArrayList<String> |
getResources()
|
String |
getServerName()
|
String |
getServerVendor()
|
String |
getServerVersion()
|
String |
getServiceDescription(String service)
|
String[] |
getServices()
|
String |
getServiceState(String service)
|
int |
getSizeTableMeasures()
|
long |
getStartTime()
|
org.ow2.jonas.lib.management.javaee.J2EEState |
getState()
|
Long[] |
getTableMeasures()
|
org.ow2.jonas.lib.timer.TimerManager |
getTimerManager()
|
org.ow2.jonas.versioning.VersioningService |
getVersioningService()
|
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 |
setActivated(boolean activated)
Set memory monitoring activation. |
void |
setAllProperties(org.ow2.jonas.properties.ServerProperties allProperties)
|
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)
|
protected void |
setDepmonitoringRunning(org.osgi.framework.ServiceReference reference)
|
void |
setDirectories(String dirs)
|
void |
setDomainName(String domainName)
Set the domain name. |
protected void |
setFailed()
|
void |
setJonasBase(String jonasBase)
Used by the J2EEServer creator (MBeansRegistration). |
void |
setJonasRoot(String jonasRoot)
Used by the J2EEServer creator (MBeansRegistration). |
void |
setProtocols(String protocols)
|
void |
setRange(int range)
|
protected void |
setRunning()
|
void |
setServerName(String serverName)
|
void |
setServerVendor(String serverVendor)
|
void |
setServerVersion(String serverVersion)
|
void |
setServiceManager(ServiceManager serviceManager)
|
protected void |
setServicesRunning()
|
void |
setSizeTableMeasures(int sizeTableMeasures)
|
protected void |
setStarting()
|
protected void |
setStopped()
|
protected void |
setStopping()
|
void |
setTimerManager(org.ow2.jonas.lib.timer.TimerManager timerManager)
|
void |
setVersioningService(org.ow2.jonas.versioning.VersioningService versioningService)
|
void |
setVersions(String versions)
|
void |
start()
Start the server by starting all the non-mandatory services. |
void |
startRecursive()
|
void |
stop()
Stop the server by stopping all the non-mandatory services. |
void |
undeploy(String fileName)
Undeploy a file from a local deployer. |
void |
unsetVersioningService()
Sets the versioning service to null. |
String |
wsgenLocalFile(String pathname,
Boolean unpacked)
Apply WsGen on a local file and generate webservices artifacts |
| Methods inherited from class org.ow2.jonas.lib.jmbeans.J2EEManagedObject |
|---|
getObjectName, isEventProvider, isStateManageable, isStatisticsProvider, sendNotification, sendReconfigNotification, sendSaveNotification, setModelMBean |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public J2EEServer(String objectName)
objectName - object name of the managed object
public J2EEServer(String objectName,
boolean stateManageable,
boolean statisticsProvider,
boolean eventProvider,
org.osgi.framework.BundleContext bc)
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| Method Detail |
|---|
public String[] getEventTypes()
public org.ow2.jonas.lib.management.javaee.J2EEState getState()
public boolean isStarting()
public boolean isRunning()
public boolean isFailed()
public boolean isStopping()
public boolean isStopped()
public long getStartTime()
public String getServerVendor()
public void setServerVendor(String serverVendor)
public String getServerVersion()
public void setServerVersion(String serverVersion)
public String getServerName()
public void setServerName(String serverName)
public String getJonasBase()
public void setJonasBase(String jonasBase)
jonasBase - JONAS_BASE to be setpublic String getJonasRoot()
public void setJonasRoot(String jonasRoot)
jonasRoot - JONAS_ROOT to be setpublic String getProtocols()
public void setProtocols(String protocols)
public String getVersions()
public void setVersions(String versions)
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 ArrayList<String> getResources()
public ArrayList<String> getDeployedObjects()
public String getDomainName()
public void setDomainName(String domainName)
domainName - The current domain namepublic String[] getJavaVMs()
public void addJavaVM(String objectName)
javaVMs list.
objectName - Object name corresponding to a JVM MBeanpublic void setVersioningService(org.ow2.jonas.versioning.VersioningService versioningService)
versioningService - The versioning service to set.public void unsetVersioningService()
public org.ow2.jonas.versioning.VersioningService getVersioningService()
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 MBeanRegistrationExceptionprotected void setServicesRunning()
protected void setDepmonitoringRunning(org.osgi.framework.ServiceReference reference)
protected void setStarting()
protected void setRunning()
protected void setStopping()
protected void setStopped()
protected void setFailed()
public 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 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 setAllProperties(org.ow2.jonas.properties.ServerProperties allProperties)
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 void setServiceManager(ServiceManager serviceManager)
public String[] getServices()
public String getServiceDescription(String service)
public String getServiceState(String service)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||