org.ow2.jonas.lib.jmbeans
Class J2EEServerMBean

java.lang.Object
  extended by org.apache.commons.modeler.BaseModelMBean
      extended by org.ow2.jonas.lib.jmbeans.J2EEServerMBean
All Implemented Interfaces:
DynamicMBean, MBeanRegistration, ModelMBean, ModelMBeanNotificationBroadcaster, NotificationBroadcaster, PersistentMBean

public class J2EEServerMBean
extends org.apache.commons.modeler.BaseModelMBean

J2EEServer MBean implementation.

Author:
Adriana.Danes@bull.net

Field Summary
 
Fields inherited from class org.apache.commons.modeler.BaseModelMBean
attributeBroadcaster, attributes, generalBroadcaster, info, oname, registry, resource, resourceType, source
 
Constructor Summary
J2EEServerMBean()
           
 
Method Summary
 String[] getDeployedObjects()
          Implement deployedObjects attribute cf.
 String[] getResources()
          Implement resources attribute.
 String[] getServices()
          Implement services attribute.
 String getServiceState(String service)
          Return the state of a given service.
 String getState()
          Implement the state attribute.
 
Methods inherited from class org.apache.commons.modeler.BaseModelMBean
addAttributeChangeNotificationListener, addNotificationListener, createDefaultModelMBeanInfo, createResource, getAttribute, getAttributes, getClassName, getJmxName, getManagedResource, getMBeanInfo, getModelerType, getNotificationInfo, getObjectName, getRegistry, initModelInfo, invoke, isModelMBeanInfoValid, load, postDeregister, postRegister, preDeregister, preRegister, removeAttributeChangeNotificationListener, removeAttributeChangeNotificationListener, removeNotificationListener, removeNotificationListener, removeNotificationListener, sendAttributeChangeNotification, sendAttributeChangeNotification, sendNotification, sendNotification, setAttribute, setAttributes, setManagedResource, setModeledType, setModelMBeanInfo, setRegistry, store, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

J2EEServerMBean

public J2EEServerMBean()
                throws MBeanException,
                       RuntimeOperationsException
Throws:
MBeanException
RuntimeOperationsException
Method Detail

getState

public String getState()
                throws InstanceNotFoundException,
                       RuntimeOperationsException,
                       MBeanException,
                       InvalidTargetObjectTypeException
Implement the state attribute.

Returns:
the current server's state
Throws:
InstanceNotFoundException
RuntimeOperationsException
MBeanException
InvalidTargetObjectTypeException

getResources

public String[] getResources()
                      throws InstanceNotFoundException,
                             RuntimeOperationsException,
                             MBeanException,
                             InvalidTargetObjectTypeException
Implement resources attribute.

Returns:
the list of J2EEResource names in the current server
Throws:
InstanceNotFoundException
RuntimeOperationsException
MBeanException
InvalidTargetObjectTypeException

getServices

public String[] getServices()
                     throws InstanceNotFoundException,
                            RuntimeOperationsException,
                            MBeanException,
                            InvalidTargetObjectTypeException
Implement services attribute.

Returns:
Throws:
InstanceNotFoundException
RuntimeOperationsException
MBeanException
InvalidTargetObjectTypeException

getDeployedObjects

public String[] getDeployedObjects()
                            throws InstanceNotFoundException,
                                   RuntimeOperationsException,
                                   MBeanException,
                                   InvalidTargetObjectTypeException
Implement deployedObjects attribute cf. to JSR77 requirements.

Returns:
Array of OBJECT_NAMEs corresponding to all the deployed modules and apps.
Throws:
InstanceNotFoundException
RuntimeOperationsException
MBeanException
InvalidTargetObjectTypeException

getServiceState

public String getServiceState(String service)
                       throws InstanceNotFoundException,
                              RuntimeOperationsException,
                              MBeanException,
                              InvalidTargetObjectTypeException
Return the state of a given service.

Parameters:
service - name
Returns:
The service state
Throws:
InstanceNotFoundException
RuntimeOperationsException
MBeanException
InvalidTargetObjectTypeException
InvalidTargetObjectTypeExceptio


Copyright © 2010 OW2 Consortium. All Rights Reserved.