|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.jonas.mejb.ManagementBean
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. It also allows access to managed resources registered in remote MBean servers which belong to the current management domain, via management methods exposed as a WebService endpoint (defined in the ManagementEndpoint interface).
Constructor Summary | |
---|---|
ManagementBean()
|
Method Summary | |
---|---|
void |
ejbActivate()
|
void |
ejbCreate()
ejbCreate method Get the MBeanServer reference to allow local access |
void |
ejbPassivate()
|
void |
ejbRemove()
|
Object |
getAttribute(ObjectName name,
String attribute)
|
Object |
getAttribute(String domainServerName,
ObjectName name,
String attribute)
|
String[] |
getAttribute(String domainServerName,
String objectName,
String attribute)
Returns the attribute value for an mbean on a server in the domain. |
AttributeList |
getAttributes(ObjectName name,
String[] attributes)
|
AttributeList |
getAttributes(String domainServerName,
ObjectName name,
String[] attributes)
|
String[] |
getAttributesList(String domainServerName,
String objectName)
Returns a list of attributes for a specified mbean on a server in the domain. |
String |
getDefaultDomain()
Returns the name of the current domain. |
String |
getDescription(String domainServerName,
String objectName)
Returns the description for an mbean on a server in the domain. |
ListenerRegistration |
getListenerRegistry()
Returns the ListenerRegistration implementation object which allows the client to register a event notification listener. |
Integer |
getMBeanCount()
|
Integer |
getMBeanCount(String domainServerName)
Returns the number of mbeans for a server in the domain. |
MBeanInfo |
getMBeanInfo(ObjectName name)
|
MBeanInfo |
getMBeanInfo(String domainServerName,
ObjectName name)
|
String[] |
getOperations(String domainServerName,
String objectName)
Returns the list of operations for an mbean on a server in the domain. |
String[] |
getServers()
Returns the names of the servers in the domain. |
Object |
invoke(ObjectName name,
String operationName,
Object[] params,
String[] signature)
|
Object |
invoke(String domainServerName,
ObjectName name,
String operationName,
Object[] params,
String[] signature)
|
String[] |
invoke(String domainServerName,
String objectName,
String operationName,
String[] params)
Invokes an mbean operation having String params on a server in the domain. |
boolean |
isRegistered(ObjectName name)
|
boolean |
isRegistered(String domainServerName,
ObjectName name)
|
boolean |
isRegistered(String domainServerName,
String objectName)
Returns True if the mbean is registered with the server in the domain, false otherwise. |
Set |
queryNames(ObjectName name,
QueryExp query)
|
Set |
queryNames(String domainServerName,
ObjectName name,
QueryExp query)
|
String[] |
queryNames(String domainServerName,
String objectName,
String query)
Returns the search results for mbeans on a server in the domain. |
void |
setAttribute(ObjectName name,
Attribute attribute)
|
void |
setAttribute(String domainServerName,
ObjectName name,
Attribute attribute)
|
AttributeList |
setAttributes(ObjectName name,
AttributeList attributes)
|
AttributeList |
setAttributes(String domainServerName,
ObjectName name,
AttributeList attributes)
|
void |
setSessionContext(SessionContext sessionContext)
Sets the associated session context. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ManagementBean()
Method Detail |
---|
public void ejbCreate() throws CreateException
CreateException
public void ejbActivate()
ejbActivate
in interface SessionBean
public void ejbPassivate()
ejbPassivate
in interface SessionBean
public void ejbRemove()
ejbRemove
in interface SessionBean
public void setSessionContext(SessionContext sessionContext)
setSessionContext
in interface SessionBean
sessionContext
- - A SessionContext interface for the instance.public Object getAttribute(ObjectName name, String attribute) throws MBeanException, AttributeNotFoundException, InstanceNotFoundException, ReflectionException, RemoteException
MBeanException
AttributeNotFoundException
InstanceNotFoundException
ReflectionException
RemoteException
public AttributeList getAttributes(ObjectName name, String[] attributes) throws InstanceNotFoundException, ReflectionException, RemoteException
InstanceNotFoundException
ReflectionException
RemoteException
public String getDefaultDomain() throws RemoteException
ManagementEndpoint
getDefaultDomain
in interface ManagementEndpoint
RemoteException
- If an error occurs communicating with the server.public Integer getMBeanCount() throws RemoteException
RemoteException
public MBeanInfo getMBeanInfo(ObjectName name) throws IntrospectionException, InstanceNotFoundException, ReflectionException, RemoteException
IntrospectionException
InstanceNotFoundException
ReflectionException
RemoteException
public Object invoke(ObjectName name, String operationName, Object[] params, String[] signature) throws MBeanException, InstanceNotFoundException, ReflectionException, RemoteException
MBeanException
InstanceNotFoundException
ReflectionException
RemoteException
public boolean isRegistered(ObjectName name) throws RemoteException
RemoteException
public Set queryNames(ObjectName name, QueryExp query) throws RemoteException
RemoteException
public void setAttribute(ObjectName name, Attribute attribute) throws MBeanException, AttributeNotFoundException, InstanceNotFoundException, InvalidAttributeValueException, ReflectionException, RemoteException
MBeanException
AttributeNotFoundException
InstanceNotFoundException
InvalidAttributeValueException
ReflectionException
RemoteException
public AttributeList setAttributes(ObjectName name, AttributeList attributes) throws InstanceNotFoundException, ReflectionException, RemoteException
InstanceNotFoundException
ReflectionException
RemoteException
public ListenerRegistration getListenerRegistry() throws RemoteException
null
is returned if
RemoteException
public Object getAttribute(String domainServerName, ObjectName name, String attribute) throws AttributeNotFoundException, InstanceNotFoundException, MBeanException, ReflectionException, RemoteException
AttributeNotFoundException
InstanceNotFoundException
MBeanException
ReflectionException
RemoteException
public AttributeList getAttributes(String domainServerName, ObjectName name, String[] attributes) throws InstanceNotFoundException, ReflectionException, RemoteException
InstanceNotFoundException
ReflectionException
RemoteException
public Integer getMBeanCount(String domainServerName) throws RemoteException
ManagementEndpoint
getMBeanCount
in interface ManagementEndpoint
domainServerName
- The name of the server in the domain.
RemoteException
- If an error occurs communicating with the server.public MBeanInfo getMBeanInfo(String domainServerName, ObjectName name) throws IntrospectionException, InstanceNotFoundException, ReflectionException, RemoteException
IntrospectionException
InstanceNotFoundException
ReflectionException
RemoteException
public Object invoke(String domainServerName, ObjectName name, String operationName, Object[] params, String[] signature) throws MBeanException, InstanceNotFoundException, ReflectionException, RemoteException
MBeanException
InstanceNotFoundException
ReflectionException
RemoteException
public boolean isRegistered(String domainServerName, ObjectName name) throws RemoteException
RemoteException
public Set queryNames(String domainServerName, ObjectName name, QueryExp query) throws RemoteException
RemoteException
public void setAttribute(String domainServerName, ObjectName name, Attribute attribute) throws MBeanException, AttributeNotFoundException, InstanceNotFoundException, InvalidAttributeValueException, ReflectionException, RemoteException
MBeanException
AttributeNotFoundException
InstanceNotFoundException
InvalidAttributeValueException
ReflectionException
RemoteException
public AttributeList setAttributes(String domainServerName, ObjectName name, AttributeList attributes) throws InstanceNotFoundException, ReflectionException, RemoteException
InstanceNotFoundException
ReflectionException
RemoteException
public String[] getServers() throws ManagementEndpointException, RemoteException
getServers
in interface ManagementEndpoint
ManagementEndpointException
- If any errors occur.
RemoteException
- If a connection error occurs.public String[] getAttribute(String domainServerName, String objectName, String attribute) throws ManagementEndpointException
ManagementEndpoint
getAttribute
in interface ManagementEndpoint
domainServerName
- The name of the server in the domain.objectName
- The objectname of the mbean.attribute
- The attribute to be returned.
ManagementEndpointException
- If any error occurs with getAttribute.ManagementEndpoint.getAttribute(String, String, String)
public boolean isRegistered(String domainServerName, String objectName) throws ManagementEndpointException
ManagementEndpoint
isRegistered
in interface ManagementEndpoint
domainServerName
- The name of the server in the domain.objectName
- The objectname of the mbean.
ManagementEndpointException
- If any error occurs with isRegistered.ManagementEndpoint.isRegistered(String, String)
public String[] queryNames(String domainServerName, String objectName, String query) throws ManagementEndpointException
ManagementEndpoint
queryNames
in interface ManagementEndpoint
domainServerName
- The name of the server in the domain.objectName
- The objectname of the mbean.query
- Currently does nothing.
ManagementEndpointException
- If any error occurs with queryNames.ManagementEndpoint.queryNames(String, String, String)
public String[] getAttributesList(String domainServerName, String objectName) throws ManagementEndpointException
ManagementEndpoint
getAttributesList
in interface ManagementEndpoint
domainServerName
- The name of the server in the domain.objectName
- The objectname of the mbean.
ManagementEndpointException
- If any error occurs with getAttributesList.ManagementEndpoint.getAttributesList(String, String)
public String getDescription(String domainServerName, String objectName) throws ManagementEndpointException
ManagementEndpoint
getDescription
in interface ManagementEndpoint
domainServerName
- The name of the server in the domain.objectName
- The objectname of the mbean.
ManagementEndpointException
- If any error occurs with getDescription.ManagementEndpoint.getDescription(String, String)
public String[] getOperations(String domainServerName, String objectName) throws ManagementEndpointException
ManagementEndpoint
getOperations
in interface ManagementEndpoint
domainServerName
- The name of the server in the domain.objectName
- The objectname of the mbean.
ManagementEndpointException
- If any error occurs with getOperations.ManagementEndpoint.getOperations(String, String)
public String[] invoke(String domainServerName, String objectName, String operationName, String[] params) throws ManagementEndpointException, RemoteException
ManagementEndpoint
invoke
in interface ManagementEndpoint
domainServerName
- The name of the server in the domain.objectName
- The objectname of the mbean.operationName
- operation nameparams
- String parameters
ManagementEndpointException
- If any error occurs with getOperations.
RemoteException
- If an error occurs with the web service.ManagementEndpoint#invoke(String, String, String[])
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |