|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ow2.jonas.ee.mejb.ManagementBean
@RolesAllowed(value={"mejb-admin","mejb-user"}) public class ManagementBean
This is the Management EJB implementation for JOnAS. A MEJB instance is created and deployed at JOnAS start time. It is registered in the ejb/mgmt naming subcontext. The current implementation allows access to managed resources registered in the current (local) MBean server via the standard management methods defined in the javax.management.j2ee.Management interface.
Constructor Summary | |
---|---|
ManagementBean()
|
Method Summary | |
---|---|
Object |
getAttribute(ObjectName name,
String attribute)
Gets the value of a specific attribute of a named managed object. |
AttributeList |
getAttributes(ObjectName name,
String[] attributes)
Enables the values of several attributes of a named managed object. |
String |
getDefaultDomain()
Returns the default domain name of this MEJB. |
ListenerRegistration |
getListenerRegistry()
Returns the listener registry implementation for this MEJB. |
Integer |
getMBeanCount()
Returns the number of managed objects registered in the MEJB. |
MBeanInfo |
getMBeanInfo(ObjectName name)
This method discovers the attributes and operations that a managed object exposes for management. |
void |
init()
Get the MBeanServer local reference. |
Object |
invoke(ObjectName name,
String operationName,
Object[] params,
String[] signature)
Invokes an operation on a managed object. |
boolean |
isRegistered(ObjectName name)
Checks whether a managed object, identified by its object name, is already registered with the MEJB. |
Set |
queryNames(ObjectName name,
QueryExp query)
Gets the names of managed objects controlled by the MEJB. |
void |
setAttribute(ObjectName name,
Attribute attribute)
Sets the value of a specific attribute of a named managed object. |
AttributeList |
setAttributes(ObjectName name,
AttributeList attributes)
Sets the values of several attributes of a named managed object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ManagementBean()
Method Detail |
---|
@PostConstruct public void init()
public Object getAttribute(ObjectName name, String attribute) throws MBeanException, AttributeNotFoundException, InstanceNotFoundException, ReflectionException
name
- The object name of the managed object from which the
attribute is to be retrieved.attribute
- A String specifying the name of the attribute
to be retrieved.
MBeanException
- Wraps an exception thrown by the managed
object's getter.
AttributeNotFoundException
- The attribute specified is
not accessible in the managed object.
InstanceNotFoundException
- The managed object specified is
not registered in the MEJB.
ReflectionException
- An exception occurred when trying to
invoke the getAttribute method of a Dynamic MBeanpublic AttributeList getAttributes(ObjectName name, String[] attributes) throws InstanceNotFoundException, ReflectionException
name
- The object name of the managed object from which
the attributes are retrieved.attributes
- A list of the attributes to be retrieved.
InstanceNotFoundException
- The managed object specified is
not registered in the MEJB.
ReflectionException
- An exception occurred when trying to
invoke the getAttributes method of a Dynamic MBean.public String getDefaultDomain()
public Integer getMBeanCount()
public MBeanInfo getMBeanInfo(ObjectName name) throws IntrospectionException, InstanceNotFoundException, ReflectionException
name
- The name of the managed object to analyze
MBeanInfo
allowing the retrieval of
all attributes and operations of this managed object.
IntrospectionException
- An exception occurs during introspection.
InstanceNotFoundException
- The managed object specified is
not found.
ReflectionException
- An exception occurred when trying to
perform reflection on a managed object@RolesAllowed(value="mejb-admin") public Object invoke(ObjectName name, String operationName, Object[] params, String[] signature) throws MBeanException, InstanceNotFoundException, ReflectionException
name
- The object name of the managed object on which the
method is to be invoked.operationName
- The name of the operation to be invoked.params
- An array containing the parameters to be set
when the operation is invokedsignature
- An array containing the signature of the operation.
The class objects will be loaded using the same class loader
as the one used for loading the managed object on which the
operation was invoked.
InstanceNotFoundException
- The managed object specified is not
registered in the MEJB.
MBeanException
- Wraps an exception thrown by the managed
object's invoked method.
ReflectionException
- Wraps a Exception
thrown while
trying to invoke the method.public boolean isRegistered(ObjectName name)
name
- The object name of the managed object to be checked.
public Set queryNames(ObjectName name, QueryExp query)
ObjectName
, a specific managed object name
(equivalent to testing whether a managed object is registered). When
the object name is null or no domain and key properties are specified,
all objects are selected. It returns the set of J2EEObjectNames for
the managed objects selected.
name
- The object name pattern identifying the managed objects to
be retrieved. If null or no domain and key properties are
specified, all the managed objects registered will be retrieved.query
- a relational constraints for results filtering
@RolesAllowed(value="mejb-admin") public void setAttribute(ObjectName name, Attribute attribute) throws MBeanException, AttributeNotFoundException, InstanceNotFoundException, InvalidAttributeValueException, ReflectionException
name
- The name of the managed object within which the
attribute is to be set.attribute
- The identification of the attribute to be set
and the value it is to be set to.
InstanceNotFoundException
- The managed object specified
is not registered in the MEJB.
AttributeNotFoundException
- The attribute specified is
not accessible in the managed object.
InvalidAttributeValueException
- The value specified for
the attribute is not valid.
MBeanException
- Wraps an exception thrown by the managed
object's setter.
ReflectionException
- An exception occurred when trying
to invoke the setAttribute method of a Dynamic MBean.@RolesAllowed(value="mejb-admin") public AttributeList setAttributes(ObjectName name, AttributeList attributes) throws InstanceNotFoundException, ReflectionException
name
- The object name of the managed object within
which the attributes are to be set.attributes
- A list of attributes: The identification
of the attributes to be set and the values they are
to be set to.
InstanceNotFoundException
- The managed object specified
is not registered in the MEJB.
ReflectionException
- An exception occurred when trying
to invoke the setAttributes method of a Dynamic MBean.public ListenerRegistration getListenerRegistry()
ListenerRegistration
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |