mx4j.remote
Class ConnectionResolver
public abstract
class
ConnectionResolver
extends ProviderHelper
ConnectionResolver handles the details of creating connections for different protocols.
Subclasses for the specific protocol are instantiated using a mechanism very similar to the
one specified by {@link javax.management.remote.JMXConnectorFactory}. Here a subclass
has a fully qualified name specified like this:
.resolver..Resolver, for example
{@link mx4j.remote.resolver.rmi.Resolver}
This class is used from both the client and the server.
The former uses it to lookup stubs or connections to the server side; the latter uses it
to create server instances and make them availale to clients, for example via JNDI.
The client and server methods have not been splitted into 2 different interfaces because
most of the times they share common code, although it may have been a better design.
Version: $Revision: 1.6 $
Method Summary |
abstract Object | bindClient(Object client, Map environment)
Connects the client returned by {@link #lookupClient} to the server side.
|
abstract JMXServiceURL | bindServer(Object server, JMXServiceURL url, Map environment)
Binds the server created by {@link #createServer} to a place specified by the JMXServiceURL.
|
abstract Object | createServer(JMXServiceURL url, Map environment)
Creates an instance of the server as specified in the given JMXServiceURL.
|
abstract void | destroyServer(Object server, JMXServiceURL url, Map environment)
Destroys the server created by {@link #createServer}, by cleaning up resources it may have requested
at creation time
|
abstract Object | lookupClient(JMXServiceURL url, Map environment)
Looks up a connection with the server side as specified in the given JMXServiceURL.
|
static ConnectionResolver | newConnectionResolver(String proto, Map environment)
Returns a subclass of ConnectionResolver for the specified protocol. |
abstract void | unbindServer(Object server, JMXServiceURL address, Map environment)
Unbinds the server bound by {@link #bindServer} from the place specified by the JMXServiceURL.
|
public abstract Object bindClient(Object client, Map environment)
Connects the client returned by {@link #lookupClient} to the server side.
Returns: An object of the same type as the client passed in; normally the client object itself
public abstract JMXServiceURL bindServer(Object server, JMXServiceURL url, Map environment)
Binds the server created by {@link #createServer} to a place specified by the JMXServiceURL.
Returns: a new JMXServiceURL that specifies where the server has been bound to.
See Also: ConnectionResolver
public abstract Object createServer(JMXServiceURL url, Map environment)
Creates an instance of the server as specified in the given JMXServiceURL.
It is only a factory method, it should just return a fresh instance of the server;
other methods are responsible to make it available to clients (for example exporting it).
This method is used in implementations of {@link javax.management.remote.JMXConnectorServer#start}.
See Also: ConnectionResolver ConnectionResolver
public abstract void destroyServer(Object server, JMXServiceURL url, Map environment)
Destroys the server created by {@link #createServer}, by cleaning up resources it may have requested
at creation time
See Also: ConnectionResolver
public abstract Object lookupClient(JMXServiceURL url, Map environment)
Looks up a connection with the server side as specified in the given JMXServiceURL.
This method is used in implementations of {@link javax.management.remote.JMXConnector#connect()}.
See Also: ConnectionResolver
Returns a subclass of ConnectionResolver for the specified protocol.
public abstract void unbindServer(Object server, JMXServiceURL address, Map environment)
Unbinds the server bound by {@link #bindServer} from the place specified by the JMXServiceURL.
See Also: ConnectionResolver
Copyright © 2001-2005 The MX4J Contributors. All Rights Reserved.