Sonic Management API

com.sonicsw.mf.jmx.client
Interface IConnectionListener

All Superinterfaces:
com.sonicsw.mf.comm.IConnectionListener

public interface IConnectionListener
extends com.sonicsw.mf.comm.IConnectionListener

Implementors are expected to handle connection changes reported by the connector.

A single implementation of this interface may be registered with a JMSConnectorClient using JMSConnectorClient.setConnectionListener(IConnectionListener).

Transient connection conditions are reported using the onDisconnect() and onReconnect(String) methods. Permanent failures are reported using the onFailure(Exception) method.

Note: This interface superseeds IExceptionListener.

See Also:
JMSConnectorClient.setConnectionListener(IConnectionListener)

Method Summary
 void onDisconnect()
          Called when the connector is disconnected from the underlying transport.
 void onFailure(java.lang.Exception e)
          Called when the connector detects some permanent failure in the underlying transport.
 void onNotificationListenerRenewalFailure(java.lang.Exception e)
          Called when a connector is unable to renew a notification listener's subscription.
 void onReconnect(java.lang.String localRoutingNode)
          Called when the connector automatically reconnects to the underlying transport.
 

Method Detail

onDisconnect

void onDisconnect()
Called when the connector is disconnected from the underlying transport.

After this method has been called, further requests may be made on the connector, however the behavior will depend on whether setFailWhenDisconnected(true) was called on the connector. If set subsequent requests will immediately fail, if not set requests will attempt to complete within the confines of the connectors timeouts.

Specified by:
onDisconnect in interface com.sonicsw.mf.comm.IConnectionListener
See Also:
JMSConnectorClient.setConnectionListener(IConnectionListener), JMSConnectorClient.setFailWhenDisconnected(boolean)

onFailure

void onFailure(java.lang.Exception e)
Called when the connector detects some permanent failure in the underlying transport.

All subsequent requests on the connector will fail until a subsequent connect() is successfully called on the connector.

Specified by:
onFailure in interface com.sonicsw.mf.comm.IConnectionListener
See Also:
JMSConnectorClient.setConnectionListener(IConnectionListener)

onNotificationListenerRenewalFailure

void onNotificationListenerRenewalFailure(java.lang.Exception e)
Called when a connector is unable to renew a notification listener's subscription.

When notification listeners are added (and until they are removed), the connector will attempt to periodically renew the listener's subscription as part of a feature that avoids stale listeners on the server side, yet allows for temporary loss of target (e.g. due to a component's container being shutdown and restarted) without having to re-add the listener to the connector when the target again becomes available.

This method will not be called if the JMSConnectorClient is configured to use oneway notification subscription requests.

See Also:
JMSConnectorClient.setUseOnewaySubscriptionRequests(boolean)

onReconnect

void onReconnect(java.lang.String localRoutingNode)
Called when the connector automatically reconnects to the underlying transport.

Specified by:
onReconnect in interface com.sonicsw.mf.comm.IConnectionListener
See Also:
JMSConnectorClient.setConnectionListener(IConnectionListener)

Sonic Management API

Copyright © 2001-2011 Progress Software Corporation. All Rights Reserved.
HTML formatted on 12-Aug-2011.