| 
 | JavaTM 2 Platform Std. Ed. v1.4.2 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.activation.Activatable
The Activatable class provides support for remote
 objects that require persistent access over time and that
 can be activated by the system.
| Field Summary | 
| Fields inherited from class java.rmi.server.RemoteObject | 
| ref | 
| Constructor Summary | |
| protected  | Activatable(ActivationID id,
            int port)Constructor used to activate/export the object on a specified port. | 
| protected  | Activatable(ActivationID id,
            int port,
            RMIClientSocketFactory csf,
            RMIServerSocketFactory ssf)Constructor used to activate/export the object on a specified port. | 
| protected  | Activatable(String location,
            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(String location,
            MarshalledObject data,
            boolean restart,
            int port,
            RMIClientSocketFactory csf,
            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 | exportObject(Remote obj,
             ActivationID id,
             int port)Export the activatable remote object to the RMI runtime to make the object available to receive incoming calls. | 
| static Remote | exportObject(Remote obj,
             ActivationID id,
             int port,
             RMIClientSocketFactory csf,
             RMIServerSocketFactory ssf)Export the activatable remote object to the RMI runtime to make the object available to receive incoming calls. | 
| static ActivationID | exportObject(Remote obj,
             String location,
             MarshalledObject data,
             boolean restart,
             int port)This exportObjectmethod may be invoked explicitly
 by an "activatable" object, that does not extend theActivatableclass, in order to both a) register
 the object's activation descriptor, constructed from the suppliedlocation, anddata, 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 | exportObject(Remote obj,
             String location,
             MarshalledObject data,
             boolean restart,
             int port,
             RMIClientSocketFactory csf,
             RMIServerSocketFactory ssf)This exportObjectmethod may be invoked explicitly
 by an "activatable" object, that does not extend theActivatableclass, in order to both a) register
 the object's activation descriptor, constructed from the suppliedlocation, anddata, 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 | getID()Returns the object's activation identifier. | 
| static boolean | inactive(ActivationID id)Informs the system that the object with the corresponding activation idis currently inactive. | 
| static Remote | register(ActivationDesc desc)Register an object descriptor for an activatable remote object so that is can be activated on demand. | 
| static boolean | unexportObject(Remote obj,
               boolean force)Remove the remote object, obj, from the RMI runtime. | 
| static void | unregister(ActivationID id)Revokes previous registration for the activation descriptor associated with id. | 
| Methods inherited from class java.rmi.server.RemoteServer | 
| getClientHost, getLog, setLog | 
| Methods inherited from class java.rmi.server.RemoteObject | 
| equals, getRef, hashCode, toString, toStub | 
| Methods inherited from class java.lang.Object | 
| clone, finalize, getClass, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
protected Activatable(String location,
                      MarshalledObject data,
                      boolean restart,
                      int port)
               throws ActivationException,
                      RemoteException
location - the location for classes for this objectdata - the object's initialization dataport - 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.
ActivationException - if object registration fails.
RemoteException - if either of the following fails:
 a) registering the object with the activation system or b) exporting
 the object to the RMI runtime.
protected Activatable(String location,
                      MarshalledObject data,
                      boolean restart,
                      int port,
                      RMIClientSocketFactory csf,
                      RMIServerSocketFactory ssf)
               throws ActivationException,
                      RemoteException
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.
location - the location for classes for this objectdata - the object's initialization datarestart - 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 objectssf - the server-side socket factory for receiving remote calls
ActivationException - if object registration fails.
RemoteException - if either of the following fails:
 a) registering the object with the activation system or b) exporting
 the object to the RMI runtime.
protected Activatable(ActivationID id,
                      int port)
               throws RemoteException
ActivationID), and
 MarshalledObject).
 
 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.
id - activation identifier for the objectport - the port number on which the object is exported
RemoteException - if exporting the object to the RMI
 runtime fails
protected Activatable(ActivationID id,
                      int port,
                      RMIClientSocketFactory csf,
                      RMIServerSocketFactory ssf)
               throws RemoteException
ActivationID), and
 MarshalledObject).
 
 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.
id - activation identifier for the objectport - the port number on which the object is exportedcsf - the client-side socket factory for making calls to the
 remote objectssf - the server-side socket factory for receiving remote calls
RemoteException - if exporting the object to the RMI
 runtime fails| Method Detail | 
protected ActivationID getID()
public static Remote register(ActivationDesc desc)
                       throws UnknownGroupException,
                              ActivationException,
                              RemoteException
desc - the object's descriptor
UnknownGroupException - if group id in desc
 is not registered with the activation system
ActivationException - if activation system is not running
RemoteException - if remote call fails
public static boolean inactive(ActivationID id)
                        throws UnknownObjectException,
                               ActivationException,
                               RemoteException
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.
id - the object's activation identifier
UnknownObjectException - if object is not known (it may
 already be inactive)
ActivationException - if group is not active
RemoteException - if call informing monitor fails
public static void unregister(ActivationID id)
                       throws UnknownObjectException,
                              ActivationException,
                              RemoteException
id. An object can no longer be
 activated via that id.
id - the object's activation identifier
UnknownObjectException - if object (id) is unknown
ActivationException - if activation system is not running
RemoteException - if remote call to activation system fails
public static ActivationID exportObject(Remote obj,
                                        String location,
                                        MarshalledObject data,
                                        boolean restart,
                                        int port)
                                 throws ActivationException,
                                        RemoteException
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.
obj - the object being exportedlocation - the object's code locationdata - the object's bootstrapping datarestart - 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)
desc, with the activation system
 the wrong group
ActivationException - if activation group is not active
RemoteException - if object registration or export fails
public static ActivationID exportObject(Remote obj,
                                        String location,
                                        MarshalledObject data,
                                        boolean restart,
                                        int port,
                                        RMIClientSocketFactory csf,
                                        RMIServerSocketFactory ssf)
                                 throws ActivationException,
                                        RemoteException
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.
obj - the object being exportedlocation - the object's code locationdata - the object's bootstrapping datarestart - 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 objectssf - the server-side socket factory for receiving remote calls
desc, with the activation system
 the wrong group
ActivationException - if activation group is not active
RemoteException - if object registration or export fails
public static Remote exportObject(Remote obj,
                                  ActivationID id,
                                  int port)
                           throws RemoteException
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).
obj - the remote object implementationid - the object's  activation identifierport - the port on which the object is exported (an anonymous
 port is used if port=0)
RemoteException - if object export fails
public static Remote exportObject(Remote obj,
                                  ActivationID id,
                                  int port,
                                  RMIClientSocketFactory csf,
                                  RMIServerSocketFactory ssf)
                           throws RemoteException
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).
obj - the remote object implementationid - the object's  activation identifierport - 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 objectssf - the server-side socket factory for receiving remote calls
RemoteException - if object export fails
public static boolean unexportObject(Remote obj,
                                     boolean force)
                              throws NoSuchObjectException
obj - the remote object to be unexportedforce - 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
NoSuchObjectException - if the remote object is not
 currently exported| 
 | JavaTM 2 Platform Std. Ed. v1.4.2 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Copyright 2003 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.