org.apache.felix.mosgi.jmx.rmiconnector.mx4j.remote.resolver.rmi
Class RMIResolver

java.lang.Object
  extended by org.apache.felix.mosgi.jmx.rmiconnector.mx4j.remote.ProviderHelper
      extended by org.apache.felix.mosgi.jmx.rmiconnector.mx4j.remote.ConnectionResolver
          extended by org.apache.felix.mosgi.jmx.rmiconnector.mx4j.remote.resolver.rmi.RMIResolver

public class RMIResolver
extends ConnectionResolver

Resolver for RMI/JRMP protocol.

Version:
$Revision: 1.1.1.1 $
Author:
Simone Bordet

Constructor Summary
RMIResolver()
           
 
Method Summary
 java.lang.Object bindClient(java.lang.Object client, java.util.Map environment)
          Connects the client returned by ConnectionResolver.lookupClient(javax.management.remote.JMXServiceURL, java.util.Map) to the server side
 javax.management.remote.JMXServiceURL bindServer(java.lang.Object server, javax.management.remote.JMXServiceURL url, java.util.Map environment)
          Binds the server created by ConnectionResolver.createServer(javax.management.remote.JMXServiceURL, java.util.Map) to a place specified in the JMXServiceURL.
protected  javax.management.remote.rmi.RMIServerImpl createRMIServer(javax.management.remote.JMXServiceURL url, java.util.Map environment)
           
 java.lang.Object createServer(javax.management.remote.JMXServiceURL url, java.util.Map environment)
          Creates an instance of the server as specified in the given JMXServiceURL.
protected  javax.management.remote.rmi.RMIServer decodeStub(javax.management.remote.JMXServiceURL url, java.util.Map environment)
           
protected  void destroyServer(java.lang.Object server, java.util.Map environment)
           
protected  java.lang.String encodeStub(javax.management.remote.rmi.RMIServerImpl rmiServer, java.util.Map environment)
           
protected  boolean isEncodedForm(javax.management.remote.JMXServiceURL url)
           
 java.lang.Object lookupClient(javax.management.remote.JMXServiceURL url, java.util.Map environment)
          Looks up a connection to the server side as specified in the given JMXServiceURL.
protected  javax.management.remote.rmi.RMIServer lookupRMIServerStub(javax.management.remote.JMXServiceURL url, java.util.Map environment)
           
protected  javax.management.remote.rmi.RMIServer narrowRMIServerStub(java.lang.Object stub)
           
 void unbindServer(java.lang.Object server, javax.management.remote.JMXServiceURL url, java.util.Map environment)
          Unbinds the server created by ConnectionResolver.createServer(javax.management.remote.JMXServiceURL, java.util.Map) from the place specified in the JMXServiceURL.
 
Methods inherited from class org.apache.felix.mosgi.jmx.rmiconnector.mx4j.remote.ConnectionResolver
getInstance
 
Methods inherited from class org.apache.felix.mosgi.jmx.rmiconnector.mx4j.remote.ProviderHelper
constructClassName, findSystemPackageList, loadClass, normalizeProtocol
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RMIResolver

public RMIResolver()
Method Detail

lookupClient

public java.lang.Object lookupClient(javax.management.remote.JMXServiceURL url,
                                     java.util.Map environment)
                              throws java.io.IOException
Description copied from class: ConnectionResolver
Looks up a connection to the server side as specified in the given JMXServiceURL. This method is used by JMXConnectors.

Specified by:
lookupClient in class ConnectionResolver
Throws:
java.io.IOException

bindClient

public java.lang.Object bindClient(java.lang.Object client,
                                   java.util.Map environment)
                            throws java.io.IOException
Description copied from class: ConnectionResolver
Connects the client returned by ConnectionResolver.lookupClient(javax.management.remote.JMXServiceURL, java.util.Map) to the server side

Specified by:
bindClient in class ConnectionResolver
Throws:
java.io.IOException

lookupRMIServerStub

protected javax.management.remote.rmi.RMIServer lookupRMIServerStub(javax.management.remote.JMXServiceURL url,
                                                                    java.util.Map environment)
                                                             throws java.io.IOException
Throws:
java.io.IOException

narrowRMIServerStub

protected javax.management.remote.rmi.RMIServer narrowRMIServerStub(java.lang.Object stub)

decodeStub

protected javax.management.remote.rmi.RMIServer decodeStub(javax.management.remote.JMXServiceURL url,
                                                           java.util.Map environment)
                                                    throws java.io.IOException
Throws:
java.io.IOException

createServer

public java.lang.Object createServer(javax.management.remote.JMXServiceURL url,
                                     java.util.Map environment)
                              throws java.io.IOException
Description copied from class: ConnectionResolver
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 JMXConnectorServers.

Specified by:
createServer in class ConnectionResolver
Throws:
java.io.IOException
See Also:
ConnectionResolver.bindServer(java.lang.Object, javax.management.remote.JMXServiceURL, java.util.Map)

createRMIServer

protected javax.management.remote.rmi.RMIServerImpl createRMIServer(javax.management.remote.JMXServiceURL url,
                                                                    java.util.Map environment)
                                                             throws java.io.IOException
Throws:
java.io.IOException

bindServer

public javax.management.remote.JMXServiceURL bindServer(java.lang.Object server,
                                                        javax.management.remote.JMXServiceURL url,
                                                        java.util.Map environment)
                                                 throws java.io.IOException
Description copied from class: ConnectionResolver
Binds the server created by ConnectionResolver.createServer(javax.management.remote.JMXServiceURL, java.util.Map) to a place specified in the JMXServiceURL.

Specified by:
bindServer in class ConnectionResolver
Returns:
a new JMXServiceURL that specifies where the server has been bound to.
Throws:
java.io.IOException
See Also:
ConnectionResolver.unbindServer(java.lang.Object, javax.management.remote.JMXServiceURL, java.util.Map)

encodeStub

protected java.lang.String encodeStub(javax.management.remote.rmi.RMIServerImpl rmiServer,
                                      java.util.Map environment)
                               throws java.io.IOException
Throws:
java.io.IOException

isEncodedForm

protected boolean isEncodedForm(javax.management.remote.JMXServiceURL url)

unbindServer

public void unbindServer(java.lang.Object server,
                         javax.management.remote.JMXServiceURL url,
                         java.util.Map environment)
                  throws java.io.IOException
Description copied from class: ConnectionResolver
Unbinds the server created by ConnectionResolver.createServer(javax.management.remote.JMXServiceURL, java.util.Map) from the place specified in the JMXServiceURL.

Specified by:
unbindServer in class ConnectionResolver
Throws:
java.io.IOException
See Also:
ConnectionResolver.bindServer(java.lang.Object, javax.management.remote.JMXServiceURL, java.util.Map)

destroyServer

protected void destroyServer(java.lang.Object server,
                             java.util.Map environment)
                      throws java.io.IOException
Throws:
java.io.IOException