mx4j.tools.remote
public abstract class AbstractConnectionManager extends Object implements ConnectionManager
Version: $Revision: 1.7 $
Constructor Summary | |
---|---|
protected | AbstractConnectionManager(AbstractJMXConnectorServer server, Map environment)
Called by subclasses.
|
Method Summary | |
---|---|
protected Subject | authenticate(Object credentials)
Authenticates a Subject with the given credentials, by looking up a JMXAuthenticator
in the environment returned by AbstractConnectionManager. |
void | close()
Implemented using the template method pattern
|
void | closeConnection(Connection connection)
Implemented using the template method pattern, handles the emission of the connection notification
of type "closed".
|
Connection | connect(Object credentials)
Implemented using the template method pattern, it handles authentication, creation of the connection ID,
emission of connection notification of type "opened".
|
protected String | createConnectionID(Subject subject)
Returns a connection ID as specified by JSR 160.
|
protected abstract void | doClose()
Closes this ConnectionManager but not the connections it manages
|
protected abstract void | doCloseConnection(Connection connection)
Closes the given Connection. |
protected abstract Connection | doConnect(String connectionId, Subject subject)
Template method to be implemented by subclasses; must return the server-side part of
a connection.
|
protected Map | getEnvironment()
Returns the environment passed when creating the JMXConnectorServer |
protected AccessControlContext | getSecurityContext()
Returns a security context at the moment of creation of this ConnectionManager.
|
protected boolean | isClosed()
Returns whether the AbstractConnectionManager method has been called. |
Parameters: server The JMXConnectorServer that will emit connection notifications environment The environment passed when the JMXConnectorServer is created.
See Also: AbstractConnectionManager AbstractConnectionManager
See Also: AbstractConnectionManager
See Also: AbstractConnectionManager AbstractConnectionManager AbstractConnectionManager
Parameters: subject The authenticated Subject
Throws: IOException If this ConnectionManager cannot be closed
Parameters: connectionId The connection ID for connection that is returned subject The authenticated Subject
Returns: The server-side part of a connection (with the given connection ID)
Throws: IOException If the connection cannot be created