javax.management.remote.rmi
Class RMIJRMPServerImpl

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.management.remote.rmi.RMIServerImpl sample code for javax.management.remote.rmi.RMIServerImpl definition code for javax.management.remote.rmi.RMIServerImpl 
      extended by javax.management.remote.rmi.RMIJRMPServerImpl
All Implemented Interfaces:
Remote sample code for java.rmi.Remote definition code for java.rmi.Remote , RMIServer sample code for javax.management.remote.rmi.RMIServer definition code for javax.management.remote.rmi.RMIServer

public class RMIJRMPServerImpl
extends RMIServerImpl sample code for javax.management.remote.rmi.RMIServerImpl definition code for javax.management.remote.rmi.RMIServerImpl

An RMIServer sample code for javax.management.remote.rmi.RMIServer definition code for javax.management.remote.rmi.RMIServer object that is exported through JRMP and that creates client connections as RMI objects exported through JRMP. User code does not usually reference this class directly.

Since:
1.5
See Also:
RMIServerImpl sample code for javax.management.remote.rmi.RMIServerImpl definition code for javax.management.remote.rmi.RMIServerImpl

Constructor Summary
RMIJRMPServerImpl sample code for javax.management.remote.rmi.RMIJRMPServerImpl.RMIJRMPServerImpl(int, java.rmi.server.RMIClientSocketFactory, java.rmi.server.RMIServerSocketFactory, java.util.Map) definition code for javax.management.remote.rmi.RMIJRMPServerImpl.RMIJRMPServerImpl(int, java.rmi.server.RMIClientSocketFactory, java.rmi.server.RMIServerSocketFactory, java.util.Map) (int port, RMIClientSocketFactory sample code for java.rmi.server.RMIClientSocketFactory definition code for java.rmi.server.RMIClientSocketFactory  csf, RMIServerSocketFactory sample code for java.rmi.server.RMIServerSocketFactory definition code for java.rmi.server.RMIServerSocketFactory  ssf, Map sample code for java.util.Map definition code for java.util.Map <String sample code for java.lang.String definition code for java.lang.String ,?> env)
          Creates a new RMIServer sample code for javax.management.remote.rmi.RMIServer definition code for javax.management.remote.rmi.RMIServer object that will be exported on the given port using the given socket factories.
 
Method Summary
protected  void closeClient sample code for javax.management.remote.rmi.RMIJRMPServerImpl.closeClient(javax.management.remote.rmi.RMIConnection) definition code for javax.management.remote.rmi.RMIJRMPServerImpl.closeClient(javax.management.remote.rmi.RMIConnection) (RMIConnection sample code for javax.management.remote.rmi.RMIConnection definition code for javax.management.remote.rmi.RMIConnection  client)
          Closes a client connection made by makeClient sample code for javax.management.remote.rmi.RMIServerImpl.makeClient(java.lang.String, javax.security.auth.Subject) definition code for javax.management.remote.rmi.RMIServerImpl.makeClient(java.lang.String, javax.security.auth.Subject) .
protected  void closeServer sample code for javax.management.remote.rmi.RMIJRMPServerImpl.closeServer() definition code for javax.management.remote.rmi.RMIJRMPServerImpl.closeServer() ()
          Called by RMIServerImpl.close() sample code for javax.management.remote.rmi.RMIServerImpl.close() definition code for javax.management.remote.rmi.RMIServerImpl.close() to close the connector server by unexporting this object.
protected  void export sample code for javax.management.remote.rmi.RMIJRMPServerImpl.export() definition code for javax.management.remote.rmi.RMIJRMPServerImpl.export() ()
          Exports this RMI object.
protected  String sample code for java.lang.String definition code for java.lang.String getProtocol sample code for javax.management.remote.rmi.RMIJRMPServerImpl.getProtocol() definition code for javax.management.remote.rmi.RMIJRMPServerImpl.getProtocol() ()
          Returns the protocol string for this object.
protected  RMIConnection sample code for javax.management.remote.rmi.RMIConnection definition code for javax.management.remote.rmi.RMIConnection makeClient sample code for javax.management.remote.rmi.RMIJRMPServerImpl.makeClient(java.lang.String, javax.security.auth.Subject) definition code for javax.management.remote.rmi.RMIJRMPServerImpl.makeClient(java.lang.String, javax.security.auth.Subject) (String sample code for java.lang.String definition code for java.lang.String  connectionId, Subject sample code for javax.security.auth.Subject definition code for javax.security.auth.Subject  subject)
          Creates a new client connection as an RMI object exported through JRMP.
 Remote sample code for java.rmi.Remote definition code for java.rmi.Remote toStub sample code for javax.management.remote.rmi.RMIJRMPServerImpl.toStub() definition code for javax.management.remote.rmi.RMIJRMPServerImpl.toStub() ()
          Returns a serializable stub for this RMIServer sample code for javax.management.remote.rmi.RMIServer definition code for javax.management.remote.rmi.RMIServer object.
 
Methods inherited from class javax.management.remote.rmi.RMIServerImpl sample code for javax.management.remote.rmi.RMIServerImpl definition code for javax.management.remote.rmi.RMIServerImpl
clientClosed sample code for javax.management.remote.rmi.RMIServerImpl.clientClosed(javax.management.remote.rmi.RMIConnection) definition code for javax.management.remote.rmi.RMIServerImpl.clientClosed(javax.management.remote.rmi.RMIConnection) , close sample code for javax.management.remote.rmi.RMIServerImpl.close() definition code for javax.management.remote.rmi.RMIServerImpl.close() , getDefaultClassLoader sample code for javax.management.remote.rmi.RMIServerImpl.getDefaultClassLoader() definition code for javax.management.remote.rmi.RMIServerImpl.getDefaultClassLoader() , getMBeanServer sample code for javax.management.remote.rmi.RMIServerImpl.getMBeanServer() definition code for javax.management.remote.rmi.RMIServerImpl.getMBeanServer() , getVersion sample code for javax.management.remote.rmi.RMIServerImpl.getVersion() definition code for javax.management.remote.rmi.RMIServerImpl.getVersion() , newClient sample code for javax.management.remote.rmi.RMIServerImpl.newClient(java.lang.Object) definition code for javax.management.remote.rmi.RMIServerImpl.newClient(java.lang.Object) , setDefaultClassLoader sample code for javax.management.remote.rmi.RMIServerImpl.setDefaultClassLoader(java.lang.ClassLoader) definition code for javax.management.remote.rmi.RMIServerImpl.setDefaultClassLoader(java.lang.ClassLoader) , setMBeanServer sample code for javax.management.remote.rmi.RMIServerImpl.setMBeanServer(javax.management.MBeanServer) definition code for javax.management.remote.rmi.RMIServerImpl.setMBeanServer(javax.management.MBeanServer)
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

RMIJRMPServerImpl sample code for javax.management.remote.rmi.RMIJRMPServerImpl(int, java.rmi.server.RMIClientSocketFactory, java.rmi.server.RMIServerSocketFactory, java.util.Map<java.lang.String, ?>) definition code for javax.management.remote.rmi.RMIJRMPServerImpl(int, java.rmi.server.RMIClientSocketFactory, java.rmi.server.RMIServerSocketFactory, java.util.Map<java.lang.String, ?>)

public RMIJRMPServerImpl(int port,
                         RMIClientSocketFactory sample code for java.rmi.server.RMIClientSocketFactory definition code for java.rmi.server.RMIClientSocketFactory  csf,
                         RMIServerSocketFactory sample code for java.rmi.server.RMIServerSocketFactory definition code for java.rmi.server.RMIServerSocketFactory  ssf,
                         Map sample code for java.util.Map definition code for java.util.Map <String sample code for java.lang.String definition code for java.lang.String ,?> env)
                  throws IOException sample code for java.io.IOException definition code for java.io.IOException 

