org.apache.felix.mosgi.jmx.rmiconnector.mx4j.remote
Class ConnectionResolver
java.lang.Object
org.apache.felix.mosgi.jmx.rmiconnector.mx4j.remote.ProviderHelper
org.apache.felix.mosgi.jmx.rmiconnector.mx4j.remote.ConnectionResolver
- Direct Known Subclasses:
- RMIResolver
public abstract class ConnectionResolver
- extends ProviderHelper
ConnectionResolver handles the details of creating connections for different protocols.
Subclasses for the specific protocol are found using a mechanism very similar to the
one specified by JMXConnectorFactory
. Here a subclass
has a fully qualified name specified like this:
.resolver..Resolver, for example
mx4j.remote.resolver.rmi.RMIResolver
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.
- Version:
- $Revision: 1.1.1.1 $
- Author:
- Simone Bordet
Method Summary |
abstract Object |
bindClient(Object client,
Map environment)
Connects the client returned by lookupClient(javax.management.remote.JMXServiceURL, java.util.Map) to the server side |
abstract JMXServiceURL |
bindServer(Object server,
JMXServiceURL url,
Map environment)
Binds the server created by createServer(javax.management.remote.JMXServiceURL, java.util.Map) to a place specified in the JMXServiceURL. |
abstract Object |
createServer(JMXServiceURL url,
Map environment)
Creates an instance of the server as specified in the given JMXServiceURL. |
static ConnectionResolver |
getInstance(String proto)
Returns a subclass of ConnectionResolver for the specified protocol. |
abstract Object |
lookupClient(JMXServiceURL url,
Map environment)
Looks up a connection to the server side as specified in the given JMXServiceURL. |
abstract void |
unbindServer(Object server,
JMXServiceURL address,
Map environment)
Unbinds the server created by createServer(javax.management.remote.JMXServiceURL, java.util.Map) from the place specified in the JMXServiceURL. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConnectionResolver
public ConnectionResolver()
getInstance
public static ConnectionResolver getInstance(String proto)
- Returns a subclass of ConnectionResolver for the specified protocol.
lookupClient
public abstract Object lookupClient(JMXServiceURL url,
Map environment)
throws IOException
- Looks up a connection to the server side as specified in the given JMXServiceURL.
This method is used by
JMXConnector
s.
- Throws:
IOException
bindClient
public abstract Object bindClient(Object client,
Map environment)
throws IOException
- Connects the client returned by
lookupClient(javax.management.remote.JMXServiceURL, java.util.Map)
to the server side
- Throws:
IOException
createServer
public abstract Object createServer(JMXServiceURL url,
Map environment)
throws IOException
- 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 by
JMXConnectorServer
s.
- Throws:
IOException
- See Also:
bindServer(java.lang.Object, javax.management.remote.JMXServiceURL, java.util.Map)
bindServer
public abstract JMXServiceURL bindServer(Object server,
JMXServiceURL url,
Map environment)
throws IOException
- Binds the server created by
createServer(javax.management.remote.JMXServiceURL, java.util.Map)
to a place specified in the JMXServiceURL.
- Returns:
- a new JMXServiceURL that specifies where the server has been bound to.
- Throws:
IOException
- See Also:
unbindServer(java.lang.Object, javax.management.remote.JMXServiceURL, java.util.Map)
unbindServer
public abstract void unbindServer(Object server,
JMXServiceURL address,
Map environment)
throws IOException
- Unbinds the server created by
createServer(javax.management.remote.JMXServiceURL, java.util.Map)
from the place specified in the JMXServiceURL.
- Throws:
IOException
- See Also:
bindServer(java.lang.Object, javax.management.remote.JMXServiceURL, java.util.Map)
Copyright © 2011 Apache Software Foundation. All Rights Reserved.