|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The AdminService is the server-side interface to the WebSphere v5.0 administration functions. It exposes the public admin APIs to any code running in the server JVM. Many of the AdminService methods are also available from remote JVMs through use of the AdminClient interface. Other methods are only accessible from the same JVM as the AdminService instance.
To obtain a reference to the singleton AdminService instance, use the static method getAdminService() of the AdminServiceFactory class.
Many of the methods defined on the AdminService interface come from the JMX MBeanServer interface. The WebSphere AdminService extends the standard JMX MBeanServer function with distributed system support and enhanced security. The regular JMX MBeanServer is accessible in WebSphere JVMs from the getMBeanServer() method of the MBeanFactory interface.
Code that runs in the same JVM as the AdminService must also have the required Java 2 Security permissions in order to successfully invoke any of the AdminService methods. To obtain a reference to the AdminService in the first place, code must have at least the following permission:
Other permissions that it may be necessary for code to be granted before it can call certain AdminService methods include:
MBeanServer.addNotificationListener MBeanServer.createMBean MBeanServer.deserialize MBeanServer.getAttribute MBeanServer.getDefaultDomain MBeanServer.getMBeanCount MBeanServer.getMBeanInfo MBeanServer.getObjectInstance MBeanServer.instantiate MBeanServer.invoke MBeanServer.isRegistered MBeanServer.queryMBeans MBeanServer.queryNames MBeanServer.registerMBean MBeanServer.removeNotificationListener MBeanServer.setAttribute MBeanServer.unregisterMBean MBeanServerFactory.createMBeanServer MBeanServerFactory.newMBeanServer MBeanServerFactory.findMBeanServer MBeanServerFactory.releaseMBeanServer
AdminServiceFactory
,
AdminClient
,
javax.management.MBeanServerMethod Summary | |
---|---|
void |
addNotificationListener(javax.management.ObjectName name,
javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
Adds a listener to exactly one MBean. |
void |
addNotificationListenerExtended(javax.management.ObjectName name,
javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
Adds a listener to multiple MBeans. |
java.lang.Object |
getAttribute(javax.management.ObjectName name,
java.lang.String attribute)
Gets the value of a specific attribute of a named MBean. |
javax.management.AttributeList |
getAttributes(javax.management.ObjectName name,
java.lang.String[] attributes)
Gets the values of several attributes of a named MBean. |
java.lang.String |
getCellName()
Returns the name used to identify the current cell in which this process is configured. |
java.lang.String |
getDefaultDomain()
Returns the default domain used for naming the MBean. |
AdminClient |
getDeploymentManagerAdminClient()
Returns a reference to the AdminClient connection from this JVM to the Deployment Manager in a Network Deployment environment. |
java.lang.String |
getDomainName()
Returns the DomainName String for this AdminService. |
java.lang.String |
getJvmType()
Returns the JVM Type attribute of the server. |
javax.management.ObjectName |
getLocalServer()
Returns the ObjectName handle to the Server MBean for this server. |
java.lang.Integer |
getMBeanCount()
Returns the number of MBeans registered in the MBeanServer. |
MBeanFactory |
getMBeanFactory()
Returns a reference to the singleton MBeanFactory instance for this JVM. |
javax.management.MBeanInfo |
getMBeanInfo(javax.management.ObjectName name)
This method discovers the attributes and operations that an MBean exposes for management. |
java.lang.String |
getNodeName()
Returns the name used to identify the current node in which this process is configured. |
java.lang.String |
getProcessName()
Returns the name used to identify the current process. |
java.lang.String |
getProcessType()
Returns the ProcessType attribute of the server. |
java.lang.Object |
invoke(javax.management.ObjectName name,
java.lang.String operationName,
java.lang.Object[] params,
java.lang.String[] signature)
Invokes an operation on an MBean. |
Session |
isAlive()
Get the Session associated with the current AdminService. |
boolean |
isInstanceOf(javax.management.ObjectName name,
java.lang.String className)
Returns true if the MBean specified is an instance of the specified class, false otherwise. |
boolean |
isLocalServer(java.lang.String cellname,
java.lang.String nodename,
java.lang.String servername)
Compares the cell, node, and server name parameters to those for the local server. |
boolean |
isRegistered(javax.management.ObjectName name)
Checks whether an MBean, identified by its object name, is already registered with the MBean server. |
java.util.Set |
queryNames(javax.management.ObjectName name,
javax.management.QueryExp query)
Gets the names of MBeans controlled by the MBeanServer that match a supplied pattern. |
javax.management.ObjectInstance |
registerMBean(java.lang.Object object,
javax.management.ObjectName name)
Register the Object passed in as an MBean with the supplied JMX ObjectName. |
void |
removeNotificationListener(javax.management.ObjectName name,
javax.management.NotificationListener listener)
Removes a listener from exactly one MBean. |
void |
removeNotificationListenerExtended(javax.management.NotificationListener listener)
Deprecated. as of 5.0.1, use removeNotificationListenerExtended(ObjectName,NotificationListener) |
void |
removeNotificationListenerExtended(javax.management.ObjectName name,
javax.management.NotificationListener listener)
Removes a listener from multiple MBeans. |
void |
setAttribute(javax.management.ObjectName name,
javax.management.Attribute attribute)
Sets the value of a specific attribute of a named MBean. |
javax.management.AttributeList |
setAttributes(javax.management.ObjectName name,
javax.management.AttributeList attributes)
Sets the values of several attributes of a named MBean. |
Method Detail |
public AdminClient getDeploymentManagerAdminClient() throws AdminException
AdminClient
public MBeanFactory getMBeanFactory()
MBeanFactory
public javax.management.ObjectInstance registerMBean(java.lang.Object object, javax.management.ObjectName name) throws javax.management.InstanceAlreadyExistsException, javax.management.MBeanRegistrationException, javax.management.NotCompliantMBeanException
object
- the Object to be registered as an MBean.name
- the ObjectName to be associated with this MBean.javax.management.InstanceAlreadyExistsException
- javax.management.MBeanRegistrationException
- javax.management.NotCompliantMBeanException
- public java.lang.String getProcessName()
public java.lang.String getNodeName()
public java.lang.String getCellName()
public java.lang.String getJvmType()
AdminConstants
public java.lang.String getProcessType()
AdminConstants
public boolean isLocalServer(java.lang.String cellname, java.lang.String nodename, java.lang.String servername)
false
.
This method is only accessible from code running local to the AdminService.
cellname
- a String value to compare against the name of the local cell.nodename
- a String value to compare against the name of the local node.servername
- a String value to compare against the name of the local server.public javax.management.ObjectName getLocalServer()
public Session isAlive()
Session
public java.util.Set queryNames(javax.management.ObjectName name, javax.management.QueryExp query)
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
name
- attribute
- javax.management.MBeanException
- javax.management.AttributeNotFoundException
- javax.management.InstanceNotFoundException
- javax.management.ReflectionException
- public javax.management.AttributeList getAttributes(javax.management.ObjectName name, java.lang.String[] attributes) throws javax.management.InstanceNotFoundException, javax.management.ReflectionException
public void setAttribute(javax.management.ObjectName name, javax.management.Attribute attribute) throws javax.management.InstanceNotFoundException, javax.management.AttributeNotFoundException, javax.management.InvalidAttributeValueException, javax.management.MBeanException, javax.management.ReflectionException
public javax.management.AttributeList setAttributes(javax.management.ObjectName name, javax.management.AttributeList attributes) throws javax.management.InstanceNotFoundException, javax.management.ReflectionException
public java.lang.Object invoke(javax.management.ObjectName name, java.lang.String operationName, java.lang.Object[] params, java.lang.String[] signature) throws javax.management.InstanceNotFoundException, javax.management.MBeanException, javax.management.ReflectionException
name
- operationName
- params
- signature
- javax.management.InstanceNotFoundException
- javax.management.MBeanException
- javax.management.ReflectionException
- public java.lang.String getDefaultDomain()
public java.lang.String getDomainName()
public java.lang.Integer getMBeanCount()
public javax.management.MBeanInfo getMBeanInfo(javax.management.ObjectName name) throws javax.management.InstanceNotFoundException, javax.management.IntrospectionException, javax.management.ReflectionException
name
- the ObjectName for the MBean about which information is requestedjavax.management.InstanceNotFoundException
- javax.management.IntrospectionException
- javax.management.ReflectionException
- public boolean isRegistered(javax.management.ObjectName name)
name
- public boolean isInstanceOf(javax.management.ObjectName name, java.lang.String className) throws javax.management.InstanceNotFoundException
name
- className
- javax.management.InstanceNotFoundException
- public void addNotificationListener(javax.management.ObjectName name, javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback) throws javax.management.InstanceNotFoundException
name
- the name of the MBean on which the listener should be added.listener
- the listener object which will handle the notifications emitted
by the registered MBeanfilter
- the filter object; if filter is null, no filtering will be
performed before handling notificationshandback
- the context to be sent to the listener when a notification is
emittedjavax.management.InstanceNotFoundException
- the MBean name provided does not match any
of the registered MBeans.ConnectorException
- a communication problem occured adding the
listenerpublic void addNotificationListenerExtended(javax.management.ObjectName name, javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback)
addNotificationListener(javax.management.ObjectName, javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
method, except for the following:
name
- a pattern matching zero or more MBeans; notifications from all these
MBeans will be routed to the listenerlistener
- the listener object which will handle the notifications emitted
by the registered MBeanfilter
- the filter object; if filter is null, no filtering will be
performed before handling notificationshandback
- the context to be sent to the listener when a notification is
emittedConnectorException
- a communication problem occured adding the
listenerpublic void removeNotificationListener(javax.management.ObjectName name, javax.management.NotificationListener listener) throws javax.management.InstanceNotFoundException, javax.management.ListenerNotFoundException
This method should not be used to remove listeners added with
addNotificationListenerExtended(javax.management.ObjectName, javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
; use
removeNotificationListenerExtended(ObjectName,NotificationListener)
instead.
name
- the name of the MBean on which the listener should be removedlistener
- the listener object which will handle the notifications emitted
by the registered MBeanjavax.management.InstanceNotFoundException
- the MBean name provided does not match any
of the registered MBeansjavax.management.ListenerNotFoundException
- the listener is not registered in the MBeanConnectorException
- a communication problem occured adding the
listenerpublic void removeNotificationListenerExtended(javax.management.NotificationListener listener) throws javax.management.ListenerNotFoundException
removeNotificationListenerExtended(ObjectName,NotificationListener)
addNotificationListenerExtended(javax.management.ObjectName, javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
.
Behaves similarly to the removeNotificationListener(javax.management.ObjectName, javax.management.NotificationListener)
method, except
for the following:
listener
- the listener object which will handle the notifications emitted
by the registered MBeanjavax.management.ListenerNotFoundException
- the listener is not registered in the MBeanConnectorException
- a communication problem occured adding the
listenerpublic void removeNotificationListenerExtended(javax.management.ObjectName name, javax.management.NotificationListener listener) throws javax.management.ListenerNotFoundException
addNotificationListenerExtended(javax.management.ObjectName, javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
.
Behaves similarly to the removeNotificationListener(javax.management.ObjectName, javax.management.NotificationListener)
method, except
for the following:
name
- the name of the MBean on which the listener should be removed; this
must be the same name as that given during
addNotificationListenerExtended (cannot remove listener from subset
of MBeans)listener
- the listener object which will handle the notifications emitted
by the registered MBeanjavax.management.ListenerNotFoundException
- the listener is not registered in the MBeanConnectorException
- a communication problem occured adding the
listener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |