|
IBM WebSphere Application ServerTM Release 7 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AdminService
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.
In order 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. In order to obtain a reference to the AdminService in the first place, code must have at least the following permission:
com.ibm.websphere.management.AdminPermission "getAdminService"
Other permissions that it may be necessary for code to be granted before it can call certain AdminService methods include:
com.ibm.websphere.management.AdminPermission "getMBeanFactory"
com.tivoli.jmx.MBeanServerPermission "MBeanServerFactory.*"
com.tivoli.jmx.MBeanServerPermission "MBeanServer.*"
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.MBeanServer
Method 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 |
addNotificationListener(javax.management.ObjectName name,
javax.management.ObjectName listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
Adds a listener to a registered 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.ClassLoader |
getClassLoader(javax.management.ObjectName name)
|
java.lang.ClassLoader |
getClassLoaderFor(javax.management.ObjectName name)
|
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. |
javax.management.ObjectInstance |
getObjectInstance(javax.management.ObjectName name)
Gets the ObjectInstance for a given MBean registered with the MBean server. |
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.String |
getServerType()
Returns the ServerType 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 |
queryMBeans(javax.management.ObjectName name,
javax.management.QueryExp query)
Gets the names of MBeans controlled by the MBeanServer that match a supplied pattern. |
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 |
removeNotificationListener(javax.management.ObjectName name,
javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
Removes a listener from a registered MBean. |
void |
removeNotificationListener(javax.management.ObjectName name,
javax.management.ObjectName listener)
Removes a listener from a registered MBean. |
void |
removeNotificationListener(javax.management.ObjectName name,
javax.management.ObjectName listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
Removes a listener from a registered MBean. |
void |
removeNotificationListenerExtended(javax.management.NotificationListener listener)
Deprecated. as of 5.0.1, you should 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 |
---|
AdminClient getDeploymentManagerAdminClient() throws AdminException
AdminException
AdminClient
MBeanFactory getMBeanFactory()
com.ibm.websphere.management.AdminPermission "getAdminService"
MBeanFactory
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
javax.management.ObjectName
java.lang.String getProcessName()
process
key property in all ObjectNames
for WebSphere MBeans originating from this JVM.
This method is only accessible from code running local to the AdminService.
java.lang.String getNodeName()
node
key property in all ObjectNames
for WebSphere MBeans originating from this JVM.
This method is only accessible from code running local to the AdminService.
java.lang.String getCellName()
cell
key property in all ObjectNames
for WebSphere MBeans originating from this JVM.
This method is only accessible from code running local to the AdminService.
java.lang.String getJvmType()
AdminConstants
java.lang.String getProcessType()
AdminConstants
java.lang.String getServerType()
boolean isLocalServer(java.lang.String cellname, java.lang.String nodename, java.lang.String servername)
true
. Otherwise this method returns 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.
javax.management.ObjectName getLocalServer()
javax.management.ObjectName
Session isAlive()
Session
java.util.Set queryMBeans(javax.management.ObjectName name, javax.management.QueryExp query)
It returns the set of ObjectInstance
objects (containing the
ObjectName
and the Java Class name) for the selected MBeans.
java.util.Set queryNames(javax.management.ObjectName name, javax.management.QueryExp query)
javax.management.ObjectName
,
javax.management.QueryExp
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
javax.management.AttributeList getAttributes(javax.management.ObjectName name, java.lang.String[] attributes) throws javax.management.InstanceNotFoundException, javax.management.ReflectionException
javax.management.InstanceNotFoundException
javax.management.ReflectionException
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
javax.management.InstanceNotFoundException
javax.management.AttributeNotFoundException
javax.management.InvalidAttributeValueException
javax.management.MBeanException
javax.management.ReflectionException
javax.management.ObjectName
,
javax.management.Attribute
javax.management.AttributeList setAttributes(javax.management.ObjectName name, javax.management.AttributeList attributes) throws javax.management.InstanceNotFoundException, javax.management.ReflectionException
javax.management.InstanceNotFoundException
javax.management.ReflectionException
javax.management.ObjectName
,
javax.management.AttributeList
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
java.lang.String getDefaultDomain()
java.lang.String getDomainName()
java.lang.Integer getMBeanCount()
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 requested
javax.management.InstanceNotFoundException
javax.management.IntrospectionException
javax.management.ReflectionException
boolean isRegistered(javax.management.ObjectName name)
name
-
boolean isInstanceOf(javax.management.ObjectName name, java.lang.String className) throws javax.management.InstanceNotFoundException
name
- className
-
javax.management.InstanceNotFoundException
void addNotificationListener(javax.management.ObjectName name, javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback) throws javax.management.InstanceNotFoundException
MBeanServer.addNotificationListener
, except that it works
in a distributed environment. This means that MBeans which are not located on
this specific process may have listeners added to it assuming routing
information is correct.
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
emitted
javax.management.InstanceNotFoundException
- the MBean name provided does not match any
of the registered MBeans.
ConnectorException
- a communication problem occured adding the
listenervoid 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:
queryMBeans
method; null is not allowed
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
emitted
ConnectorException
- a communication problem occured adding the
listenervoid removeNotificationListener(javax.management.ObjectName name, javax.management.NotificationListener listener) throws javax.management.InstanceNotFoundException, javax.management.ListenerNotFoundException
MBeanServer.removeNotificationListener
, except that it works
in a distributed environment. This means that MBeans which are not located on
this specific process may have listeners added to it assuming routing
information is correct.
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 MBean
javax.management.InstanceNotFoundException
- the MBean name provided does not match any
of the registered MBeans
javax.management.ListenerNotFoundException
- the listener is not registered in the MBean
ConnectorException
- a communication problem occured adding the
listenervoid 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 MBean
javax.management.ListenerNotFoundException
- the listener is not registered in the MBean
ConnectorException
- a communication problem occured adding the
listenervoid 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 MBean
javax.management.ListenerNotFoundException
- the listener is not registered in the MBean
ConnectorException
- a communication problem occured adding the
listenerjavax.management.ObjectInstance getObjectInstance(javax.management.ObjectName name) throws javax.management.InstanceNotFoundException
name
- the object name of the MBean.
javax.management.InstanceNotFoundException
void addNotificationListener(javax.management.ObjectName name, javax.management.ObjectName listener, javax.management.NotificationFilter filter, java.lang.Object handback) throws javax.management.InstanceNotFoundException
The listener object that receives notifications is the one that is registered with the given name at the time this method is called. Even if it is subsequently unregistered, it will continue to receive notifications.
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 MBean.filter
- the filter object; if filter is null, no filtering will be
performed before handling notifications.handback
- the context to be sent to the listener when a notification is emitted.
javax.management.InstanceNotFoundException
- the MBean name provided does not match any of the registered MBeans.void removeNotificationListener(javax.management.ObjectName name, javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback) throws javax.management.InstanceNotFoundException, javax.management.ListenerNotFoundException
The filter and handback parameters may be null if and only if they are null in a listener to be removed.
name
- the name of the MBean on which the listener should be removed.listener
- the listener that was previously added to this MBean.filter
- the filter that was specified when the listener was added.handback
- the handback that was specified when the listener was added.
javax.management.InstanceNotFoundException
- the MBean name provided does not match any of the registered MBeans.
javax.management.ListenerNotFoundException
- the listener is not registered in the MBean,
or it is not registered with the given filter and handback.void removeNotificationListener(javax.management.ObjectName name, javax.management.ObjectName listener) throws javax.management.InstanceNotFoundException, javax.management.ListenerNotFoundException
name
- the name of the MBean on which the listener should be removed.listener
- the object name of the listener to be removed.
javax.management.InstanceNotFoundException
- the MBean name provided does not match any of the registered MBeans.
javax.management.ListenerNotFoundException
- the listener is not registered in the MBean.void removeNotificationListener(javax.management.ObjectName name, javax.management.ObjectName listener, javax.management.NotificationFilter filter, java.lang.Object handback) throws javax.management.InstanceNotFoundException, javax.management.ListenerNotFoundException
If there is more than one such listener, only one is removed. The filter and handback parameters may be null if and only if they are null in a listener to be removed.
name
- the name of the MBean on which the listener should be removed.listener
- the listener that was previously added to this MBeanfilter
- the filter that was specified when the listener was added.handback
- the handback that was specified when the listener was added.
javax.management.InstanceNotFoundException
- the MBean name provided does not match any of the registered MBeans.
javax.management.ListenerNotFoundException
- - The listener is not registered in the MBean,
or it is not registered with the given filter and handback.java.lang.ClassLoader getClassLoaderFor(javax.management.ObjectName name) throws javax.management.InstanceNotFoundException
javax.management.InstanceNotFoundException
java.lang.ClassLoader getClassLoader(javax.management.ObjectName name) throws javax.management.InstanceNotFoundException
javax.management.InstanceNotFoundException
|
IBM WebSphere Application ServerTM Release 7 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |