Sonic Management API

com.sonicsw.mf.jmx.client
Class JMSConnectorClient

java.lang.Object
  extended by com.sonicsw.mf.jmx.client.JMSConnectorClient
All Implemented Interfaces:
IRemoteMBeanServer

public class JMSConnectorClient
extends java.lang.Object
implements IRemoteMBeanServer

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.

See Also:
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
 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
 java.lang.String getDefaultDomain()
          Supported connector modes: bounded
 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 connect timeout
 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 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 connectTimeout)
          Sets the connect timeout
 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 timeout)
          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 timeout)
          Sets the default timeout the connector waits for responses from remote requests.
 void setSocketConnectTimeout(long socketConnectTimeout)
          Sets the socket connect timeout
 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

JMSConnectorClient

public JMSConnectorClient()
Method Detail

addNotificationListener

public void addNotificationListener(ObjectName objectName,
                                    NotificationListener listener,
                                    NotificationFilter filter,
                                    java.lang.Object handback)
                             throws InstanceNotFoundException
Supported connector modes: bounded, unbounded

Specified by:
addNotificationListener in interface IRemoteMBeanServer
Throws:
InstanceNotFoundException
See Also:
MBeanServer.addNotificationListener(ObjectName, NotificationListener, NotificationFilter, Object)

addNotificationListener

public void addNotificationListener(ObjectName objectName,
                                    NotificationListener listener,
                                    NotificationFilter filter,
                                    java.lang.Object handback,
                                    long timeout)
                             throws InstanceNotFoundException
Supported connector modes: bounded, unbounded

Throws:
InstanceNotFoundException
See Also:
MBeanServer.addNotificationListener(ObjectName, NotificationListener, NotificationFilter, Object)

connect

public java.lang.String connect(JMSConnectorAddress address)
Connects the connector to the underlying JMS transport.

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.

Specified by:
connect in interface IRemoteMBeanServer
Parameters:
address - The attributes describing how to connect to the underlying JMS transport.
Returns:
If the connector address dedicates the connector to a particular MBeanServer, the MBeanServer identity is returned, otherwise null is returned.
See Also:
disconnect()

connect

public java.lang.String connect(JMSConnectorAddress address,
                                long timeout)
Connects the connector to the underlying JMS transport.

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.

Parameters:
address - The attributes describing how to connect to the underlying JMS transport.
timeout - The length of time in which the initial connection must be established.
Returns:
If the connector address dedicates the connector to a particular MBeanServer, the MBeanServer identity is returned, otherwise null is returned.
See Also:
disconnect()

createMBean

public ObjectInstance createMBean(java.lang.String className,
                                  ObjectName objectName)
                           throws ReflectionException,
                                  InstanceAlreadyExistsException,
                                  MBeanRegistrationException,
                                  MBeanException,
                                  NotCompliantMBeanException
Supported connector modes: bounded

Specified by:
createMBean in interface IRemoteMBeanServer
Throws:
ReflectionException
InstanceAlreadyExistsException
MBeanRegistrationException
MBeanException
NotCompliantMBeanException
See Also:
MBeanServer.createMBean(String, ObjectName)

createMBean

public ObjectInstance createMBean(java.lang.String className,
                                  ObjectName objectName,
                                  java.lang.Object[] params,
                                  java.lang.String[] signature)
                           throws ReflectionException,
                                  InstanceAlreadyExistsException,
                                  MBeanRegistrationException,
                                  MBeanException,
                                  NotCompliantMBeanException
Supported connector modes: bounded

Specified by:
createMBean in interface IRemoteMBeanServer
Throws:
ReflectionException
InstanceAlreadyExistsException
MBeanRegistrationException
MBeanException
NotCompliantMBeanException
See Also:
MBeanServer.createMBean(String, ObjectName, Object[], String[])

createMBean

public ObjectInstance createMBean(java.lang.String className,
                                  ObjectName objectName,
                                  ObjectName loaderName)
                           throws ReflectionException,
                                  InstanceAlreadyExistsException,
                                  MBeanRegistrationException,
                                  MBeanException,
                                  NotCompliantMBeanException,
                                  InstanceNotFoundException
Supported connector modes: bounded

Specified by:
createMBean in interface IRemoteMBeanServer
Throws:
ReflectionException
InstanceAlreadyExistsException
MBeanRegistrationException
MBeanException
NotCompliantMBeanException
InstanceNotFoundException
See Also:
MBeanServer.createMBean(String, ObjectName, ObjectName)

createMBean

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
Supported connector modes: bounded

Specified by:
createMBean in interface IRemoteMBeanServer
Throws:
ReflectionException
InstanceAlreadyExistsException
MBeanRegistrationException
MBeanException
NotCompliantMBeanException
InstanceNotFoundException
See Also:
MBeanServer.createMBean(String, ObjectName, ObjectName, Object[], String[])

deregisterRetryCallback

public void deregisterRetryCallback()
See Also:
com.sonicsw.mf.comm.IConnectorClient#deregisterRetryCallback()

disconnect

public void disconnect()
Disconnect the connector from the underlying JMS transport.

Specified by:
disconnect in interface IRemoteMBeanServer
See Also:
connect(JMSConnectorAddress)

getAttribute

public java.lang.Object getAttribute(ObjectName objectName,
                                     java.lang.String attribute)
                              throws MBeanException,
                                     AttributeNotFoundException,
                                     InstanceNotFoundException,
                                     ReflectionException
Supported connector modes: bounded, unbounded

Specified by:
getAttribute in interface IRemoteMBeanServer
Throws:
MBeanException
AttributeNotFoundException
InstanceNotFoundException
ReflectionException
See Also:
MBeanServer.getAttribute(ObjectName, String)

getAttributes

public AttributeList getAttributes(ObjectName objectName,
                                   java.lang.String[] attributes)
                            throws InstanceNotFoundException,
                                   ReflectionException
Supported connector modes: bounded, unbounded

Specified by:
getAttributes in interface IRemoteMBeanServer
Throws:
InstanceNotFoundException
ReflectionException
See Also:
MBeanServer.getAttributes(ObjectName, String[])

getConnectionListener

public IConnectionListener getConnectionListener()
Gets the (singleton) connection listener for the connector.

Returns:
Reference to a registered IConnectionListener implementation

getConnectTimeout

public long getConnectTimeout()
Gets the connect timeout


getDefaultDomain

public java.lang.String getDefaultDomain()
Supported connector modes: bounded

Specified by:
getDefaultDomain in interface IRemoteMBeanServer
See Also:
MBeanServer.getDefaultDomain()

getFailWhenDisconnected

public boolean getFailWhenDisconnected()
Returns:
Current setting of "failWhenDisconnected" flag
See Also:
setFailWhenDisconnected(boolean)

getMBeanCount

public java.lang.Integer getMBeanCount()
Supported connector modes: bounded

Specified by:
getMBeanCount in interface IRemoteMBeanServer
See Also:
MBeanServer.getMBeanCount()

getMBeanInfo

public MBeanInfo getMBeanInfo(ObjectName objectName)
                       throws InstanceNotFoundException,
                              IntrospectionException,
                              ReflectionException
Supported connector modes: bounded, unbounded

Specified by:
getMBeanInfo in interface IRemoteMBeanServer
Throws:
InstanceNotFoundException
IntrospectionException
ReflectionException
See Also:
MBeanServer.getMBeanInfo(ObjectName)

getNotificationSubscriptionRenewalInterval

public long getNotificationSubscriptionRenewalInterval()
Gets the interval, in seconds, that notification subscriptions will be renewed

Returns:
Current notification subscription renewal interval value in seconds

getNotificationSubscriptionTimeout

public long getNotificationSubscriptionTimeout()
Gets the duration, in seconds, a notification subscription will "live" before it must be renewed

Returns:
Current notification subscription timeout value in seconds

getObjectInstance

public ObjectInstance getObjectInstance(ObjectName objectName)
                                 throws InstanceNotFoundException
Supported connector modes: bounded, unbounded

Specified by:
getObjectInstance in interface IRemoteMBeanServer
Throws:
InstanceNotFoundException
See Also:
MBeanServer.getObjectInstance(ObjectName)

