|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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()
|
java.lang.Object |
getAttribute(javax.management.ObjectName name,
java.lang.String attribute)
|
java.lang.Object |
getAttribute(java.lang.String domainServerName,
javax.management.ObjectName name,
java.lang.String attribute)
|
java.lang.String[] |
getAttribute(java.lang.String domainServerName,
java.lang.String objectName,
java.lang.String attribute)
Returns the attribute value for an mbean on a server in the domain. |
javax.management.AttributeList |
getAttributes(javax.management.ObjectName name,
java.lang.String[] attributes)
|
javax.management.AttributeList |
getAttributes(java.lang.String domainServerName,
javax.management.ObjectName name,
java.lang.String[] attributes)
|
java.lang.String[] |
getAttributesList(java.lang.String domainServerName,
java.lang.String objectName)
Returns a list of attributes for a specified mbean on a server in the domain. |
java.lang.String |
getDefaultDomain()
Returns the name of the current domain. |
java.lang.String |
getDescription(java.lang.String domainServerName,
java.lang.String objectName)
Returns the description for an mbean on a server in the domain. |
javax.management.j2ee.ListenerRegistration |
getListenerRegistry()
Returns the ListenerRegistration implementation object which allows the client to register a event notification listener. |
java.lang.Integer |
getMBeanCount()
|
java.lang.Integer |
getMBeanCount(java.lang.String domainServerName)
Returns the number of mbeans for a server in the domain. |
javax.management.MBeanInfo |
getMBeanInfo(javax.management.ObjectName name)
|
javax.management.MBeanInfo |
getMBeanInfo(java.lang.String domainServerName,
javax.management.ObjectName name)
|
java.lang.String[] |
getOperations(java.lang.String domainServerName,
java.lang.String objectName)
Returns the list of operations for an mbean on a server in the domain. |
java.lang.String[] |
getServers()
Returns the names of the servers in the domain. |
java.lang.Object |
invoke(javax.management.ObjectName name,
java.lang.String operationName,
java.lang.Object[] params,
java.lang.String[] signature)
|
java.lang.Object |
invoke(java.lang.String domainServerName,
javax.management.ObjectName name,
java.lang.String operationName,
java.lang.Object[] params,
java.lang.String[] signature)
|
java.lang.String[] |
invoke(java.lang.String domainServerName,
java.lang.String objectName,
java.lang.String operationName,
java.lang.String[] params)
Invokes an mbean operation having String params on a server in the domain. |
boolean |
isRegistered(javax.management.ObjectName name)
|
boolean |
isRegistered(java.lang.String domainServerName,
javax.management.ObjectName name)
|
boolean |
isRegistered(java.lang.String domainServerName,
java.lang.String objectName)
Returns True if the mbean is registered with the server in the domain, false otherwise. |
java.util.Set |
queryNames(javax.management.ObjectName name,
javax.management.QueryExp query)
|
java.util.Set |
queryNames(java.lang.String domainServerName,
javax.management.ObjectName name,
javax.management.QueryExp query)
|
java.lang.String[] |
queryNames(java.lang.String domainServerName,
java.lang.String objectName,
java.lang.String query)
Returns the search results for mbeans on a server in the domain. |
void |
setAttribute(javax.management.ObjectName name,
javax.management.Attribute attribute)
|
void |
setAttribute(java.lang.String domainServerName,
javax.management.ObjectName name,
javax.management.Attribute attribute)
|
javax.management.AttributeList |
setAttributes(javax.management.ObjectName name,
javax.management.AttributeList attributes)
|
javax.management.AttributeList |
setAttributes(java.lang.String domainServerName,
javax.management.ObjectName name,
javax.management.AttributeList attributes)
|
void |
setSessionContext(javax.ejb.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 javax.ejb.CreateException
javax.ejb.CreateException
public void ejbActivate()
ejbActivate
in interface javax.ejb.SessionBean
public void ejbPassivate()
ejbPassivate
in interface javax.ejb.SessionBean
public void ejbRemove()
ejbRemove
in interface javax.ejb.SessionBean
public void setSessionContext(javax.ejb.SessionContext sessionContext)
setSessionContext
in interface javax.ejb.SessionBean
sessionContext
- - A SessionContext interface for the instance.public java.lang.Object getAttribute(javax.management.ObjectName name, java.lang.String attribute) throws javax.management.MBeanException, javax.management.AttributeNotFoundException, javax.management.InstanceNotFoundException, javax.management.ReflectionException, java.rmi.RemoteException
javax.management.MBeanException
javax.management.AttributeNotFoundException
javax.management.InstanceNotFoundException
javax.management.ReflectionException
java.rmi.RemoteException
public javax.management.AttributeList getAttributes(javax.management.ObjectName name, java.lang.String[] attributes) throws javax.management.InstanceNotFoundException, javax.management.ReflectionException, java.rmi.RemoteException
javax.management.InstanceNotFoundException
javax.management.ReflectionException
java.rmi.RemoteException
public java.lang.String getDefaultDomain() throws java.rmi.RemoteException
ManagementEndpoint
getDefaultDomain
in interface ManagementEndpoint
java.rmi.RemoteException
- If an error occurs communicating with the server.public java.lang.Integer getMBeanCount() throws java.rmi.RemoteException
java.rmi.RemoteException
public javax.management.MBeanInfo getMBeanInfo(javax.management.ObjectName name) throws javax.management.IntrospectionException, javax.management.InstanceNotFoundException, javax.management.ReflectionException, java.rmi.RemoteException
javax.management.IntrospectionException
javax.management.InstanceNotFoundException
javax.management.ReflectionException
java.rmi.RemoteException
public java.lang.Object invoke(javax.management.ObjectName name, java.lang.String operationName, java.lang.Object[] params, java.lang.String[] signature) throws javax.management.MBeanException, javax.management.InstanceNotFoundException, javax.management.ReflectionException, java.rmi.RemoteException
javax.management.MBeanException
javax.management.InstanceNotFoundException
javax.management.ReflectionException
java.rmi.RemoteException
public boolean isRegistered(javax.management.ObjectName name) throws java.rmi.RemoteException
java.rmi.RemoteException
public java.util.Set queryNames(javax.management.ObjectName name, javax.management.QueryExp query) throws java.rmi.RemoteException
java.rmi.RemoteException
public void setAttribute(javax.management.ObjectName name, javax.management.Attribute attribute) throws javax.management.MBeanException, javax.management.AttributeNotFoundException, javax.management.InstanceNotFoundException, javax.management.InvalidAttributeValueException, javax.management.ReflectionException, java.rmi.RemoteException
javax.management.MBeanException
javax.management.AttributeNotFoundException
javax.management.InstanceNotFoundException
javax.management.InvalidAttributeValueException
javax.management.ReflectionException
java.rmi.RemoteException
public javax.management.AttributeList setAttributes(javax.management.ObjectName name, javax.management.AttributeList attributes) throws javax.management.InstanceNotFoundException, javax.management.ReflectionException, java.rmi.RemoteException
javax.management.InstanceNotFoundException
javax.management.ReflectionException
java.rmi.RemoteException
public javax.management.j2ee.ListenerRegistration getListenerRegistry() throws java.rmi.RemoteException
null
is returned if
java.rmi.RemoteException
public java.lang.Object getAttribute(java.lang.String domainServerName, javax.management.ObjectName name, java.lang.String attribute) throws javax.management.AttributeNotFoundException, javax.management.InstanceNotFoundException, javax.management.MBeanException, javax.management.ReflectionException, java.rmi.RemoteException
javax.management.AttributeNotFoundException
javax.management.InstanceNotFoundException
javax.management.MBeanException
javax.management.ReflectionException
java.rmi.RemoteException
public javax.management.AttributeList getAttributes(java.lang.String domainServerName, javax.management.ObjectName name, java.lang.String[] attributes) throws javax.management.InstanceNotFoundException, javax.management.ReflectionException, java.rmi.RemoteException
javax.management.InstanceNotFoundException
javax.management.ReflectionException
java.rmi.RemoteException
public java.lang.Integer getMBeanCount(java.lang.String domainServerName) throws java.rmi.RemoteException
ManagementEndpoint
getMBeanCount
in interface ManagementEndpoint
domainServerName
- The name of the server in the domain.
java.rmi.RemoteException
- If an error occurs communicating with the server.public javax.management.MBeanInfo getMBeanInfo(java.lang.String domainServerName, javax.management.ObjectName name) throws javax.management.IntrospectionException, javax.management.InstanceNotFoundException, javax.management.ReflectionException, java.rmi.RemoteException
javax.management.IntrospectionException
javax.management.InstanceNotFoundException
javax.management.ReflectionException
java.rmi.RemoteException
public java.lang.Object invoke(java.lang.String domainServerName, javax.management.ObjectName name, java.lang.String operationName, java.lang.Object[] params, java.lang.String[] signature) throws javax.management.MBeanException, javax.management.InstanceNotFoundException, javax.management.ReflectionException, java.rmi.RemoteException
javax.management.MBeanException
javax.management.InstanceNotFoundException
javax.management.ReflectionException
java.rmi.RemoteException
public boolean isRegistered(java.lang.String domainServerName, javax.management.ObjectName name) throws java.rmi.RemoteException
java.rmi.RemoteException
public java.util.Set queryNames(java.lang.String domainServerName, javax.management.ObjectName name, javax.management.QueryExp query) throws java.rmi.RemoteException
java.rmi.RemoteException
public void setAttribute(java.lang.String domainServerName, javax.management.ObjectName name, javax.management.Attribute attribute) throws javax.management.MBeanException, javax.management.AttributeNotFoundException, javax.management.InstanceNotFoundException, javax.management.InvalidAttributeValueException, javax.management.ReflectionException, java.rmi.RemoteException
javax.management.MBeanException
javax.management.AttributeNotFoundException
javax.management.InstanceNotFoundException
javax.management.InvalidAttributeValueException
javax.management.ReflectionException
java.rmi.RemoteException
public javax.management.AttributeList setAttributes(java.lang.String domainServerName, javax.management.ObjectName name, javax.management.AttributeList attributes) throws javax.management.InstanceNotFoundException, javax.management.ReflectionException, java.rmi.RemoteException
javax.management.InstanceNotFoundException
javax.management.ReflectionException
java.rmi.RemoteException
public java.lang.String[] getServers() throws ManagementEndpointException, java.rmi.RemoteException
getServers
in interface ManagementEndpoint
ManagementEndpointException
- If any errors occur.
java.rmi.RemoteException
- If a connection error occurs.public java.lang.String[] getAttribute(java.lang.String domainServerName, java.lang.String objectName, java.lang.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(java.lang.String domainServerName, java.lang.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 java.lang.String[] queryNames(java.lang.String domainServerName, java.lang.String objectName, java.lang.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 java.lang.String[] getAttributesList(java.lang.String domainServerName, java.lang.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 java.lang.String getDescription(java.lang.String domainServerName, java.lang.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 java.lang.String[] getOperations(java.lang.String domainServerName, java.lang.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 java.lang.String[] invoke(java.lang.String domainServerName, java.lang.String objectName, java.lang.String operationName, java.lang.String[] params) throws ManagementEndpointException, java.rmi.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.
java.rmi.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 |