com.jrockit.mc.rjmx
Interface IConnectionManager

All Known Implementing Classes:
ConnectionManager

public interface IConnectionManager

Class that manages the life cycle for connections and services.

Author:
Marcus Hirt

Method Summary
 void addConnectionHandleStateListener(IConnectionHandleStateListener listener, IConnectionHandleFilter filter)
          Registers a listener for changes to IConnectionHandles.
 IConnectionHandle connect(IConnectionDescriptor descriptor)
          Connect using the IConnectionDescriptor
 IConnectionHandle disconnect(IConnectionHandle handle)
          Disconnects a IConnectionHandle
 IConnectionHandle[] getConnections()
          Returns all available IConnectionHandle
 IConnectionHandle[] getConnections(IConnectionDescriptor descriptor)
          Returns all connection for a given IConnectionDescriptor
 void removeConnectionHandleStateListener(IConnectionHandleStateListener listener)
          Removes the specified listener.
 

Method Detail

connect

IConnectionHandle connect(IConnectionDescriptor descriptor)
                          throws ConnectionException
Connect using the IConnectionDescriptor

Parameters:
descriptor - the descriptor
Returns:
a connection handle
Throws:
ConnectionException - if a connection could not be established

disconnect

IConnectionHandle disconnect(IConnectionHandle handle)
                             throws ConnectionException
Disconnects a IConnectionHandle

Parameters:
handle - the connection to disconnect
Returns:
a connection handle
Throws:
ConnectionException - if the connection could not be disconnected

getConnections

IConnectionHandle[] getConnections()
Returns all available IConnectionHandle

Returns:
an array IConnectionHandles

getConnections

IConnectionHandle[] getConnections(IConnectionDescriptor descriptor)
Returns all connection for a given IConnectionDescriptor

Parameters:
descriptor -
Returns:
all connections for the given IConnectionDescriptor

addConnectionHandleStateListener

void addConnectionHandleStateListener(IConnectionHandleStateListener listener,
                                      IConnectionHandleFilter filter)
Registers a listener for changes to IConnectionHandles.

Parameters:
listener - the listener to register.
filter - the filter to decide for which IConnectionHandles to to notify the listener. May be null, which means notifications will be triggered by all IConnectionHandles.

removeConnectionHandleStateListener

void removeConnectionHandleStateListener(IConnectionHandleStateListener listener)
Removes the specified listener.

Parameters:
listener - the listener to remove.


Copyright © 1999, 2011, Oracle and/or its affiliates. All rights reserved.