getOrphanedReplyListener

public IOrphanedReplyListener getOrphanedReplyListener()
Gets the (singleton) orphaned reply listener for the connector.

Returns:
Reference to a registered IOrphanedReplyListener instance

getRequestTimeout

public long getRequestTimeout()
Gets the default timeout the connector waits for responses from remote requests.

Returns:
Current request timeout value in milliseconds

getSocketConnectTimeout

public long getSocketConnectTimeout()
Gets the connect timeout


getTraceMask

public int getTraceMask()
Gets System.out runtime debug tracing mask. Values are as per JMS CONNECTOR values.


getUseOnewaySubscriptionRequests

public 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.

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.

Returns:
When true, oneway notification subscription requests will be made.
See Also:
IConnectionListener.onNotificationListenerRenewalFailure(Exception)

invoke

public java.lang.Object invoke(ObjectName objectName,
                               java.lang.String operationName,
                               java.lang.Object[] params,
                               java.lang.String[] signature)
                        throws InstanceNotFoundException,
                               MBeanException,
                               ReflectionException
Supported connector modes: bounded, unbounded

Specified by:
invoke in interface IRemoteMBeanServer
Throws:
InstanceNotFoundException
MBeanException
ReflectionException
See Also:
MBeanServer.invoke(ObjectName, String, Object[], String[])

invoke

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
Supported connector modes: bounded, unbounded

Throws:
InstanceNotFoundException
MBeanException
ReflectionException
See Also:
MBeanServer.invoke(ObjectName, String, Object[], String[])

invoke

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
This method allows remote invocation of the given operations with a particular timeout. Supported connector modes: bounded, unbounded

Throws:
InstanceNotFoundException
MBeanException
ReflectionException
See Also:
setRequestTimeout(long), MBeanServer.invoke(ObjectName, String, Object[], String[])

invoke

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
This method allows remote invocation of the given operations with a particular timeout. Supported connector modes: bounded, unbounded

Throws:
InstanceNotFoundException
MBeanException
ReflectionException
See Also:
setRequestTimeout(long), MBeanServer.invoke(ObjectName, String, Object[], String[])

isConnected

public boolean isConnected()
Specified by:
isConnected in interface IRemoteMBeanServer
Returns:
Returns true if the connector has a live connection to the underlying transport. Gets the connection state of the connector.

isInstanceOf

public boolean isInstanceOf(ObjectName objectName,
                            java.lang.String className)
                     throws InstanceNotFoundException
Supported connector modes: bounded, unbounded

Specified by:
isInstanceOf in interface IRemoteMBeanServer
Throws:
InstanceNotFoundException
See Also:
MBeanServer.isInstanceOf(ObjectName, String)

isRegistered

public boolean isRegistered(ObjectName objectName)
Supported connector modes: bounded, unbounded

Specified by:
isRegistered in interface IRemoteMBeanServer
See Also:
MBeanServer.isRegistered(ObjectName)

queryMBeans

public java.util.Set queryMBeans(ObjectName objectName,
                                 QueryExp query)
Supported connector modes: bounded

Specified by:
queryMBeans in interface IRemoteMBeanServer
See Also:
MBeanServer.queryMBeans(ObjectName, QueryExp)

queryNames

public java.util.Set queryNames(ObjectName objectName,
                                QueryExp query)
Supported connector modes: bounded

Specified by:
queryNames in interface IRemoteMBeanServer
See Also:
MBeanServer.queryNames(ObjectName, QueryExp)

registerRetryCallback

public void registerRetryCallback(com.sonicsw.mf.comm.IRetryCallback rcb)
See Also:
com.sonicsw.mf.comm.IConnectorClient#registerRetryCallback(IRetryCallback)

removeNotificationListener

public void removeNotificationListener(ObjectName objectName,
                                       NotificationListener listener)
                                throws InstanceNotFoundException,
                                       ListenerNotFoundException
Supported connector modes: bounded, unbounded

Specified by:
removeNotificationListener in interface IRemoteMBeanServer
Throws:
InstanceNotFoundException
ListenerNotFoundException
See Also:
MBeanServer.removeNotificationListener(ObjectName, NotificationListener)

removeNotificationListener

public void removeNotificationListener(ObjectName objectName,
                                       NotificationListener listener,
                                       NotificationFilter filter,
                                       java.lang.Object handback)
                                throws InstanceNotFoundException,
                                       ListenerNotFoundException
Supported connector modes: bounded, unbounded

Specified by:
removeNotificationListener in interface IRemoteMBeanServer
Throws:
InstanceNotFoundException
ListenerNotFoundException
See Also:
MBeanServer.removeNotificationListener(ObjectName, NotificationListener, NotificationFilter, Object)

setAttribute

public void setAttribute(ObjectName objectName,
                         Attribute attribute)
                  throws InstanceNotFoundException,
                         AttributeNotFoundException,
                         InvalidAttributeValueException,
                         MBeanException,
                         ReflectionException
Supported connector modes: bounded, unbounded

Specified by:
setAttribute in interface IRemoteMBeanServer
Throws:
InstanceNotFoundException
AttributeNotFoundException
InvalidAttributeValueException
MBeanException
ReflectionException
See Also:
MBeanServer.setAttribute(ObjectName, Attribute)

setAttributes

public AttributeList setAttributes(ObjectName objectName,
                                   AttributeList attributes)
                            throws InstanceNotFoundException,
                                   ReflectionException
Supported connector modes: bounded, unbounded

Specified by:
setAttributes in interface IRemoteMBeanServer
Throws:
InstanceNotFoundException
ReflectionException
See Also:
MBeanServer.setAttributes(ObjectName, AttributeList)

setConnectionListener

public void setConnectionListener(IConnectionListener listener)
Sets the (singleton) connection listener for the connector.

Parameters:
listener - Reference to an instance of an IConnectionListener implementation

setConnectTimeout

public void setConnectTimeout(long connectTimeout)
Sets the connect timeout


setFailWhenDisconnected

public void setFailWhenDisconnected(boolean failWhenDisconnected)
When true, causes requests (invoke, setAttribute, etc.) to fail immediately if the connector is in a transient disconnected state.

Parameters:
failWhenDisconnected - Flag to indicate if immediate failure should occur when in disconnected state

setNotificationSubscriptionRenewalInterval

public void setNotificationSubscriptionRenewalInterval(long interval)
Sets the interval, in seconds, that notification subscriptions will be renewed


setNotificationSubscriptionTimeout

public void setNotificationSubscriptionTimeout(long timeout)
Sets the duration, in seconds, that a notification subscription will "live" before it must be renewed


setOrphanedReplyListener

public void setOrphanedReplyListener(IOrphanedReplyListener listener)
Sets the (singleton) orphaned reply listener for the connector.

Parameters:
listener - Reference to an instance of an IOrphanedReplyListener implementation

setRequestTimeout

public void setRequestTimeout(long timeout)
Sets the default timeout the connector waits for responses from remote requests. The minimum is 10000 milliseconds (silently enforced).

Parameters:
timeout - Timeout value in milliseconds

setSocketConnectTimeout

public void setSocketConnectTimeout(long socketConnectTimeout)
Sets the socket connect timeout


setTraceMask

public void setTraceMask(int maskValue)
Sets System.out runtime debug tracing mask. Values are as per JMS CONNECTOR values.


setUseOnewaySubscriptionRequests

public 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.

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.

Parameters:
useOneway - When true, oneway notification subscription requests will be made.
See Also:
IConnectionListener.onNotificationListenerRenewalFailure(Exception)

unregisterMBean

public void unregisterMBean(ObjectName objectName)
                     throws InstanceNotFoundException,
                            MBeanRegistrationException
Supported connector modes: bounded

Specified by:
unregisterMBean in interface IRemoteMBeanServer
Throws:
InstanceNotFoundException
MBeanRegistrationException
See Also:
MBeanServer.unregisterMBean(ObjectName objectName)

Sonic Management API

Copyright © 2001-2010 Progress Software Corporation. All Rights Reserved.
HTML formatted on 16-Sep-2010.