mx4j.tools.remote
Interface ConnectionManager

All Known Implementing Classes:
AbstractConnectionManager

public interface ConnectionManager

A ConnectionManager is a server-side object that acts as the factory for new connections and manages the authentication details. A JMXConnectorServer delegates a ConnectionManager for the creation of connections, and a ConnectionManager interacts with the JMXConnectorServer to emit connection notifications. It is the first object contacted by a remote client to obtain a client-specific connection, that is, a connection with a specific connection ID.

Version:
$Revision: 1.4 $

Method Summary
 void close()
          Closes this ConnectionManager and all the opened connections it manages.
 void closeConnection(Connection connection)
          Closes the given Connection.
 Connection connect(java.lang.Object credentials)
          Factory method that creates connections that are specific to the client that invoked this method.
 java.lang.String getProtocol()
          Returns the protocol used by the corrispondent JMXConnectorServer.
 

Method Detail

connect

public Connection connect(java.lang.Object credentials)
                   throws java.io.IOException,
                          java.lang.SecurityException
Factory method that creates connections that are specific to the client that invoked this method.

Parameters:
credentials - The credentials sent by the client to authenticate a subject.
Returns:
A new client-specific connection.
Throws:
java.io.IOException - If the connection cannot be created.
java.lang.SecurityException - If the authentication fails.

getProtocol

public java.lang.String getProtocol()
Returns the protocol used by the corrispondent JMXConnectorServer.


close

public void close()
           throws java.io.IOException
Closes this ConnectionManager and all the opened connections it manages.

Throws:
java.io.IOException
See Also:
closeConnection(mx4j.tools.remote.Connection)

closeConnection

public void closeConnection(Connection connection)
                     throws java.io.IOException
Closes the given Connection. This method is called by the connection manager when it is closing the connections it manages, or as a consequence of the fact that the client end of the connection has been closed.

Throws:
java.io.IOException
See Also:
Connection.close(), close()


Copyright © 2001-2005 The MX4J Contributors. All Rights Reserved.