Creates a new RMIServer sample code for javax.management.remote.rmi.RMIServer definition code for javax.management.remote.rmi.RMIServer object that will be exported on the given port using the given socket factories.

Parameters:
port - the port on which this object and the RMIConnectionImpl sample code for javax.management.remote.rmi.RMIConnectionImpl definition code for javax.management.remote.rmi.RMIConnectionImpl objects it creates will be exported. Can be zero, to indicate any available port.
csf - the client socket factory for the created RMI objects. Can be null.
ssf - the server socket factory for the created RMI objects. Can be null.
env - the environment map. Can be null.
Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - if the RMIServer sample code for javax.management.remote.rmi.RMIServer definition code for javax.management.remote.rmi.RMIServer object cannot be created.
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if port is negative.
Method Detail

export sample code for javax.management.remote.rmi.RMIJRMPServerImpl.export() definition code for javax.management.remote.rmi.RMIJRMPServerImpl.export()

protected void export()
               throws IOException sample code for java.io.IOException definition code for java.io.IOException 
Description copied from class: RMIServerImpl sample code for javax.management.remote.rmi.RMIServerImpl.export() definition code for javax.management.remote.rmi.RMIServerImpl.export()

Exports this RMI object.

Specified by:
export sample code for javax.management.remote.rmi.RMIServerImpl.export() definition code for javax.management.remote.rmi.RMIServerImpl.export() in class RMIServerImpl sample code for javax.management.remote.rmi.RMIServerImpl definition code for javax.management.remote.rmi.RMIServerImpl
Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - if this RMI object cannot be exported.

getProtocol sample code for javax.management.remote.rmi.RMIJRMPServerImpl.getProtocol() definition code for javax.management.remote.rmi.RMIJRMPServerImpl.getProtocol()

protected String sample code for java.lang.String definition code for java.lang.String  getProtocol()
Description copied from class: RMIServerImpl sample code for javax.management.remote.rmi.RMIServerImpl.getProtocol() definition code for javax.management.remote.rmi.RMIServerImpl.getProtocol()

Returns the protocol string for this object. The string is rmi for RMI/JRMP and iiop for RMI/IIOP.

Specified by:
getProtocol sample code for javax.management.remote.rmi.RMIServerImpl.getProtocol() definition code for javax.management.remote.rmi.RMIServerImpl.getProtocol() in class RMIServerImpl sample code for javax.management.remote.rmi.RMIServerImpl definition code for javax.management.remote.rmi.RMIServerImpl
Returns:
the protocol string for this object.

toStub sample code for javax.management.remote.rmi.RMIJRMPServerImpl.toStub() definition code for javax.management.remote.rmi.RMIJRMPServerImpl.toStub()

public Remote sample code for java.rmi.Remote definition code for java.rmi.Remote  toStub()
              throws IOException sample code for java.io.IOException definition code for java.io.IOException 

Returns a serializable stub for this RMIServer sample code for javax.management.remote.rmi.RMIServer definition code for javax.management.remote.rmi.RMIServer object.

Specified by:
toStub sample code for javax.management.remote.rmi.RMIServerImpl.toStub() definition code for javax.management.remote.rmi.RMIServerImpl.toStub() in class RMIServerImpl sample code for javax.management.remote.rmi.RMIServerImpl definition code for javax.management.remote.rmi.RMIServerImpl
Returns:
a serializable stub.
Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - if the stub cannot be obtained - e.g the RMIJRMPServerImpl has not been exported yet.

makeClient sample code for javax.management.remote.rmi.RMIJRMPServerImpl.makeClient(java.lang.String, javax.security.auth.Subject) definition code for javax.management.remote.rmi.RMIJRMPServerImpl.makeClient(java.lang.String, javax.security.auth.Subject)

protected RMIConnection sample code for javax.management.remote.rmi.RMIConnection definition code for javax.management.remote.rmi.RMIConnection  makeClient(String sample code for java.lang.String definition code for java.lang.String  connectionId,
                                   Subject sample code for javax.security.auth.Subject definition code for javax.security.auth.Subject  subject)
                            throws IOException sample code for java.io.IOException definition code for java.io.IOException 

Creates a new client connection as an RMI object exported through JRMP. The port and socket factories for the new RMIConnection sample code for javax.management.remote.rmi.RMIConnection definition code for javax.management.remote.rmi.RMIConnection object are the ones supplied to the RMIJRMPServerImpl constructor.

Specified by:
makeClient sample code for javax.management.remote.rmi.RMIServerImpl.makeClient(java.lang.String, javax.security.auth.Subject) definition code for javax.management.remote.rmi.RMIServerImpl.makeClient(java.lang.String, javax.security.auth.Subject) in class RMIServerImpl sample code for javax.management.remote.rmi.RMIServerImpl definition code for javax.management.remote.rmi.RMIServerImpl
Parameters:
connectionId - the ID of the new connection. Every connection opened by this connector server will have a different id. The behavior is unspecified if this parameter is null.
subject - the authenticated subject. Can be null.
Returns:
the newly-created RMIConnection.
Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - if the new RMIConnection sample code for javax.management.remote.rmi.RMIConnection definition code for javax.management.remote.rmi.RMIConnection object cannot be created or exported.

closeClient sample code for javax.management.remote.rmi.RMIJRMPServerImpl.closeClient(javax.management.remote.rmi.RMIConnection) definition code for javax.management.remote.rmi.RMIJRMPServerImpl.closeClient(javax.management.remote.rmi.RMIConnection)

protected void closeClient(RMIConnection sample code for javax.management.remote.rmi.RMIConnection definition code for javax.management.remote.rmi.RMIConnection  client)
                    throws IOException sample code for java.io.IOException definition code for java.io.IOException 
Description copied from class: RMIServerImpl sample code for javax.management.remote.rmi.RMIServerImpl.closeClient(javax.management.remote.rmi.RMIConnection) definition code for javax.management.remote.rmi.RMIServerImpl.closeClient(javax.management.remote.rmi.RMIConnection)

Closes a client connection made by makeClient sample code for javax.management.remote.rmi.RMIServerImpl.makeClient(java.lang.String, javax.security.auth.Subject) definition code for javax.management.remote.rmi.RMIServerImpl.makeClient(java.lang.String, javax.security.auth.Subject) .

Specified by:
closeClient sample code for javax.management.remote.rmi.RMIServerImpl.closeClient(javax.management.remote.rmi.RMIConnection) definition code for javax.management.remote.rmi.RMIServerImpl.closeClient(javax.management.remote.rmi.RMIConnection) in class RMIServerImpl sample code for javax.management.remote.rmi.RMIServerImpl definition code for javax.management.remote.rmi.RMIServerImpl
Parameters:
client - a connection previously returned by makeClient on which the closeClient method has not previously been called. The behavior is unspecified if these conditions are violated, including the case where client is null.
Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - if the client connection cannot be closed.

closeServer sample code for javax.management.remote.rmi.RMIJRMPServerImpl.closeServer() definition code for javax.management.remote.rmi.RMIJRMPServerImpl.closeServer()

protected void closeServer()
                    throws IOException sample code for java.io.IOException definition code for java.io.IOException 

Called by RMIServerImpl.close() sample code for javax.management.remote.rmi.RMIServerImpl.close() definition code for javax.management.remote.rmi.RMIServerImpl.close() to close the connector server by unexporting this object. After returning from this method, the connector server must not accept any new connections.

Specified by:
closeServer sample code for javax.management.remote.rmi.RMIServerImpl.closeServer() definition code for javax.management.remote.rmi.RMIServerImpl.closeServer() in class RMIServerImpl sample code for javax.management.remote.rmi.RMIServerImpl definition code for javax.management.remote.rmi.RMIServerImpl
Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - if the attempt to close the connector server failed.