|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.jdmk.comm.RmiConnectorClient
javax.management.remote.rmi
and JdmkLegacyConnector
.
public class RmiConnectorClient
Provides an implementation of the RemoteMBeanServer
interface based on the Java remote method invocation (RMI) system.
Querying a Java Dynamic Management agent with this connector implies that an instance of
RmiConnectorServer
is running on the remote Java Dynamic Management agent.
In order to identify the Java Dynamic Management agent the connector needs to communicate with,
the method connect
needs to be invoked with the
RMI identity of the RMI Connector Server
.
This class implements the ClientNotificationHandler
interface to
receive notifications from a remote MBean and the HeartBeatClientHandler
interface to detect any problem that could be encountered in the connection with the
RMI Connector Server
Field Summary |
---|
Fields inherited from interface com.sun.jdmk.comm.ClientNotificationHandler |
---|
DISCARD_NEW, DISCARD_OLD, NO_CACHE_LIMIT, PULL_MODE, PUSH_MODE |
Constructor Summary | |
---|---|
RmiConnectorClient()
Deprecated. Default constructor for RmiConnectorClient. |
|
RmiConnectorClient(InetAddress addr)
Deprecated. Only used for a Client with Java DMK 5.0 to connect to a server with a Java DMK 4.2 or earlier version. |
|
RmiConnectorClient(InetAddress add,
int commTimeout)
Deprecated. |
|
RmiConnectorClient(RMIClientSocketFactory csf)
Deprecated. |
|
RmiConnectorClient(String addr)
Deprecated. Constructs an RmiConnectorClient. |
Method Summary | |
---|---|
void |
addHeartBeatNotificationListener(NotificationListener listener,
NotificationFilter filter,
Object handback)
Deprecated. Adds the specified heartbeat listener to receive heartbeat notifications from this connector client. |
void |
addNotificationListener(ObjectName name,
NotificationListener listener,
NotificationFilter filter,
Object handback)
Deprecated. Adds a listener to a registered MBean. |
void |
clearCache()
Deprecated. Clear the notification cache. |
String |
connect(ConnectorAddress MBeanServerAddress)
Deprecated. Initializes the communication with the remote MBeanServer . |
ObjectInstance |
createMBean(String className,
ObjectName name)
Deprecated. Creates and registers an instance of an MBean in the remote object server. |
ObjectInstance |
createMBean(String className,
ObjectName name,
Object[] params,
String[] signature)
Deprecated. Creates and registers an instance of an MBean in the remote object server. |
ObjectInstance |
createMBean(String className,
ObjectName name,
ObjectName loaderName)
Deprecated. Creates and registers an instance of an MBean in the remote object server. |
ObjectInstance |
createMBean(String className,
ObjectName name,
ObjectName loaderName,
Object[] params,
String[] signature)
Deprecated. Creates and registers an instance of an MBean in the remote object server. |
void |
disconnect()
Deprecated. Terminates the communication with the MBeanServer . |
void |
disconnect(boolean local)
Deprecated. Terminates the communication with the MBeanServer . |
Object |
getAttribute(ObjectName name,
String attribute)
Deprecated. Gets the value of a specific attribute of a named MBean. |
AttributeList |
getAttributes(ObjectName name,
String[] attributes)
Deprecated. Allows you to retrieve the values of several attributes of an MBean. |
int |
getCacheSize()
Deprecated. Get the cache size of notifications waiting to be forwarded. |
String |
getClassForProxyMBean(ObjectInstance instance)
Deprecated. Given the object name and the Java class name of the MBean ( ObjectInstance ), this
method returns the name of the Java class of the corresponding Proxy MBean. |
String |
getDefaultDomain()
Deprecated. Returns the default domain used for the MBean naming. |
int |
getHeartBeatPeriod()
Deprecated. Gets the heartbeat period in milliseconds. |
int |
getHeartBeatRetries()
Deprecated. Gets the number of retries. |
Integer |
getMBeanCount()
Deprecated. Returns the number of MBeans controlled by the MBeanServer . |
MBeanInfo |
getMBeanInfo(ObjectName name)
Deprecated. This method supplies the exposed attributes and actions of the MBean. |
ConnectorAddress |
getMBeanServerAddress()
Deprecated. Returns the exact address of the MBeanServer to which the ConnectorClient is
connected. |
String |
getMBeanServerId()
Deprecated. Returns a string which represents the MBeanServer identification. |
int |
getMode()
Deprecated. Gets the notification forwarding mode. |
void |
getNotifications()
Deprecated. Retrieves all notifications in the cache. |
ObjectInstance |
getObjectInstance(ObjectName name)
Deprecated. Gets the ObjectInstance for a given MBean registered with the MBeanServer . |
OperationContext |
getOperationContext()
Deprecated. Get the OperationContext that was last given to setOperationContext, or null if setOperationContext was never called. |
int |
getOverflowCount()
Deprecated. Get the number of notifications discarded since last forwarding because the cache limit has been reached. |
int |
getOverflowMode()
Deprecated. Return whether to discard the oldest message ( DISCARD_OLD ) or the
the newest message (DISCARD_NEW ), if the cache size exceeds. |
int |
getPeriod()
Deprecated. Gets the period for notification forwarding in milliseconds. |
Object |
invoke(ObjectName name,
String methodName,
Object[] arguments,
String[] signature)
Deprecated. Invokes a method of an MBean. |
boolean |
isConnected()
Deprecated. Checks whether a communication with the MBeanServer is established. |
boolean |
isInstanceOf(ObjectName name,
String className)
Deprecated. Returns true if the MBean specified is an instance of the specified class, false otherwise. |
boolean |
isRegistered(ObjectName name)
Deprecated. Checks whether an MBean, identified by its object name, is already registered with the MBeanServer . |
Set |
queryMBeans(ObjectName name,
QueryExp query)
Deprecated. Gets MBeans controlled by the MBeanServer . |
Set |
queryNames(ObjectName name,
QueryExp query)
Deprecated. Gets the names of MBeans controlled by the MBeanServer . |
void |
removeHeartBeatNotificationListener(NotificationListener listener)
Deprecated. Removes the specified heartbeat listener so that it no longer receives heartbeat notifications from this connector client. |
void |
removeNotificationListener(ObjectName name,
NotificationListener listener)
Deprecated. Removes a listener from a registered MBean. |
void |
setAttribute(ObjectName name,
Attribute attribute)
Deprecated. Sets the value of a specific attribute of a named MBean. |
AttributeList |
setAttributes(ObjectName name,
AttributeList attributes)
Deprecated. Allows you to modify the values of several attributes of an MBean. |
int |
setCacheSize(int size,
boolean discardOverflow)
Deprecated. Sets the cache size of notifications waiting to be forwarded. |
void |
setHeartBeatPeriod(int period)
Deprecated. Specifies the heartbeat period in milliseconds. |
void |
setHeartBeatRetries(int nretries)
Deprecated. Sets the number of retries. |
void |
setMode(int mode)
Deprecated. Sets the notification forwarding mode. |
void |
setOperationContext(OperationContext c)
Deprecated. Set the OperationContext of this connector. |
void |
setOverflowCount(int count)
Deprecated. Sets the number of notifications discarded, this number indicates the number of notifications discarded because the cache limit has been reached. |
void |
setOverflowMode(int of)
Deprecated. Specify whether to discard the oldest message ( DISCARD_OLD ) or the
the newest message (DISCARD_NEW ), if the cache size exceeds. |
void |
setPeriod(int period)
Deprecated. Specifies the period for notification forwarding in milliseconds. |
void |
setTimeout(int timeout)
Deprecated. |
void |
unregisterMBean(ObjectName name)
Deprecated. Deletes an instance of an MBean in the remote MBean server. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RmiConnectorClient(RMIClientSocketFactory csf)
public RmiConnectorClient()
public RmiConnectorClient(InetAddress addr)
addr
- a user specified local host address to receive notifications from the server.public RmiConnectorClient(InetAddress add, int commTimeout)
public RmiConnectorClient(String addr)
Constructs an RmiConnectorClient. This constructor is only intended to be used for a Client with Java DMK 5.0 or later to connect to a server with a Java DMK 4.2 or earlier version.
addr
- a local host address to receive notifications from
the server.Method Detail |
---|
public void setTimeout(int timeout)
public void setMode(int mode) throws IllegalArgumentException
PUSH_MODE
, it is the agent to push notifications to the client, if set to
PULL_MODE
, it is the client to retrieve notifications from the agent.
The default value is PUSH_MODE
.
setMode
in interface ClientNotificationHandler
mode
- set to PUSH_MODE
or PULL_MODE
.
IllegalArgumentException
- Thrown if the mode is not equal to
PUSH_MODE
nor PULL_MODE
.
CommunicationException
- The RMI Connector Client is not connected to RMI Connector Server
or a problem was encountered in the connection to the RMI Connector Server.public int getMode()
PUSH_MODE
, it is the agent to push notifications to the client, if set to
PULL_MODE
, it is the client to retrieve notifications from the agent.
The default value is PUSH_MODE
.
getMode
in interface ClientNotificationHandler
CommunicationException
- The RMI Connector Client is not connected to RMI Connector Server
or a problem was encountered in the connection to the RMI Connector Server.public void getNotifications()
getNotifications
in interface ClientNotificationHandler
CommunicationException
- The RMI Connector Client is not connected to RMI Connector Server
or a problem was encountered in the connection to the RMI Connector Server.public void clearCache()
clearCache
in interface ClientNotificationHandler
CommunicationException
- The RMI Connector Client is not connected to RMI Connector Server
or a problem was encountered in the connection to the RMI Connector Server.public void setPeriod(int period)
If set to equal to or less than zero and the pull mode is used, no pull will be done. A user should
explicitly call getNotifications
to retrieve all notifications in the cache.
This method has no effect in the push mode in the current implementation.
The default value is 1000 milliseconds.
setPeriod
in interface ClientNotificationHandler
period
- The period in milliseconds.
CommunicationException
- The RMI Connector Client is not connected to RMI Connector Server
or a problem was encountered in the connection to the RMI Connector Server.public int getPeriod()
The default value is 1000 milliseconds.
getPeriod
in interface ClientNotificationHandler
CommunicationException
- The RMI Connector Client is not connected to RMI Connector Server
or a problem was encountered in the connection to the RMI Connector Server.public int setCacheSize(int size, boolean discardOverflow)
If set to NO_CACHE_LIMIT
, notifications will never be discarded,
but this may lead to OutOfMemory errors under stressed conditions. If set to zero, any
notification will be discarded without being sent.
The default value is NO_CACHE_LIMIT
.
setCacheSize
in interface ClientNotificationHandler
size
- the maximum number of notifications in the cache.discardOverflow
- effective only if current number of cached notifications exceeds the new size:
if true, discard excess notifications; if false, the cache size will not be changed.
CommunicationException
- The RMI Connector Client is not connected to RMI Connector Server
or a problem was encountered in the connection to the RMI Connector Server.public int getCacheSize()
If set to NO_CACHE_LIMIT
or a negative value, notifications will never be discarded,
but this may lead to OutOfMemory errors under stressed conditions.
The default value is NO_CACHE_LIMIT
.
getCacheSize
in interface ClientNotificationHandler
CommunicationException
- The RMI Connector Client is not connected to RMI Connector Server
or a problem was encountered in the connection to the RMI Connector Server.public void setOverflowCount(int count)
This count will be reset to zero if no more listener exists at the client side, because in this case the notification server will remove all information about this notification client.
setOverflowCount
in interface ClientNotificationHandler
count
- The new value to set to overflow count.
CommunicationException
- The RMI Connector Client is not connected to RMI Connector Server
or a problem was encountered in the connection to the RMI Connector Server.public int getOverflowCount()
This count will be reset to zero if no more listener exists at the client side, because in this case the notification server will remove all information about this notification client.
getOverflowCount
in interface ClientNotificationHandler
CommunicationException
- The RMI Connector Client is not connected to RMI Connector Server
or a problem was encountered in the connection to the RMI Connector Server.public void setOverflowMode(int of) throws IllegalArgumentException
DISCARD_OLD
) or the
the newest message (DISCARD_NEW
), if the cache size exceeds.
The default mode is DISCARD_OLD
.
setOverflowMode
in interface ClientNotificationHandler
of
- The overflow mode to specify.
IllegalArgumentException
- Thrown if the mode is not DISCARD_NEW
nor DISCARD_OLD
.
CommunicationException
- The RMI Connector Client is not connected to RMI Connector Server
or a problem was encountered in the connection to the RMI Connector Server.public int getOverflowMode()
DISCARD_OLD
) or the
the newest message (DISCARD_NEW
), if the cache size exceeds.
The default mode is DISCARD_OLD
.
getOverflowMode
in interface ClientNotificationHandler
CommunicationException
- The RMI Connector Client is not connected to RMI Connector Server
or a problem was encountered in the connection to the RMI Connector Server.public void addNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException
addNotificationListener
in interface NotificationRegistration
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.
InstanceNotFoundException
- The MBean name provided does not match any of the registered MBeans.
CommunicationException
- The RMI Connector Client is not connected to RMI Connector Server
or a problem was encountered in the connection to the RMI Connector Server.public void removeNotificationListener(ObjectName name, NotificationListener listener) throws InstanceNotFoundException, ListenerNotFoundException
removeNotificationListener
in interface NotificationRegistration
name
- The name of the MBean on which the listener should be removed.listener
- The listener object which will handle the notifications emitted by the registered MBean.
This method will remove all the information related to this listener.
InstanceNotFoundException
- The MBean name provided does not match any of the registered MBeans.
ListenerNotFoundException
- The listener is not registered in the MBean.
CommunicationException
- The RMI Connector Client is not connected to RMI Connector Server
or a problem was encountered in the connection to the RMI Connector Server.public int getHeartBeatPeriod()
The default value is 10000 milliseconds.
getHeartBeatPeriod
in interface HeartBeatClientHandler
public void setHeartBeatPeriod(int period)
If set to zero no check will be carried out for the associated connector server being alive. As the heartbeat is driven by the manager this would also prevent the connector server from being aware of the aliveness of this connector client.
The default value is 10000 milliseconds.
setHeartBeatPeriod
in interface HeartBeatClientHandler
period
- The heartbeat period in milliseconds.public int getHeartBeatRetries()
The default value is 6 times.
getHeartBeatRetries
in interface HeartBeatClientHandler
public void setHeartBeatRetries(int nretries)
The default value is 6 times.
setHeartBeatRetries
in interface HeartBeatClientHandler
nretries
- The number of retries.public void addHeartBeatNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback)
addHeartBeatNotificationListener
in interface HeartBeatClientHandler
listener
- The heartbeat listener which will handle the notifications emitted by the connector client.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.public void removeHeartBeatNotificationListener(NotificationListener listener)
removeHeartBeatNotificationListener
in interface HeartBeatClientHandler
listener
- The heartbeat listener which will handle the notifications emitted by the connector client.public void setOperationContext(OperationContext c)
Set the OperationContext of this connector. This context will be sent along with each request and can be recovered by the server, which can make it available to the operations it invokes.
The saved OperationContext will be a clone of the object
c
made using its clone
method.
setOperationContext
in interface RemoteMBeanServer
c
- the new OperationContext. It may be null to indicate that
there is no context. The previous OperationContext, if any, is lost.
CommunicationException
- if the context cannot be set for
some reason. One common reason is that the object c
does not implement the Cloneable
interface.public OperationContext getOperationContext()
getOperationContext
in interface RemoteMBeanServer
public String connect(ConnectorAddress MBeanServerAddress)
MBeanServer
. All the information
needed to identify the MBeanServer
to contact and the protocol to
be used is contained in the object of the type ConnectorAddress
passed as
a parameter. For then RmiconnectotClient
, the ConnectorAddress
should
of class RmiConnectorAddress
. If a communication problem occurs this method will throw
a CommunicationException
(JMRuntimeException
).
If the RemoteMBeanServer
had already been connected and disconnected with an MBeanServer
identified by its MBeanServerId
, and if the MBeanServer
reachable by the
MBeanServerAddress
parameter doesn't
have to same MBeanServerId
, the java.lang.IllegalAccessException
is thrown.
connect
in interface RemoteMBeanServer
MBeanServerAddress
- The exact MBeanServer
address to contact (MBeanServer
identification, protocol specification).
MBeanServer
with which the communication is established.
CommunicationException
- The RemoteMBeanServer
was already connected or a problem was
encountered in the connection to the RMI Connector Server
.
IllegalArgumentException
- The RemoteMBeanServer
has already been connected and disconnected
and the specified ConnectorAddress
doesn't identify the same MBeanServer
.public void disconnect()
MBeanServer
.
disconnect
in interface RemoteMBeanServer
public void disconnect(boolean local)
MBeanServer
.
public boolean isConnected()
MBeanServer
is established.
isConnected
in interface RemoteMBeanServer
public ConnectorAddress getMBeanServerAddress()
MBeanServer
to which the ConnectorClient is
connected. The address is of the type ConnectorAddress
.
getMBeanServerAddress
in interface RemoteMBeanServer
MBeanServer
, or null if the ConnectorClient is
not connected.public String getMBeanServerId()
MBeanServer
identification. This String comes from
the MBeanServerDelegate
Mbean.
If the Connector Client has not already been connected, it returns null.
If the Connector Client has been connected and disconnected, getMBeanServerId
still returns
the previous MBeanServer
identification.
getMBeanServerId
in interface RemoteMBeanServer
getMbeanServerId
still returns
the previous MbeanServer
identification.public ObjectInstance createMBean(String className, ObjectName name) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException
ObjectInstance
representing the remote MBean created.
createMBean
in interface RemoteMBeanServer
className
- The name of the Java class to be used by the MBeanServer
for creating the MBean.name
- The name of the MBean to be created.
ObjectInstance
representing the newly created MBean.
ReflectionException
- Wraps the exception that occurred when trying to invoke the MBean's constructor.
InstanceAlreadyExistsException
- The MBean is already under the control of the MBean server.
MBeanRegistrationException
- The preRegister
(MBeanRegistration
interface) method of the MBean has thrown an exception. The MBean will not be registered.
MBeanException
- Wraps an exception thrown by the MBean's constructor.
NotCompliantMBeanException
- This class is not a JMX compliant MBean.
CommunicationException
- The RMI Connector Client is not connected to RMI Connector Server
or a problem was encountered in the connection to the RMI Connector Server.public ObjectInstance createMBean(String className, ObjectName name, ObjectName loaderName) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException, InstanceNotFoundException
ObjectInstance
representing the remote MBean created.
createMBean
in interface RemoteMBeanServer
className
- The name of the Java class to be used by the MBeanServer
for creating the MBean.name
- The name of the MBean to be created.loaderName
- The name of the class loader to be used by the MBeanServer
.
ObjectInstance
representing the newly created MBean.
ReflectionException
- Wraps the exception that occurred when trying to invoke the MBean's constructor.
InstanceAlreadyExistsException
- The MBean is already under the control of the MBean server.
MBeanRegistrationException
- The preRegister
(MBeanRegistration
interface) method of the MBean has thrown an exception. The MBean will not be registered.
MBeanException
- Wraps an exception thrown by the MBean's constructor.
NotCompliantMBeanException
- This class is not a JMX compliant MBean.
InstanceNotFoundException
- The specified loader is not registered in the MBeanServer
.
CommunicationException
- The RMI Connector Client is not connected to RMI Connector Server
or a problem was encountered in the connection to the RMI Connector Server.public ObjectInstance createMBean(String className, ObjectName name, Object[] params, String[] signature) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException
ObjectInstance
representing the remote MBean created.
createMBean
in interface RemoteMBeanServer
className
- The name of the Java class to be used by the MBeanServer
for creating
the MBean.name
- The name of the MBean to be created.params
- An array containing the parameters of the constructor to be invoked.
A parameter can be any Java object that is serializable
.signature
- An array containing the signature of the constructor to be invoked.
ObjectInstance
representing the newly created MBean.
ReflectionException
- Wraps the exception that occurred when trying to invoke the MBean's
constructor.
InstanceAlreadyExistsException
- The MBean is already under the control of the MBean server.
MBeanRegistrationException
- The preRegister
(MBeanRegistration
interface) method of the MBean has thrown an exception. The MBean will not be registered.
MBeanException
- Wraps an exception thrown by the MBean's constructor.
NotCompliantMBeanException
- This class is not a JMX compliant MBean.
CommunicationException
- The RMI Connector Client is not connected to RMI Connector Server
or a problem was encountered in the connection to the RMI Connector Server.public ObjectInstance createMBean(String className, ObjectName name, ObjectName loaderName, Object[] params, String[] signature) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException, InstanceNotFoundException
ObjectInstance
representing the remote MBean created.
createMBean
in interface RemoteMBeanServer
className
- The name of the Java class to be used by the MBeanServer
for creating
the MBean.name
- The name of the MBean to be created.loaderName
- The name of the class loader to be used by the MBeanServer
.params
- An array containing the parameters of the constructor to be invoked.
A parameter can be any Java object that is serializable
.signature
- An array containing the signature of the constructor to be invoked.
ObjectInstance
representing the newly created MBean.
ReflectionException
- Wraps the exception that occurred when trying to invoke the MBean's
constructor.
InstanceAlreadyExistsException
- The MBean is already under the control of the MBean server.
MBeanRegistrationException
- The preRegister
(MBeanRegistration
interface) method of the MBean has thrown an exception. The MBean will not be registered.
MBeanException
- Wraps an exception thrown by the MBean's constructor.
NotCompliantMBeanException
- This class is not a JMX compliant MBean.
InstanceNotFoundException
- The specified loader is not registered in the MBeanServer
.
CommunicationException
- The RMI Connector Client is not connected to RMI Connector Server
or a problem was encountered in the connection to the RMI Connector Server.public void unregisterMBean(ObjectName name) throws InstanceNotFoundException, MBeanRegistrationException
ProxyMBean
and/or GenericProxy
) object from the ProxyFactory.
unregisterMBean
in interface RemoteMBeanServer
unregisterMBean
in interface ProxyHandler
name
- The name of the MBean to be deleted.
InstanceNotFoundException
- The specified MBean is not registered in the MBeanServer
.
MBeanRegistrationException
- The preDeregister
(MBeanRegistration
interface) method of the MBean has thrown an exception.
CommunicationException
- The RMI Connector Client is not connected to RMI Connector Server
or a problem was encountered in the connection to the RMI Connector Server.public boolean isRegistered(ObjectName name)
MBeanServer
.
isRegistered
in interface RemoteMBeanServer
name
- The object name of the MBean to be checked.
MBeanServer
, false otherwise.
RuntimeOperationsException
- Wraps an IllegalArgumentException: The object name in parameter is null.
CommunicationException
- The RMI Connector Client is not connected to RMI Connector Server
or a problem was encountered in the connection to the RMI Connector Server.public Set queryNames(ObjectName name, QueryExp query)
MBeanServer
. This method
allows any of the following to be obtained: The names of all MBeans,
the names of a set of MBeans specified by pattern matching on the
ObjectName
and/or a Query expression, a specific MBean name (equivalent to
testing whether an MBean is registered). When the object name is
null or empty, all the objects are to be selected (and filtered if
a query is specified). It returns the set of ObjectName
s for the
MBeans selected.
queryNames
in interface RemoteMBeanServer
name
- The object name pattern identifying the MBean names to be retrieved. If
null or empty, the names of all the registered MBeans will be retrieved.query
- The query expression to be applied for selecting MBeans.
ObjectName
s for the MBeans selected.
CommunicationException
- The RMI Connector Client is not connected to RMI Connector Server
or a problem was encountered in the connection to the RMI Connector Server.public Set queryMBeans(ObjectName name, QueryExp query)
MBeanServer
. This method allows any
of the following to be obtained: All MBeans, a set of MBeans specified
by pattern matching on the ObjectName
and/or a Query expression, a
specific MBean. When the object name is null or empty, all objects are
to be selected (and filtered if a query is specified). It returns the
set of ObjectInstance
for the selected MBeans.
queryMBeans
in interface RemoteMBeanServer
name
- The object name pattern identifying the MBeans to be retrieved. If
null or empty all the MBeans registered will be retrieved.query
- The query expression to be applied for selecting MBeans.
ObjectInstance
for the MBeans selected.
CommunicationException
- The RMI Connector Client is not connected to RMI Connector Server
or a problem was encountered in the connection to the RMI Connector Server.public Integer getMBeanCount()
MBeanServer
.
getMBeanCount
in interface RemoteMBeanServer
CommunicationException
- The RMI Connector Client is not connected to RMI Connector Server
or a problem was encountered in the connection to the RMI Connector Server.public String getDefaultDomain()
getDefaultDomain
in interface RemoteMBeanServer
CommunicationException
- The RMI Connector Client is not connected to RMI Connector Server
or a problem was encountered in the connection to the RMI Connector Server.public boolean isInstanceOf(ObjectName name, String className) throws InstanceNotFoundException
isInstanceOf
in interface RemoteMBeanServer
name
- The ObjectName
of the MBean.className
- The name of the class.
InstanceNotFoundException
- The MBean specified is not registered in the MBean server.public ObjectInstance getObjectInstance(ObjectName name) throws InstanceNotFoundException
ObjectInstance
for a given MBean registered with the MBeanServer
.
getObjectInstance
in interface RemoteMBeanServer
name
- The object name of the MBean.
ObjectInstance
associated to the MBean specified by name.
InstanceNotFoundException
- The specified MBean is not registered in the MBeanServer
.
CommunicationException
- The RMI Connector Client is not connected to RMI Connector Server
or a problem was encountered in the connection to the RMI Connector Server.public Object getAttribute(ObjectName name, String attribute) throws MBeanException, AttributeNotFoundException, InstanceNotFoundException, ReflectionException
getAttribute
in interface RemoteMBeanServer
getAttribute
in interface ProxyHandler
name
- The object name of the MBean from which the attribute is to be retrieved.attribute
- The name of the attribute to be retrieved.
serializable
.
AttributeNotFoundException
- The attribute specified is not accessible in the MBean.
MBeanException
- Wraps an exception thrown by the MBean's getter.
InstanceNotFoundException
- The specified MBean is not registered in the MBeanServer
.
ReflectionException
- An exception occurred when trying to invoke the getAttributes of a Dynamic MBean.
CommunicationException
- The RMI Connector Client is not connected to RMI Connector Server
or a problem was encountered in the connection to the RMI Connector Server.public AttributeList getAttributes(ObjectName name, String[] attributes) throws InstanceNotFoundException, ReflectionException
getAttributes
in interface RemoteMBeanServer
getAttributes
in interface ProxyHandler
name
- The object name of the MBean from within which the attributes are
to be retrieved.attributes
- A list of the attributes to be retrieved.
serializable
.
InstanceNotFoundExceptionThe
- MBean specified is not registered in the MBean server.
ReflectionException
- An exception occurred when trying to invoke the getAttributes of a Dynamic MBean.
CommunicationException
- The RMI Connector Client is not connected to RMI Connector Server
or a problem was encountered in the connection to the RMI Connector Server.
InstanceNotFoundException
- The specified MBean is not registered in the MBean server.public void setAttribute(ObjectName name, Attribute attribute) throws InstanceNotFoundException, AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException
setAttribute
in interface RemoteMBeanServer
setAttribute
in interface ProxyHandler
name
- The name of the MBean within which the attribute is to be set.attribute
- The modification to be performed: The identification of the attribute to
be set, the value it is to be set to, and the operator to apply.
The value of the attribute can be any Java object that is serializable
.
InstanceNotFoundException
- The MBean specified is not registered in the MBean server.
AttributeNotFoundException
- The attribute specified is not accessible in the MBean.
InvalidAttributeValueException
- The value specified for the attribute is not valid.
MBeanException
- Wraps an exception thrown by the MBean's setter.
ReflectionException
- Wraps an exception thrown while trying to instantiate and apply the
operator specified in Modification.
CommunicationException
- The RMI Connector Client is not connected to RMI Connector Server
or a problem was encountered in the connection to the RMI Connector Server.public AttributeList setAttributes(ObjectName name, AttributeList attributes) throws InstanceNotFoundException, ReflectionException
setAttributes
in interface RemoteMBeanServer
setAttributes
in interface ProxyHandler
name
- The object name of the MBean from within which the attributes are
to be set.attributes
- A list of the attributes to be set, their values and, optionally, the
operators to apply.
The value of the attributes can be any Java object that is serializable
.
serializable
.
InstanceNotFoundException
- The MBean specified is not registered in the MBean server.
ReflectionException
- An exception occurred when trying to invoke the setAttributes of a Dynamic MBean.
CommunicationException
- The RMI Connector Client is not connected to RMI Connector Server
or a problem was encountered in the connection to the RMI Connector Server.public Object invoke(ObjectName name, String methodName, Object[] arguments, String[] signature) throws InstanceNotFoundException, MBeanException, ReflectionException
invoke
in interface RemoteMBeanServer
invoke
in interface ProxyHandler
name
- The name of the MBean on which the method is to be invoked.methodName
- The name of the method to be invoked.arguments
- An array containing the arguments to be set when the method is invoked.
An argument can be any Java object that is serializable
.signature
- An array containing the signature of the method.
serializable
.
InstanceNotFoundException
- The MBean specified is not registered in the MBean server.
MBeanException
- Wraps an exception thrown by the MBean's invoked method.
ReflectionException
- Wraps a java.lang.Exception
thrown while trying to invoke the method.
CommunicationException
- The RMI Connector Client is not connected to RMI Connector Server
or a problem was encountered in the connection to the RMI Connector Server.public MBeanInfo getMBeanInfo(ObjectName name) throws InstanceNotFoundException, IntrospectionException, ReflectionException
MBeanInfo
object.
getMBeanInfo
in interface RemoteMBeanServer
getMBeanInfo
in interface ProxyHandler
name
- The names of the MBean whose attributes and actions will be returned.
MBeanInfo
which allows all methods and actions of
this MBean to be retrieved.
InstanceNotFoundException
- The MBean specified is not registered in the MBean server.
IntrospectionException
- An exception occurs during introspection.
ReflectionException
- Wraps an java.lang.Exception
thrown while
trying to invoke the getMBeanInfo
method.
CommunicationException
- The RMI Connector Client is not connected to RMI Connector Server
or a problem was encountered in the connection to the RMI Connector Server.public String getClassForProxyMBean(ObjectInstance instance) throws ProxyMBeanInstantiationException
ObjectInstance
), this
method returns the name of the Java class of the corresponding Proxy MBean.
The returned name can be null, if there is no Java class corresponding to
the needed Proxy MBean.
getClassForProxyMBean
in interface RemoteMBeanServer
instance
- The ObjectInstance
of the MBean which is represented by the ProxyMBean
.
ProxyMBean
.
ProxyMBeanInstantiationException
- An error occurs.
|
Open Source build 02 opendmk-1.0-b02 2007.10.01_19:17:46_MEST |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |