Sonic Management API

com.sonicsw.mq.common.runtime
Interface IConnectionData


public interface IConnectionData

This interface describes a connection to a SonicMQ broker.

The broker exposes an operation "getConnections" through its JMX interface. This operation returns an array list of IConnectionData elements.

If the broker that returns an IConnectionData element is from SonicMQ 8.0 or later, a connection reference id is available via getConnectionMemberRef(). This can be used to obtain additional information relating to the connection, including a tree of associated Sessions and Consumers.

The broker also supports dropping connections through the "dropConnections" operation. This can take an ArrayList of IConnectionData elements, or an ArrayList of connection reference ids (type Long), identifying which connections should be dropped. Connection reference ids are more efficient in this context and therefore preferred, provided the broker supports them.

See Also:
IBrokerProxy.getConnections(java.lang.String), IBrokerProxy.getConnectionMemberDetails(java.util.ArrayList), IBrokerProxy.getConnectionTree(java.util.ArrayList, Integer), IBrokerProxy.dropConnections(java.util.ArrayList)

Method Summary
 java.lang.String getBroker()
          When the connection to the broker is a routing connection from a broker in a remote DRA node or a connection from a broker in the same cluster, then this method will return the broker name of the connecting broker.
 java.lang.String getConnectID()
          Gets the SonicMQ connectID associated with this connection.
 java.lang.Long getConnectionMemberRef()
          Provides a connection member reference id that identifies this connection.
 java.lang.String getHost()
          Get the host IP address of the connecting party associated with this connection.
 java.lang.String getNode()
          When the connection to the broker is a routing connection from a broker in a remote DRA node, then this method will return the node to which the broker belongs.
 java.lang.String getUser()
          Gets the username associated with this connection.
 boolean isApplicationConnection()
          Returns true if the connection is a JMS connection (or non-broker connection).
 boolean isClusterConnection()
          Returns true if the connection is from a broker in the same cluster.
 boolean isRoutingConnection()
          Returns true if the connection is from a routing connection from a broker in a remote DRA node.
 

Method Detail

getBroker

java.lang.String getBroker()
When the connection to the broker is a routing connection from a broker in a remote DRA node or a connection from a broker in the same cluster, then this method will return the broker name of the connecting broker.

If the connection to the broker is not a routing or cluster connection, then the return value of this method is undefined.

See Also:
isRoutingConnection(), isClusterConnection()

getConnectID

java.lang.String getConnectID()
Gets the SonicMQ connectID associated with this connection. If there was no connectID specified when the connection was established, then a unique connectID will be generated and this method will return that generated connectID.


getConnectionMemberRef

java.lang.Long getConnectionMemberRef()
Provides a connection member reference id that identifies this connection. This reference can be used to retrieve additional information about the connection or to have the broker drop this connection.

Returns:
This connection's connection member reference id, or null if the broker does not support the additional connection member API's.
See Also:
IBrokerProxy.getConnectionMemberDetails(java.util.ArrayList), IBrokerProxy.getConnectionTree(java.util.ArrayList, Integer), IBrokerProxy.dropConnections(java.util.ArrayList)

getHost

java.lang.String getHost()
Get the host IP address of the connecting party associated with this connection. If that cannot be determined then this method will return "127.0.0.1" (localhost).


getNode

java.lang.String getNode()
When the connection to the broker is a routing connection from a broker in a remote DRA node, then this method will return the node to which the broker belongs.

If the connection to the broker is not a routing connection, then the return value of this method is undefined.

See Also:
isRoutingConnection()

getUser

java.lang.String getUser()
Gets the username associated with this connection. If there was no username provided on connection (allowed when security is disabled), then the returned value will be an empty string.


isApplicationConnection

boolean isApplicationConnection()
Returns true if the connection is a JMS connection (or non-broker connection). If true then isRoutingConnection() and isClusterConnection() will return false.

See Also:
isRoutingConnection(), isClusterConnection()

isClusterConnection

boolean isClusterConnection()
Returns true if the connection is from a broker in the same cluster.

See Also:
isApplicationConnection(), isRoutingConnection()

isRoutingConnection

boolean isRoutingConnection()
Returns true if the connection is from a routing connection from a broker in a remote DRA node.

See Also:
isApplicationConnection(), isClusterConnection()

Sonic Management API

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