java.rmi.activation
Class Activatable

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.rmi.server.RemoteObject sample code for java.rmi.server.RemoteObject definition code for java.rmi.server.RemoteObject 
      extended by java.rmi.server.RemoteServer sample code for java.rmi.server.RemoteServer definition code for java.rmi.server.RemoteServer 
          extended by java.rmi.activation.Activatable
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable , Remote sample code for java.rmi.Remote definition code for java.rmi.Remote

public abstract class Activatable
extends RemoteServer sample code for java.rmi.server.RemoteServer definition code for java.rmi.server.RemoteServer

The Activatable class provides support for remote objects that require persistent access over time and that can be activated by the system.

For the constructors and static exportObject methods, the stub for a remote object being exported is obtained as described in UnicastRemoteObject sample code for java.rmi.server.UnicastRemoteObject definition code for java.rmi.server.UnicastRemoteObject .

Since:
1.2
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.rmi.server.RemoteObject sample code for java.rmi.server.RemoteObject definition code for java.rmi.server.RemoteObject
ref sample code for java.rmi.server.RemoteObject.ref definition code for java.rmi.server.RemoteObject.ref
 
Constructor Summary
protected Activatable sample code for java.rmi.activation.Activatable.Activatable(java.rmi.activation.ActivationID, int) definition code for java.rmi.activation.Activatable.Activatable(java.rmi.activation.ActivationID, int) (ActivationID sample code for java.rmi.activation.ActivationID definition code for java.rmi.activation.ActivationID  id, int port)
          Constructor used to activate/export the object on a specified port.
protected Activatable sample code for java.rmi.activation.Activatable.Activatable(java.rmi.activation.ActivationID, int, java.rmi.server.RMIClientSocketFactory, java.rmi.server.RMIServerSocketFactory) definition code for java.rmi.activation.Activatable.Activatable(java.rmi.activation.ActivationID, int, java.rmi.server.RMIClientSocketFactory, java.rmi.server.RMIServerSocketFactory) (ActivationID sample code for java.rmi.activation.ActivationID definition code for java.rmi.activation.ActivationID  id, 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)
          Constructor used to activate/export the object on a specified port.
protected Activatable sample code for java.rmi.activation.Activatable.Activatable(java.lang.String, java.rmi.MarshalledObject, boolean, int) definition code for java.rmi.activation.Activatable.Activatable(java.lang.String, java.rmi.MarshalledObject, boolean, int) (String sample code for java.lang.String definition code for java.lang.String  location, MarshalledObject sample code for java.rmi.MarshalledObject definition code for java.rmi.MarshalledObject  data, boolean restart, int port)
          Constructor used to register and export the object on a specified port (an anonymous port is chosen if port=0) .
protected Activatable sample code for java.rmi.activation.Activatable.Activatable(java.lang.String, java.rmi.MarshalledObject, boolean, int, java.rmi.server.RMIClientSocketFactory, java.rmi.server.RMIServerSocketFactory) definition code for java.rmi.activation.Activatable.Activatable(java.lang.String, java.rmi.MarshalledObject, boolean, int, java.rmi.server.RMIClientSocketFactory, java.rmi.server.RMIServerSocketFactory) (String sample code for java.lang.String definition code for java.lang.String  location, MarshalledObject sample code for java.rmi.MarshalledObject definition code for java.rmi.MarshalledObject  data, boolean restart, 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)
          Constructor used to register and export the object on a specified port (an anonymous port is chosen if port=0) .
 
Method Summary
static Remote sample code for java.rmi.Remote definition code for java.rmi.Remote exportObject sample code for java.rmi.activation.Activatable.exportObject(java.rmi.Remote, java.rmi.activation.ActivationID, int) definition code for java.rmi.activation.Activatable.exportObject(java.rmi.Remote, java.rmi.activation.ActivationID, int) (Remote sample code for java.rmi.Remote definition code for java.rmi.Remote  obj, ActivationID sample code for java.rmi.activation.ActivationID definition code for java.rmi.activation.ActivationID  id, int port)
          Export the activatable remote object to the RMI runtime to make the object available to receive incoming calls.
static Remote sample code for java.rmi.Remote definition code for java.rmi.Remote exportObject sample code for java.rmi.activation.Activatable.exportObject(java.rmi.Remote, java.rmi.activation.ActivationID, int, java.rmi.server.RMIClientSocketFactory, java.rmi.server.RMIServerSocketFactory) definition code for java.rmi.activation.Activatable.exportObject(java.rmi.Remote, java.rmi.activation.ActivationID, int, java.rmi.server.RMIClientSocketFactory, java.rmi.server.RMIServerSocketFactory) (Remote sample code for java.rmi.Remote definition code for java.rmi.Remote  obj, ActivationID sample code for java.rmi.activation.ActivationID definition code for java.rmi.activation.ActivationID  id, 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)
          Export the activatable remote object to the RMI runtime to make the object available to receive incoming calls.
static ActivationID sample code for java.rmi.activation.ActivationID definition code for java.rmi.activation.ActivationID exportObject sample code for java.rmi.activation.Activatable.exportObject(java.rmi.Remote, java.lang.String, java.rmi.MarshalledObject, boolean, int) definition code for java.rmi.activation.Activatable.exportObject(java.rmi.Remote, java.lang.String, java.rmi.MarshalledObject, boolean, int) (Remote sample code for java.rmi.Remote definition code for java.rmi.Remote  obj, String sample code for java.lang.String definition code for java.lang.String  location, MarshalledObject sample code for java.rmi.MarshalledObject definition code for java.rmi.MarshalledObject  data, boolean restart, int port)
          This exportObject method may be invoked explicitly by an "activatable" object, that does not extend the Activatable class, in order to both a) register the object's activation descriptor, constructed from the supplied location, and data, with the activation system (so the object can be activated), and b) export the remote object, obj, on a specific port (if port=0, then an anonymous port is chosen).
static ActivationID sample code for java.rmi.activation.ActivationID definition code for java.rmi.activation.ActivationID exportObject sample code for java.rmi.activation.Activatable.exportObject(java.rmi.Remote, java.lang.String, java.rmi.MarshalledObject, boolean, int, java.rmi.server.RMIClientSocketFactory, java.rmi.server.RMIServerSocketFactory) definition code for java.rmi.activation.Activatable.exportObject(java.rmi.Remote, java.lang.String, java.rmi.MarshalledObject, boolean, int, java.rmi.server.RMIClientSocketFactory, java.rmi.server.RMIServerSocketFactory) (Remote sample code for java.rmi.Remote definition code for java.rmi.Remote  obj, String sample code for java.lang.String definition code for java.lang.String  location, MarshalledObject sample code for java.rmi.MarshalledObject definition code for java.rmi.MarshalledObject  data, boolean restart, 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)
          This exportObject method may be invoked explicitly by an "activatable" object, that does not extend the Activatable class, in order to both a) register the object's activation descriptor, constructed from the supplied location, and data, with the activation system (so the object can be activated), and b) export the remote object, obj, on a specific port (if port=0, then an anonymous port is chosen).
protected  ActivationID sample code for java.rmi.activation.ActivationID definition code for java.rmi.activation.ActivationID getID sample code for java.rmi.activation.Activatable.getID() definition code for java.rmi.activation.Activatable.getID() ()
          Returns the object's activation identifier.
static boolean inactive sample code for java.rmi.activation.Activatable.inactive(java.rmi.activation.ActivationID) definition code for java.rmi.activation.Activatable.inactive(java.rmi.activation.ActivationID) (ActivationID sample code for java.rmi.activation.ActivationID definition code for java.rmi.activation.ActivationID  id)
          Informs the system that the object with the corresponding activation id is currently inactive.
static Remote sample code for java.rmi.Remote definition code for java.rmi.Remote register sample code for java.rmi.activation.Activatable.register(java.rmi.activation.ActivationDesc) definition code for java.rmi.activation.Activatable.register(java.rmi.activation.ActivationDesc) (ActivationDesc sample code for java.rmi.activation.ActivationDesc definition code for java.rmi.activation.ActivationDesc  desc)
          Register an object descriptor for an activatable remote object so that is can be activated on demand.
static boolean unexportObject sample code for java.rmi.activation.Activatable.unexportObject(java.rmi.Remote, boolean) definition code for java.rmi.activation.Activatable.unexportObject(java.rmi.Remote, boolean) (Remote sample code for java.rmi.Remote definition code for java.rmi.Remote  obj, boolean force)
          Remove the remote object, obj, from the RMI runtime.
static void unregister sample code for java.rmi.activation.Activatable.unregister(java.rmi.activation.ActivationID) definition code for java.rmi.activation.Activatable.unregister(java.rmi.activation.ActivationID) (ActivationID sample code for java.rmi.activation.ActivationID definition code for java.rmi.activation.ActivationID  id)
          Revokes previous registration for the activation descriptor associated with id.
 
Methods inherited from class java.rmi.server.RemoteServer sample code for java.rmi.server.RemoteServer definition code for java.rmi.server.RemoteServer
getClientHost sample code for java.rmi.server.RemoteServer.getClientHost() definition code for java.rmi.server.RemoteServer.getClientHost() , getLog sample code for java.rmi.server.RemoteServer.getLog() definition code for java.rmi.server.RemoteServer.getLog() , setLog sample code for java.rmi.server.RemoteServer.setLog(java.io.OutputStream) definition code for java.rmi.server.RemoteServer.setLog(java.io.OutputStream)
 
Methods inherited from class java.rmi.server.RemoteObject sample code for java.rmi.server.RemoteObject definition code for java.rmi.server.RemoteObject
equals sample code for java.rmi.server.RemoteObject.equals(java.lang.Object) definition code for java.rmi.server.RemoteObject.equals(java.lang.Object) , getRef sample code for java.rmi.server.RemoteObject.getRef() definition code for java.rmi.server.RemoteObject.getRef() , hashCode sample code for java.rmi.server.RemoteObject.hashCode() definition code for java.rmi.server.RemoteObject.hashCode() , toString sample code for java.rmi.server.RemoteObject.toString() definition code for java.rmi.server.RemoteObject.toString() , toStub sample code for java.rmi.server.RemoteObject.toStub(java.rmi.Remote) definition code for java.rmi.server.RemoteObject.toStub(java.rmi.Remote)
 
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() , 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() , 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() , 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

Activatable sample code for java.rmi.activation.Activatable(java.lang.String, java.rmi.MarshalledObject, boolean, int) definition code for java.rmi.activation.Activatable(java.lang.String, java.rmi.MarshalledObject, boolean, int)

protected Activatable(String sample code for java.lang.String definition code for java.lang.String  location,
                      MarshalledObject sample code for java.rmi.MarshalledObject definition code for java.rmi.MarshalledObject  data,
                      boolean restart,
                      int port)
               throws ActivationException sample code for java.rmi.activation.ActivationException definition code for java.rmi.activation.ActivationException ,
                      RemoteException sample code for java.rmi.RemoteException definition code for java.rmi.RemoteException 
Constructor used to register and export the object on a specified port (an anonymous port is chosen if port=0) . A concrete subclass of this class must call this constructor to register and export the object during initial construction. As a side-effect of activatable object construction, the remote object is both "registered" with the activation system and "exported" (on an anonymous port if port=0) to the RMI runtime so that it is available to accept incoming calls from clients.

Parameters:
location - the location for classes for this object
data - the object's initialization data
port - the port on which the object is exported (an anonymous port is used if port=0)
restart - if true, the object is restarted (reactivated) when either the activator is restarted or the object's activation group is restarted after an unexpected crash; if false, the object is only activated on demand. Specifying restart to be true does not force an initial immediate activation of a newly registered object; initial activation is lazy.
Throws:
ActivationException sample code for java.rmi.activation.ActivationException definition code for java.rmi.activation.ActivationException - if object registration fails.
RemoteException sample code for java.rmi.RemoteException definition code for java.rmi.RemoteException - if either of the following fails: a) registering the object with the activation system or b) exporting the object to the RMI runtime.
Since:
1.2

Activatable sample code for java.rmi.activation.Activatable(java.lang.String, java.rmi.MarshalledObject, boolean, int, java.rmi.server.RMIClientSocketFactory, java.rmi.server.RMIServerSocketFactory) definition code for java.rmi.activation.Activatable(java.lang.String, java.rmi.MarshalledObject, boolean, int, java.rmi.server.RMIClientSocketFactory, java.rmi.server.RMIServerSocketFactory)

protected Activatable(String sample code for java.lang.String definition code for java.lang.String  location,
                      MarshalledObject sample code for java.rmi.MarshalledObject definition code for java.rmi.MarshalledObject  data,
                      boolean restart,
                      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)
               throws ActivationException sample code for java.rmi.activation.ActivationException definition code for java.rmi.activation.ActivationException ,
                      RemoteException sample code for java.rmi.RemoteException definition code for java.rmi.RemoteException 
Constructor used to register and export the object on a specified port (an anonymous port is chosen if port=0) .

A concrete subclass of this class must call this constructor to register and export the object during initial construction. As a side-effect of activatable object construction, the remote object is both "registered" with the activation system and "exported" (on an anonymous port if port=0) to the RMI runtime so that it is available to accept incoming calls from clients.

Parameters:
location - the location for classes for this object
data - the object's initialization data
restart - if true, the object is restarted (reactivated) when either the activator is restarted or the object's activation group is restarted after an unexpected crash; if false, the object is only activated on demand. Specifying restart to be true does not force an initial immediate activation of a newly registered object; initial activation is lazy.
port - the port on which the object is exported (an anonymous port is used if port=0)
csf - the client-side socket factory for making calls to the remote object
ssf - the server-side socket factory for receiving remote calls
Throws:
ActivationException sample code for java.rmi.activation.ActivationException definition code for java.rmi.activation.ActivationException - if object registration fails.
RemoteException sample code for java.rmi.RemoteException definition code for java.rmi.RemoteException - if either of the following fails: a) registering the object with the activation system or b) exporting the object to the RMI runtime.
Since:
1.2

Activatable sample code for java.rmi.activation.Activatable(java.rmi.activation.ActivationID, int) definition code for java.rmi.activation.Activatable(java.rmi.activation.ActivationID, int)

protected Activatable(ActivationID sample code for java.rmi.activation.ActivationID definition code for java.rmi.activation.ActivationID  id,
                      int port)
               throws RemoteException sample code for java.rmi.RemoteException definition code for java.rmi.RemoteException 
Constructor used to activate/export the object on a specified port. An "activatable" remote object must have a constructor that takes two arguments:

A concrete subclass of this class must call this constructor when it is activated via the two parameter constructor described above. As a side-effect of construction, the remote object is "exported" to the RMI runtime (on the specified port) and is available to accept incoming calls from clients.

Parameters:
id - activation identifier for the object
port - the port number on which the object is exported
Throws:
RemoteException sample code for java.rmi.RemoteException definition code for java.rmi.RemoteException - if exporting the object to the RMI runtime fails
Since:
1.2

Activatable sample code for java.rmi.activation.Activatable(java.rmi.activation.ActivationID, int, java.rmi.server.RMIClientSocketFactory, java.rmi.server.RMIServerSocketFactory) definition code for java.rmi.activation.Activatable(java.rmi.activation.ActivationID, int, java.rmi.server.RMIClientSocketFactory, java.rmi.server.RMIServerSocketFactory)

protected Activatable(ActivationID sample code for java.rmi.activation.ActivationID definition code for java.rmi.activation.ActivationID  id,
                      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)
               throws RemoteException sample code for java.rmi.RemoteException definition code for java.rmi.RemoteException 
Constructor used to activate/export the object on a specified port. An "activatable" remote object must have a constructor that takes two arguments:

A concrete subclass of this class must call this constructor when it is activated via the two parameter constructor described above. As a side-effect of construction, the remote object is "exported" to the RMI runtime (on the specified port) and is available to accept incoming calls from clients.

Parameters:
id - activation identifier for the object
port - the port number on which the object is exported
csf - the client-side socket factory for making calls to the remote object
ssf - the server-side socket factory for receiving remote calls
Throws:
RemoteException sample code for java.rmi.RemoteException definition code for java.rmi.RemoteException - if exporting the object to the RMI runtime fails
Since:
1.2
Method Detail

getID sample code for java.rmi.activation.Activatable.getID() definition code for java.rmi.activation.Activatable.getID()

protected ActivationID sample code for java.rmi.activation.ActivationID definition code for java.rmi.activation.ActivationID  getID()
Returns the object's activation identifier. The method is protected so that only subclasses can obtain an object's identifier.

Returns:
the object's activation identifier
Since:
1.2

register sample code for java.rmi.activation.Activatable.register(java.rmi.activation.ActivationDesc) definition code for java.rmi.activation.Activatable.register(java.rmi.activation.ActivationDesc)

public static Remote sample code for java.rmi.Remote definition code for java.rmi.Remote  register(ActivationDesc sample code for java.rmi.activation.ActivationDesc definition code for java.rmi.activation.ActivationDesc  desc)
                       throws UnknownGroupException sample code for java.rmi.activation.UnknownGroupException definition code for java.rmi.activation.UnknownGroupException ,
                              ActivationException sample code for java.rmi.activation.ActivationException definition code for java.rmi.activation.ActivationException ,
                              RemoteException sample code for java.rmi.RemoteException definition code for java.rmi.RemoteException 
Register an object descriptor for an activatable remote object so that is can be activated on demand.

Parameters:
desc - the object's descriptor
Returns:
the stub for the activatable remote object
Throws:
UnknownGroupException sample code for java.rmi.activation.UnknownGroupException definition code for java.rmi.activation.UnknownGroupException - if group id in desc is not registered with the activation system
ActivationException sample code for java.rmi.activation.ActivationException definition code for java.rmi.activation.ActivationException - if activation system is not running
RemoteException sample code for java.rmi.RemoteException definition code for java.rmi.RemoteException - if remote call fails
Since:
1.2

inactive sample code for java.rmi.activation.Activatable.inactive(java.rmi.activation.ActivationID) definition code for java.rmi.activation.Activatable.inactive(java.rmi.activation.ActivationID)

public static boolean inactive(ActivationID sample code for java.rmi.activation.ActivationID definition code for java.rmi.activation.ActivationID  id)
                        throws UnknownObjectException sample code for java.rmi.activation.UnknownObjectException definition code for java.rmi.activation.UnknownObjectException ,
                               ActivationException sample code for java.rmi.activation.ActivationException definition code for java.rmi.activation.ActivationException ,
                               RemoteException sample code for java.rmi.RemoteException definition code for java.rmi.RemoteException 
Informs the system that the object with the corresponding activation id is currently inactive. If the object is currently active, the object is "unexported" from the RMI runtime (only if there are no pending or in-progress calls) so the that it can no longer receive incoming calls. This call informs this VM's ActivationGroup that the object is inactive, that, in turn, informs its ActivationMonitor. If this call completes successfully, a subsequent activate request to the activator will cause the object to reactivate. The operation may still succeed if the object is considered active but has already unexported itself.

Parameters:
id - the object's activation identifier
Returns:
true if the operation succeeds (the operation will succeed if the object in currently known to be active and is either already unexported or is currently exported and has no pending/executing calls); false is returned if the object has pending/executing calls in which case it cannot be deactivated
Throws:
UnknownObjectException sample code for java.rmi.activation.UnknownObjectException definition code for java.rmi.activation.UnknownObjectException - if object is not known (it may already be inactive)
ActivationException sample code for java.rmi.activation.ActivationException definition code for java.rmi.activation.ActivationException - if group is not active
RemoteException sample code for java.rmi.RemoteException definition code for java.rmi.RemoteException - if call informing monitor fails
Since:
1.2

unregister sample code for java.rmi.activation.Activatable.unregister(java.rmi.activation.ActivationID) definition code for java.rmi.activation.Activatable.unregister(java.rmi.activation.ActivationID)

public static void unregister(ActivationID sample code for java.rmi.activation.ActivationID definition code for java.rmi.activation.ActivationID  id)
                       throws UnknownObjectException sample code for java.rmi.activation.UnknownObjectException definition code for java.rmi.activation.UnknownObjectException ,
                              ActivationException sample code for java.rmi.activation.ActivationException definition code for java.rmi.activation.ActivationException ,
                              RemoteException sample code for java.rmi.RemoteException definition code for java.rmi.RemoteException 
Revokes previous registration for the activation descriptor associated with id. An object can no longer be activated via that id.

Parameters:
id - the object's activation identifier
Throws:
UnknownObjectException sample code for java.rmi.activation.UnknownObjectException definition code for java.rmi.activation.UnknownObjectException - if object (id) is unknown
ActivationException sample code for java.rmi.activation.ActivationException definition code for java.rmi.activation.ActivationException - if activation system is not running
RemoteException sample code for java.rmi.RemoteException definition code for java.rmi.RemoteException - if remote call to activation system fails
Since:
1.2

exportObject sample code for java.rmi.activation.Activatable.exportObject(java.rmi.Remote, java.lang.String, java.rmi.MarshalledObject, boolean, int) definition code for java.rmi.activation.Activatable.exportObject(java.rmi.Remote, java.lang.String, java.rmi.MarshalledObject, boolean, int)

public static ActivationID sample code for java.rmi.activation.ActivationID definition code for java.rmi.activation.ActivationID  exportObject(Remote sample code for java.rmi.Remote definition code for java.rmi.Remote  obj,
                                        String sample code for java.lang.String definition code for java.lang.String  location,
                                        MarshalledObject sample code for java.rmi.MarshalledObject definition code for java.rmi.MarshalledObject  data,
                                        boolean restart,
                                        int port)
                                 throws ActivationException sample code for java.rmi.activation.ActivationException definition code for java.rmi.activation.ActivationException ,
                                        RemoteException sample code for java.rmi.RemoteException definition code for java.rmi.RemoteException 
This exportObject method may be invoked explicitly by an "activatable" object, that does not extend the Activatable class, in order to both a) register the object's activation descriptor, constructed from the supplied location, and data, with the activation system (so the object can be activated), and b) export the remote object, obj, on a specific port (if port=0, then an anonymous port is chosen). Once the object is exported, it can receive incoming RMI calls.

This method does not need to be called if obj extends Activatable, since the first constructor calls this method.

Parameters:
obj - the object being exported
location - the object's code location
data - the object's bootstrapping data
restart - if true, the object is restarted (reactivated) when either the activator is restarted or the object's activation group is restarted after an unexpected crash; if false, the object is only activated on demand. Specifying restart to be true does not force an initial immediate activation of a newly registered object; initial activation is lazy.
port - the port on which the object is exported (an anonymous port is used if port=0)
Returns:
the activation identifier obtained from registering the descriptor, desc, with the activation system the wrong group
Throws:
ActivationException sample code for java.rmi.activation.ActivationException definition code for java.rmi.activation.ActivationException - if activation group is not active
RemoteException sample code for java.rmi.RemoteException definition code for java.rmi.RemoteException - if object registration or export fails
Since:
1.2

exportObject sample code for java.rmi.activation.Activatable.exportObject(java.rmi.Remote, java.lang.String, java.rmi.MarshalledObject, boolean, int, java.rmi.server.RMIClientSocketFactory, java.rmi.server.RMIServerSocketFactory) definition code for java.rmi.activation.Activatable.exportObject(java.rmi.Remote, java.lang.String, java.rmi.MarshalledObject, boolean, int, java.rmi.server.RMIClientSocketFactory, java.rmi.server.RMIServerSocketFactory)

public static ActivationID sample code for java.rmi.activation.ActivationID definition code for java.rmi.activation.ActivationID  exportObject(Remote sample code for java.rmi.Remote definition code for java.rmi.Remote  obj,
                                        String sample code for java.lang.String definition code for java.lang.String  location,
                                        MarshalledObject sample code for java.rmi.MarshalledObject definition code for java.rmi.MarshalledObject  data,
                                        boolean restart,
                                        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)
                                 throws ActivationException sample code for java.rmi.activation.ActivationException definition code for java.rmi.activation.ActivationException ,
                                        RemoteException sample code for java.rmi.RemoteException definition code for java.rmi.RemoteException 
This exportObject method may be invoked explicitly by an "activatable" object, that does not extend the Activatable class, in order to both a) register the object's activation descriptor, constructed from the supplied location, and data, with the activation system (so the object can be activated), and b) export the remote object, obj, on a specific port (if port=0, then an anonymous port is chosen). Once the object is exported, it can receive incoming RMI calls.

This method does not need to be called if obj extends Activatable, since the first constructor calls this method.

Parameters:
obj - the object being exported
location - the object's code location
data - the object's bootstrapping data
restart - if true, the object is restarted (reactivated) when either the activator is restarted or the object's activation group is restarted after an unexpected crash; if false, the object is only activated on demand. Specifying restart to be true does not force an initial immediate activation of a newly registered object; initial activation is lazy.
port - the port on which the object is exported (an anonymous port is used if port=0)
csf - the client-side socket factory for making calls to the remote object
ssf - the server-side socket factory for receiving remote calls
Returns:
the activation identifier obtained from registering the descriptor, desc, with the activation system the wrong group
Throws:
ActivationException sample code for java.rmi.activation.ActivationException definition code for java.rmi.activation.ActivationException - if activation group is not active
RemoteException sample code for java.rmi.RemoteException definition code for java.rmi.RemoteException - if object registration or export fails
Since:
1.2

exportObject sample code for java.rmi.activation.Activatable.exportObject(java.rmi.Remote, java.rmi.activation.ActivationID, int) definition code for java.rmi.activation.Activatable.exportObject(java.rmi.Remote, java.rmi.activation.ActivationID, int)

public static Remote sample code for java.rmi.Remote definition code for java.rmi.Remote  exportObject(Remote sample code for java.rmi.Remote definition code for java.rmi.Remote  obj,
                                  ActivationID sample code for java.rmi.activation.ActivationID definition code for java.rmi.activation.ActivationID  id,
                                  int port)
                           throws RemoteException sample code for java.rmi.RemoteException definition code for java.rmi.RemoteException 
Export the activatable remote object to the RMI runtime to make the object available to receive incoming calls. The object is exported on an anonymous port, if port is zero.

During activation, this exportObject method should be invoked explicitly by an "activatable" object, that does not extend the Activatable class. There is no need for objects that do extend the Activatable class to invoke this method directly; this method is called by the second constructor above (which a subclass should invoke from its special activation constructor).

Parameters:
obj - the remote object implementation
id - the object's activation identifier
port - the port on which the object is exported (an anonymous port is used if port=0)
Returns:
the stub for the activatable remote object
Throws:
RemoteException sample code for java.rmi.RemoteException definition code for java.rmi.RemoteException - if object export fails
Since:
1.2

exportObject sample code for java.rmi.activation.Activatable.exportObject(java.rmi.Remote, java.rmi.activation.ActivationID, int, java.rmi.server.RMIClientSocketFactory, java.rmi.server.RMIServerSocketFactory) definition code for java.rmi.activation.Activatable.exportObject(java.rmi.Remote, java.rmi.activation.ActivationID, int, java.rmi.server.RMIClientSocketFactory, java.rmi.server.RMIServerSocketFactory)

public static Remote sample code for java.rmi.Remote definition code for java.rmi.Remote  exportObject(Remote sample code for java.rmi.Remote definition code for java.rmi.Remote  obj,
                                  ActivationID sample code for java.rmi.activation.ActivationID definition code for java.rmi.activation.ActivationID  id,
                                  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)
                           throws RemoteException sample code for java.rmi.RemoteException definition code for java.rmi.RemoteException 
Export the activatable remote object to the RMI runtime to make the object available to receive incoming calls. The object is exported on an anonymous port, if port is zero.

During activation, this exportObject method should be invoked explicitly by an "activatable" object, that does not extend the Activatable class. There is no need for objects that do extend the Activatable class to invoke this method directly; this method is called by the second constructor above (which a subclass should invoke from its special activation constructor).

Parameters:
obj - the remote object implementation
id - the object's activation identifier
port - the port on which the object is exported (an anonymous port is used if port=0)
csf - the client-side socket factory for making calls to the remote object
ssf - the server-side socket factory for receiving remote calls
Returns:
the stub for the activatable remote object
Throws:
RemoteException sample code for java.rmi.RemoteException definition code for java.rmi.RemoteException - if object export fails
Since:
1.2

unexportObject sample code for java.rmi.activation.Activatable.unexportObject(java.rmi.Remote, boolean) definition code for java.rmi.activation.Activatable.unexportObject(java.rmi.Remote, boolean)

public static boolean unexportObject(Remote sample code for java.rmi.Remote definition code for java.rmi.Remote  obj,
                                     boolean force)
                              throws NoSuchObjectException sample code for java.rmi.NoSuchObjectException definition code for java.rmi.NoSuchObjectException 
Remove the remote object, obj, from the RMI runtime. If successful, the object can no longer accept incoming RMI calls. If the force parameter is true, the object is forcibly unexported even if there are pending calls to the remote object or the remote object still has calls in progress. If the force parameter is false, the object is only unexported if there are no pending or in progress calls to the object.

Parameters:
obj - the remote object to be unexported
force - if true, unexports the object even if there are pending or in-progress calls; if false, only unexports the object if there are no pending or in-progress calls
Returns:
true if operation is successful, false otherwise
Throws:
NoSuchObjectException sample code for java.rmi.NoSuchObjectException definition code for java.rmi.NoSuchObjectException - if the remote object is not currently exported
Since:
1.2