|
Sonic Management API | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sonicsw.mf.jmx.client.JMSConnectorClient
public class JMSConnectorClient
A JMS Connector uses the SonicMQ JMS implementation to provide JMX Connector functionality. Since the JMS Connector enables a single connection point for management communications to multiple JMX servers, a JMS address can indicate either the connector should be dedicated to a particular MBeanServer ("bound") or capable of addressing multiple servers ("unbound") (acheived through JMX domain & ObjectName patterns).
JMS Connector Clients are designed to be used exclusively with the Sonic Management containers and components which expose themselves using JMX and the Sonic Management JMX domain & ObjectName patterns. In an unbounded mode, JMX ObjectNames must reflect the said patterns otherwise remote calls will timeout.
Sonic Management JMX ObjectName patterns are of the form "<SM domain>.<SM container name>:ID=<SM component name>".
The JMS Connector client exposes MBean server methods suitable for remoting. If the JMS Connector is not dedicated to a particular MBean server ("unbound"), MBean server methods that are MBean server specific (e.g. such as getDefaultDomain()) will throw an exception when called. Remote support is indicated in the documentation for each method.
The JMSConnectorClient wraps all unreported exceptions/error in a CommunicationException.
Unlike other JMX connectors, the default connector connect behavior is to wait for a connection to be
established. Using the connect(JMSConnectorAddress)
the connector will wait until a connection can be established or a terminal condition (e.g. inauthentic client)
occurs. This connection behavior can be modified to timeout after a specified period (see
connect(JMSConnectorAddress, long)
).
The connector remote request behavior can also be customized; by default requests will timeout after 30 seconds
and this timeout may encapsulate waiting for a (re)connect or a response to arrive. It is possible that requests
will timeout due to heavily loaded systems and large amounts of data. In such cases the default request timeout
may be modified using setRequestTimeout(long)
. Also since
the default behavior is to span short term disconnects, the connector behavior can be modified to fail requests
immediately if the connector is not actaully connected at the time the request is made; this done using
setFailWhenDisconnected(boolean)
. This specific
modified behavior does not apply to the add/remove of notification subscriptions.
The JMS Connector implements its own reconnect logic that includes reestablishing context. This allows the connector to handle short-term network failures and alleviates API programmers from implementing their own reconnect logic.
NOTE: JMX (as of v1.1) does not formalize the remote access to JMX MBean servers. Sun have provided sample connectors on which this JMS connector has been loosely modelled. When remote access has been formalized in the JMX specification, this JMS Connector will be made conformant to the specification.
JMSConnectorAddress
,
CommunicationException
,
MBeanServer
Constructor Summary | |
---|---|
JMSConnectorClient()
|
Method Summary | |
---|---|
void |
addNotificationListener(ObjectName objectName,
NotificationListener listener,
NotificationFilter filter,
java.lang.Object handback)
Supported connector modes: bounded, unbounded |
void |
addNotificationListener(ObjectName objectName,
NotificationListener listener,
NotificationFilter filter,
java.lang.Object handback,
long timeout)
Supported connector modes: bounded, unbounded |
void |
addNotificationListener(ObjectName name,
ObjectName listener,
NotificationFilter filter,
java.lang.Object handback)
Unsupported |
java.lang.String |
connect(JMSConnectorAddress address)
Connects the connector to the underlying JMS transport. |
java.lang.String |
connect(JMSConnectorAddress address,
long timeout)
Connects the connector to the underlying JMS transport. |
ObjectInstance |
createMBean(java.lang.String className,
ObjectName objectName)
Supported connector modes: bounded |
ObjectInstance |
createMBean(java.lang.String className,
ObjectName objectName,
java.lang.Object[] params,
java.lang.String[] signature)
Supported connector modes: bounded |
ObjectInstance |
createMBean(java.lang.String className,
ObjectName objectName,
ObjectName loaderName)
Supported connector modes: bounded |
ObjectInstance |
createMBean(java.lang.String className,
ObjectName objectName,
ObjectName loaderName,
java.lang.Object[] params,
java.lang.String[] signature)
Supported connector modes: bounded |
void |
deregisterRetryCallback()
|
void |
disconnect()
Disconnect the connector from the underlying JMS transport. |
java.lang.Object |
getAttribute(ObjectName objectName,
java.lang.String attribute)
Supported connector modes: bounded, unbounded |
AttributeList |
getAttributes(ObjectName objectName,
java.lang.String[] attributes)
Supported connector modes: bounded, unbounded |
IConnectionListener |
getConnectionListener()
Gets the (singleton) connection listener for the connector. |
long |
getConnectTimeout()
Gets the connect timeout in milliseconds. |
java.lang.String |
getDefaultDomain()
Supported connector modes: bounded |
java.lang.String[] |
getDomains()
Returns the list of domains in which any MBean is currently registered. |
boolean |
getFailWhenDisconnected()
|
java.lang.Integer |
getMBeanCount()
Supported connector modes: bounded |
MBeanInfo |
getMBeanInfo(ObjectName objectName)
Supported connector modes: bounded, unbounded |
long |
getNotificationSubscriptionRenewalInterval()
Gets the interval, in seconds, that notification subscriptions will be renewed |
long |
getNotificationSubscriptionTimeout()
Gets the duration, in seconds, a notification subscription will "live" before it must be renewed |
ObjectInstance |
getObjectInstance(ObjectName objectName)
Supported connector modes: bounded, unbounded |
IOrphanedReplyListener |
getOrphanedReplyListener()
Gets the (singleton) orphaned reply listener for the connector. |
long |
getRequestTimeout()
Gets the default timeout the connector waits for responses from remote requests. |
long |
getSocketConnectTimeout()
Gets the socket connect timeout in milliseconds. |
int |
getTraceMask()
Gets System.out runtime debug tracing mask. |
boolean |
getUseOnewaySubscriptionRequests()
By default JMX notification subscriptions (and renewals) are made using a request/reply mechanism that ensures successful is made or the user is notified via a registered callback. |
java.lang.Object |
invoke(ObjectName objectName,
java.lang.String operationName,
java.lang.Object[] params,
java.lang.String[] signature)
Supported connector modes: bounded, unbounded |
java.lang.Object |
invoke(ObjectName objectName,
java.lang.String operationName,
java.lang.Object[] params,
java.lang.String[] signature,
java.lang.ClassLoader loader)
Supported connector modes: bounded, unbounded |
java.lang.Object |
invoke(ObjectName objectName,
java.lang.String operationName,
java.lang.Object[] params,
java.lang.String[] signature,
long timeout)
This method allows remote invocation of the given operations with a particular timeout. |
java.lang.Object |
invoke(ObjectName objectName,
java.lang.String operationName,
java.lang.Object[] params,
java.lang.String[] signature,
long timeout,
java.lang.ClassLoader loader)
This method allows remote invocation of the given operations with a particular timeout. |
boolean |
isConnected()
|
boolean |
isInstanceOf(ObjectName objectName,
java.lang.String className)
Supported connector modes: bounded, unbounded |
boolean |
isRegistered(ObjectName objectName)
Supported connector modes: bounded, unbounded |
java.util.Set |
queryMBeans(ObjectName objectName,
QueryExp query)
Supported connector modes: bounded |
java.util.Set |
queryNames(ObjectName objectName,
QueryExp query)
Supported connector modes: bounded |
void |
registerRetryCallback(com.sonicsw.mf.comm.IRetryCallback rcb)
|
void |
removeNotificationListener(ObjectName objectName,
NotificationListener listener)
Supported connector modes: bounded, unbounded |
void |
removeNotificationListener(ObjectName objectName,
NotificationListener listener,
NotificationFilter filter,
java.lang.Object handback)
Supported connector modes: bounded, unbounded |
void |
removeNotificationListener(ObjectName objectName,
ObjectName listener)
Supported connector modes: bounded, unbounded |
void |
removeNotificationListener(ObjectName objectName,
ObjectName listener,
NotificationFilter filter,
java.lang.Object handback)
Supported connector modes: bounded, unbounded |
void |
setAttribute(ObjectName objectName,
Attribute attribute)
Supported connector modes: bounded, unbounded |
AttributeList |
setAttributes(ObjectName objectName,
AttributeList attributes)
Supported connector modes: bounded, unbounded |
void |
setConnectionListener(IConnectionListener listener)
Sets the (singleton) connection listener for the connector. |
void |
setConnectTimeout(long milliseconds)
Sets the connect timeout in milliseconds. |
void |
setFailWhenDisconnected(boolean failWhenDisconnected)
When true, causes requests (invoke, setAttribute, etc.) to fail immediately if the connector is in a transient disconnected state. |
void |
setNotificationSubscriptionRenewalInterval(long interval)
Sets the interval, in seconds, that notification subscriptions will be renewed |
void |
setNotificationSubscriptionTimeout(long seconds)
Sets the duration, in seconds, that a notification subscription will "live" before it must be renewed |
void |
setOrphanedReplyListener(IOrphanedReplyListener listener)
Sets the (singleton) orphaned reply listener for the connector. |
void |
setRequestTimeout(long milliseconds)
Sets the default timeout the connector waits for responses from remote requests. |
void |
setSocketConnectTimeout(long milliseconds)
Sets the socket connect timeout in milliseconds. |
void |
setTraceMask(int maskValue)
Sets System.out runtime debug tracing mask. |
void |
setUseOnewaySubscriptionRequests(boolean useOneway)
By default JMX notification subscriptions (and renewals) are made using a request/reply mechanism that ensures successful is made or the user is notified via a registered callback. |
void |
unregisterMBean(ObjectName objectName)
Supported connector modes: bounded |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JMSConnectorClient()
Method Detail |
---|
public void addNotificationListener(ObjectName objectName, NotificationListener listener, NotificationFilter filter, java.lang.Object handback) throws InstanceNotFoundException
addNotificationListener
in interface IRemoteMBeanServer
addNotificationListener
in interface MBeanServerConnection
objectName
- 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.MBeanServer.addNotificationListener(ObjectName, NotificationListener, NotificationFilter, Object)
public void addNotificationListener(ObjectName objectName, NotificationListener listener, NotificationFilter filter, java.lang.Object handback, long timeout) throws InstanceNotFoundException
InstanceNotFoundException
MBeanServer.addNotificationListener(ObjectName, NotificationListener, NotificationFilter, Object)
public void addNotificationListener(ObjectName name, ObjectName listener, NotificationFilter filter, java.lang.Object handback) throws InstanceNotFoundException
addNotificationListener
in interface IRemoteMBeanServer
addNotificationListener
in interface MBeanServerConnection
name
- The name of the MBean on which the listener should
be added.listener
- The object name of the listener 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 of the
notification listener or of the notification broadcaster does
not match any of the registered MBeans.MBeanServer.addNotificationListener(ObjectName, ObjectName, NotificationFilter, Object)
public java.lang.String connect(JMSConnectorAddress address)
NOTE: connect() will block until either the connection is established, a non-recoverable condition was determined (in which case a runtime exception will be thrown) or the thread invoking connect() is interrupted. Recoverable conditions include those consitions that might reasonably be expected, such as when the SonicMQ broker designated to carry management communications comes on line. Non-recoverable conditions include more permanent condition like the inability to resolve an IP address or a security failure such as an inauthentic client.
connect
in interface IRemoteMBeanServer
address
- The attributes describing how to connect to the underlying JMS transport.
disconnect()
public java.lang.String connect(JMSConnectorAddress address, long timeout)
NOTE: connect() will block until either the connection is established, a non-recoverable condition was determined (in which case a runtime exception will be thrown) or the thread invoking connect() is interrupted. Recoverable conditions include those consitions that might reasonably be expected, such as when the SonicMQ broker designated to carry management communications comes on line. Non-recoverable conditions include more permanent condition like the inability to resolve an IP address or a security failure such as an inauthentic client.
address
- The attributes describing how to connect to the underlying JMS transport.timeout
- The number of milliseconds within which the initial connection must be established.
disconnect()
public ObjectInstance createMBean(java.lang.String className, ObjectName objectName) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException
createMBean
in interface IRemoteMBeanServer
createMBean
in interface MBeanServerConnection
className
- The class name of the MBean to be instantiated.objectName
- The object name of the MBean. May be null.
ObjectInstance
, containing the
ObjectName
and the Java class name of the newly
instantiated MBean. If the contained ObjectName
is n
, the contained Java class name is
getMBeanInfo(n)
.getClassName()
.
ReflectionException
- Wraps a
java.lang.ClassNotFoundException
or a
java.lang.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
- The constructor of the MBean has
thrown an exception
NotCompliantMBeanException
- This class is not a JMX
compliant MBeanMBeanServer.createMBean(String, ObjectName)
public ObjectInstance createMBean(java.lang.String className, ObjectName objectName, java.lang.Object[] params, java.lang.String[] signature) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException
createMBean
in interface IRemoteMBeanServer
createMBean
in interface MBeanServerConnection
className
- The class name of the MBean to be instantiated.objectName
- The object name of the MBean. May be null.params
- An array containing the parameters of the
constructor to be invoked.signature
- An array containing the signature of the
constructor to be invoked.
ObjectInstance
, containing the
ObjectName
and the Java class name of the newly
instantiated MBean. If the contained ObjectName
is n
, the contained Java class name is
getMBeanInfo(n)
.getClassName()
.
ReflectionException
- Wraps a
java.lang.ClassNotFoundException
or a
java.lang.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
- The constructor of the MBean has
thrown an exception
NotCompliantMBeanException
- This class is not a JMX
compliant MBeanMBeanServer.createMBean(String, ObjectName, Object[], String[])
public ObjectInstance createMBean(java.lang.String className, ObjectName objectName, ObjectName loaderName) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException, InstanceNotFoundException
createMBean
in interface IRemoteMBeanServer
createMBean
in interface MBeanServerConnection
className
- The class name of the MBean to be instantiated.objectName
- The object name of the MBean. May be null.loaderName
- The object name of the class loader to be used.
ObjectInstance
, containing the
ObjectName
and the Java class name of the newly
instantiated MBean. If the contained ObjectName
is n
, the contained Java class name is
getMBeanInfo(n)
.getClassName()
.
ReflectionException
- Wraps a
java.lang.ClassNotFoundException
or a
java.lang.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
- The constructor of the MBean has
thrown an exception
NotCompliantMBeanException
- This class is not a JMX
compliant MBean
InstanceNotFoundException
- The specified class loader
is not registered in the MBean server.MBeanServer.createMBean(String, ObjectName, ObjectName)
public ObjectInstance createMBean(java.lang.String className, ObjectName objectName, ObjectName loaderName, java.lang.Object[] params, java.lang.String[] signature) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException, InstanceNotFoundException
createMBean
in interface IRemoteMBeanServer
createMBean
in interface MBeanServerConnection
className
- The class name of the MBean to be instantiated.objectName
- The object name of the MBean. May be null.loaderName
- The object name of the class loader to be used.params
- An array containing the parameters of the
constructor to be invoked.signature
- An array containing the signature of the
constructor to be invoked.
ObjectInstance
, containing the
ObjectName
and the Java class name of the newly
instantiated MBean. If the contained ObjectName
is n
, the contained Java class name is
getMBeanInfo(n)
.getClassName()
.
ReflectionException
- Wraps a
java.lang.ClassNotFoundException
or a
java.lang.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
- The constructor of the MBean has
thrown an exception
NotCompliantMBeanException
- This class is not a JMX
compliant MBean
InstanceNotFoundException
- The specified class loader
is not registered in the MBean server.MBeanServer.createMBean(String, ObjectName, ObjectName, Object[], String[])
public void deregisterRetryCallback()
com.sonicsw.mf.comm.IConnectorClient#deregisterRetryCallback()
public void disconnect()
disconnect
in interface IRemoteMBeanServer
connect(JMSConnectorAddress)
public java.lang.Object getAttribute(ObjectName objectName, java.lang.String attribute) throws MBeanException, AttributeNotFoundException, InstanceNotFoundException, ReflectionException
getAttribute
in interface IRemoteMBeanServer
getAttribute
in interface MBeanServerConnection
objectName
- The object name of the MBean from which the
attribute is to be retrieved.attribute
- A String specifying the name of the attribute
to be retrieved.
MBeanException
- Wraps an exception thrown by the
MBean's getter.
AttributeNotFoundException
- The attribute specified
is not accessible in the MBean.
InstanceNotFoundException
- The MBean specified is not
registered in the MBean server.
ReflectionException
- Wraps a
java.lang.Exception
thrown when trying to invoke
the setter.MBeanServer.getAttribute(ObjectName, String)
public AttributeList getAttributes(ObjectName objectName, java.lang.String[] attributes) throws InstanceNotFoundException, ReflectionException
getAttributes
in interface IRemoteMBeanServer
getAttributes
in interface MBeanServerConnection
objectName
- The object name of the MBean from which the
attributes are retrieved.attributes
- A list of the attributes to be retrieved.
InstanceNotFoundException
- The MBean specified is not
registered in the MBean server.
ReflectionException
- An exception occurred when
trying to invoke the getAttributes method of a Dynamic MBean.MBeanServer.getAttributes(ObjectName, String[])
public IConnectionListener getConnectionListener()
public long getConnectTimeout()
setConnectTimeout(long)
public java.lang.String getDefaultDomain()
getDefaultDomain
in interface IRemoteMBeanServer
getDefaultDomain
in interface MBeanServerConnection
MBeanServer.getDefaultDomain()
public java.lang.String[] getDomains() throws java.io.IOException
MBeanServerConnection
Returns the list of domains in which any MBean is currently
registered. A string is in the returned array if and only if
there is at least one MBean registered with an ObjectName whose
getDomain()
is equal to that
string. The order of strings within the returned array is
not defined.
getDomains
in interface MBeanServerConnection
java.io.IOException
- A communication problem occurred when
talking to the MBean server.public boolean getFailWhenDisconnected()
setFailWhenDisconnected(boolean)
public java.lang.Integer getMBeanCount()
getMBeanCount
in interface IRemoteMBeanServer
getMBeanCount
in interface MBeanServerConnection
MBeanServer.getMBeanCount()
public MBeanInfo getMBeanInfo(ObjectName objectName) throws InstanceNotFoundException, IntrospectionException, ReflectionException
getMBeanInfo
in interface IRemoteMBeanServer
getMBeanInfo
in interface MBeanServerConnection
objectName
- The name of the MBean to analyze
MBeanInfo
allowing the
retrieval of all attributes and operations of this MBean.
InstanceNotFoundException
- The MBean specified was
not found.
IntrospectionException
- An exception occured during
introspection.
ReflectionException
- An exception occurred when
trying to invoke the getMBeanInfo of a Dynamic MBean.MBeanServer.getMBeanInfo(ObjectName)
public long getNotificationSubscriptionRenewalInterval()
public long getNotificationSubscriptionTimeout()
public ObjectInstance getObjectInstance(ObjectName objectName) throws InstanceNotFoundException
getObjectInstance
in interface IRemoteMBeanServer
getObjectInstance
in interface MBeanServerConnection
objectName
- The object name of the MBean.
ObjectInstance
associated with the MBean
specified by name. The contained ObjectName
is name
and the contained class name is
getMBeanInfo(name)
.getClassName()
.
InstanceNotFoundException
- The MBean specified is not
registered in the MBean server.MBeanServer.getObjectInstance(ObjectName)
public IOrphanedReplyListener getOrphanedReplyListener()
public long getRequestTimeout()
public long getSocketConnectTimeout()
setSocketConnectTimeout(long)
public int getTraceMask()
public boolean getUseOnewaySubscriptionRequests()
By using a oneway subscription request, the client will never be notified that the subscription request failed. This is useful if there are a large volume of notification sources to which a subsciption has been made and such sources are often not running when the subscription is made or renewed.
IConnectionListener.onNotificationListenerRenewalFailure(Exception)
public java.lang.Object invoke(ObjectName objectName, java.lang.String operationName, java.lang.Object[] params, java.lang.String[] signature) throws InstanceNotFoundException, MBeanException, ReflectionException
invoke
in interface IRemoteMBeanServer
invoke
in interface MBeanServerConnection
objectName
- The object name of the MBean on which the method is
to be invoked.operationName
- The name of the operation to be invoked.params
- An array containing the parameters to be set when
the operation is invokedsignature
- An array containing the signature of the
operation. The class objects will be loaded using the same
class loader as the one used for loading the MBean on which the
operation was invoked.
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.MBeanServer.invoke(ObjectName, String, Object[], String[])
public java.lang.Object invoke(ObjectName objectName, java.lang.String operationName, java.lang.Object[] params, java.lang.String[] signature, java.lang.ClassLoader loader) throws InstanceNotFoundException, MBeanException, ReflectionException
InstanceNotFoundException
MBeanException
ReflectionException
MBeanServer.invoke(ObjectName, String, Object[], String[])
public java.lang.Object invoke(ObjectName objectName, java.lang.String operationName, java.lang.Object[] params, java.lang.String[] signature, long timeout) throws InstanceNotFoundException, MBeanException, ReflectionException
InstanceNotFoundException
MBeanException
ReflectionException
setRequestTimeout(long)
,
MBeanServer.invoke(ObjectName, String, Object[], String[])
public java.lang.Object invoke(ObjectName objectName, java.lang.String operationName, java.lang.Object[] params, java.lang.String[] signature, long timeout, java.lang.ClassLoader loader) throws InstanceNotFoundException, MBeanException, ReflectionException
InstanceNotFoundException
MBeanException
ReflectionException
setRequestTimeout(long)
,
MBeanServer.invoke(ObjectName, String, Object[], String[])
public boolean isConnected()
isConnected
in interface IRemoteMBeanServer
public boolean isInstanceOf(ObjectName objectName, java.lang.String className) throws InstanceNotFoundException
isInstanceOf
in interface IRemoteMBeanServer
isInstanceOf
in interface MBeanServerConnection
objectName
- The ObjectName
of the MBean.className
- The name of the class.
InstanceNotFoundException
- The MBean specified is not
registered in the MBean server.MBeanServer.isInstanceOf(ObjectName, String)
public boolean isRegistered(ObjectName objectName)
isRegistered
in interface IRemoteMBeanServer
isRegistered
in interface MBeanServerConnection
objectName
- The object name of the MBean to be checked.
MBeanServer.isRegistered(ObjectName)
public java.util.Set queryMBeans(ObjectName objectName, QueryExp query)
queryMBeans
in interface IRemoteMBeanServer
queryMBeans
in interface MBeanServerConnection
objectName
- The object name pattern identifying the MBeans to
be retrieved. If null or no domain and key properties are
specified, all the MBeans registered will be retrieved.query
- The query expression to be applied for selecting
MBeans. If null no query expression will be applied for
selecting MBeans.
ObjectInstance
objects for the selected MBeans. If no MBean satisfies the
query an empty list is returned.MBeanServer.queryMBeans(ObjectName, QueryExp)
public java.util.Set queryNames(ObjectName objectName, QueryExp query)
queryNames
in interface IRemoteMBeanServer
queryNames
in interface MBeanServerConnection
objectName
- The object name pattern identifying the MBean names
to be retrieved. If null oror no domain and key properties are
specified, the name of all registered MBeans will be retrieved.query
- The query expression to be applied for selecting
MBeans. If null no query expression will be applied for
selecting MBeans.
MBeanServer.queryNames(ObjectName, QueryExp)
public void registerRetryCallback(com.sonicsw.mf.comm.IRetryCallback rcb)
com.sonicsw.mf.comm.IConnectorClient#registerRetryCallback(IRetryCallback)
public void removeNotificationListener(ObjectName objectName, NotificationListener listener) throws InstanceNotFoundException, ListenerNotFoundException
removeNotificationListener
in interface IRemoteMBeanServer
removeNotificationListener
in interface MBeanServerConnection
objectName
- The name of the MBean on which the listener should
be removed.listener
- The object name of the listener to be removed.
InstanceNotFoundException
- The MBean name provided
does not match any of the registered MBeans.
ListenerNotFoundException
- The listener is not
registered in the MBean.MBeanServer.removeNotificationListener(ObjectName, NotificationListener)
public void removeNotificationListener(ObjectName objectName, NotificationListener listener, NotificationFilter filter, java.lang.Object handback) throws InstanceNotFoundException, ListenerNotFoundException
removeNotificationListener
in interface IRemoteMBeanServer
removeNotificationListener
in interface MBeanServerConnection
objectName
- The name of the MBean on which the listener should
be removed.listener
- A 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.
InstanceNotFoundException
- The MBean name provided
does not match any of the registered MBeans.
ListenerNotFoundException
- The listener is not
registered in the MBean, or it is not registered with the given
filter and handback.MBeanServer.removeNotificationListener(ObjectName, NotificationListener, NotificationFilter, Object)
public void removeNotificationListener(ObjectName objectName, ObjectName listener) throws InstanceNotFoundException, ListenerNotFoundException
removeNotificationListener
in interface IRemoteMBeanServer
removeNotificationListener
in interface MBeanServerConnection
objectName
- The name of the MBean on which the listener should
be removed.listener
- The object name of the listener to be removed.
InstanceNotFoundException
- The MBean name provided
does not match any of the registered MBeans.
ListenerNotFoundException
- The listener is not
registered in the MBean.MBeanServer.removeNotificationListener(ObjectName, ObjectName)
public void removeNotificationListener(ObjectName objectName, ObjectName listener, NotificationFilter filter, java.lang.Object handback) throws InstanceNotFoundException, ListenerNotFoundException
removeNotificationListener
in interface IRemoteMBeanServer
removeNotificationListener
in interface MBeanServerConnection
objectName
- The name of the MBean on which the listener should
be removed.listener
- A 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.
InstanceNotFoundException
- The MBean name provided
does not match any of the registered MBeans.
ListenerNotFoundException
- The listener is not
registered in the MBean, or it is not registered with the given
filter and handback.MBeanServer.removeNotificationListener(ObjectName, ObjectName, NotificationFilter, Object)
public void setAttribute(ObjectName objectName, Attribute attribute) throws InstanceNotFoundException, AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException
setAttribute
in interface IRemoteMBeanServer
setAttribute
in interface MBeanServerConnection
objectName
- The name of the MBean within which the attribute is
to be set.attribute
- The identification of the attribute to be set
and the value it is to be set to.
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 a
java.lang.Exception
thrown when trying to invoke
the setter.MBeanServer.setAttribute(ObjectName, Attribute)
public AttributeList setAttributes(ObjectName objectName, AttributeList attributes) throws InstanceNotFoundException, ReflectionException
setAttributes
in interface IRemoteMBeanServer
setAttributes
in interface MBeanServerConnection
objectName
- The object name of the MBean within which the
attributes are to be set.attributes
- A list of attributes: The identification of
the attributes to be set and the values they are to be set to.
InstanceNotFoundException
- The MBean specified is not
registered in the MBean server.
ReflectionException
- An exception occurred when
trying to invoke the getAttributes method of a Dynamic MBean.MBeanServer.setAttributes(ObjectName, AttributeList)
public void setConnectionListener(IConnectionListener listener)
listener
- Reference to an instance of an IConnectionListener implementationpublic void setConnectTimeout(long milliseconds)
setSocketConnectTimeout(long)
,
connect(JMSConnectorAddress, long)
public void setFailWhenDisconnected(boolean failWhenDisconnected)
failWhenDisconnected
- Flag to indicate if immediate failure should occur when in disconnected statepublic void setNotificationSubscriptionRenewalInterval(long interval)
public void setNotificationSubscriptionTimeout(long seconds)
public void setOrphanedReplyListener(IOrphanedReplyListener listener)
listener
- Reference to an instance of an IOrphanedReplyListener implementationpublic void setRequestTimeout(long milliseconds)
milliseconds
- Timeout value in millisecondspublic void setSocketConnectTimeout(long milliseconds)
setConnectTimeout(long)
public void setTraceMask(int maskValue)
public void setUseOnewaySubscriptionRequests(boolean useOneway)
By using a oneway subscription request, the client will never be notified that the subscription request failed. This is useful if there are a large volume of notification sources to which a subsciption has been made and such sources are often not running when the subscription is made or renewed.
useOneway
- When true, oneway notification subscription requests will be made.IConnectionListener.onNotificationListenerRenewalFailure(Exception)
public void unregisterMBean(ObjectName objectName) throws InstanceNotFoundException, MBeanRegistrationException
unregisterMBean
in interface IRemoteMBeanServer
unregisterMBean
in interface MBeanServerConnection
objectName
- The object name of the MBean to be unregistered.
InstanceNotFoundException
- The MBean specified is not
registered in the MBean server.
MBeanRegistrationException
- The preDeregister
((MBeanRegistration
interface) method of the MBean
has thrown an exception.MBeanServer.unregisterMBean(ObjectName objectName)
|
Sonic Management API | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |