Activation Model in RMI
Activation Model in RMI
– a codebase path (or URLs) from which the object's code can be
loaded,
•
• public boolean equals(Object obj);
•
• public int hashCode();
• }
The Activatable Class
• The Activatable class provides support for remote objects that require
persistent access over time and that can be activated by the system. The class
Activatable is the main API that developers need to use to implement and
manage activatable objects. Note that you must first run the activation system
daemon, rmid, before objects can be registered and/or activated.
• package java.rmi.activation;
•
• public abstract class Activatable
• extends java.rmi.server.RemoteServer
• {
• protected Activatable(String codebase,
• java.rmi.MarshalledObject data,
• boolean restart,
• int port)
• throws ActivationException, java.rmi.RemoteException;
•
•
• protected Activatable(String codebase,
• java.rmi.MarshalledObject data,
• boolean restart, int port,
• RMIClientSocketFactory csf,
• RMIServerSocketFactory ssf)
• throws ActivationException, java.rmi.RemoteException;
•
• protected Activatable(ActivationID id, int port)
• throws java.rmi.RemoteException;
•
• protected Activatable(ActivationID id, int port,
• RMIClientSocketFactory csf,
• RMIServerSocketFactory ssf)
• throws java.rmi.RemoteException;
•
• protected ActivationID getID();
•
• public static Remote register(ActivationDesc desc)
• throws UnknownGroupException, ActivationException,
• java.rmi.RemoteException;
•
•
• public static boolean inactive(ActivationID id)
• throws UnknownObjectException, ActivationException,
• java.rmi.RemoteException;
•
• public static void unregister(ActivationID id)
• throws UnknownObjectException, ActivationException,
• java.rmi.RemoteException;
•
• public static ActivationID exportObject(Remote obj,
• String codebase,
• MarshalledObject data,
• boolean restart,
• int port)
• throws ActivationException, java.rmi.RemoteException;
•
•
• public static ActivationID exportObject(Remote obj,
• String codebase,
• MarshalledObject data,
• boolean restart,
• int port,
• RMIClientSocketFactory csf,
• RMIServerSocketFactory ssf)
• throws ActivationException, java.rmi.RemoteException;
• public static Remote exportObject(Remote obj,
• ActivationID id,
• int port)
• throws java.rmi.RemoteException;
• public static Remote exportObject(Remote obj,
• ActivationID id,
• int port,
• RMIClientSocketFactory csf,
• RMIServerSocketFactory ssf)
• throws java.rmi.RemoteException;
• public static boolean unexportObject(Remote obj, boolean force)
• throws java.rmi.NoSuchObjectException;
• }