jpl.mipl.pgs.core
Class ActivatableServerBase

java.lang.Object
  extended by java.rmi.server.RemoteObject
      extended by java.rmi.server.RemoteServer
          extended by java.rmi.activation.Activatable
              extended by jpl.mipl.pgs.core.ActivatableServerBase
All Implemented Interfaces:
Serializable, Remote, ServerBase_IF
Direct Known Subclasses:
Controller, DefaultStdController, LogServer, LogServer, PersistentStore, ServiceFactory

public abstract class ActivatableServerBase
extends Activatable
implements ServerBase_IF

Base class for all activatable PGS servers. This class proves common functionality such as extracting and decypher the marshalled object, checking for common required parameters, initializing the configuration and log4j loggers.


     Copyright 2004, California Institute of Technology. 
     ALL RIGHTS RESERVED.
     U.S. Government Sponsorship acknowledge.

 

Author:
Raj Patel (rrp@mipl.jpl.nasa.gov)
See Also:
Serialized Form

Field Summary
protected  int currentStatus
           
protected  org.apache.log4j.Logger logger
           
protected  String mission
           
protected  String serverName
           
protected  Hashtable startUpData
           
protected  String userPassWd
           
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
protected ActivatableServerBase(ActivationID activationid, MarshalledObject marshalledobject)
           
 
Method Summary
 int getStatus()
          Returns the status of the controller.
protected  boolean shutDown()
          This shutdown method must be used by the derived class.
abstract  boolean shutdown(PGSSession session, String explanation, boolean forceExit)
          Stops this server.
 
Methods inherited from class java.rmi.activation.Activatable
exportObject, exportObject, exportObject, exportObject, getID, inactive, register, unexportObject, unregister
 
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
 

Field Detail

currentStatus

protected int currentStatus

startUpData

protected transient Hashtable startUpData

logger

protected org.apache.log4j.Logger logger

userPassWd

protected transient String userPassWd

mission

protected String mission

serverName

protected String serverName
Constructor Detail

ActivatableServerBase

protected ActivatableServerBase(ActivationID activationid,
                                MarshalledObject marshalledobject)
                         throws RemoteException,
                                ActivationException
Throws:
RemoteException
ActivationException
Method Detail

getStatus

public int getStatus()
              throws RemoteException
Returns the status of the controller.

Specified by:
getStatus in interface ServerBase_IF
Throws:
RemoteException

shutdown

public abstract boolean shutdown(PGSSession session,
                                 String explanation,
                                 boolean forceExit)
                          throws RemoteException
Stops this server. Any call to the server after shutdown will result in RMI exception.

Specified by:
shutdown in interface ServerBase_IF
Parameters:
session - A valid session created by the persistent store interface.
explanation - A human readable explanation for shutting down the server.
forceExit - if true, exit without completing any pending work.
Throws:
RemoteException - If the user is not authorized or an error occurs in shutdown.

shutDown

protected boolean shutDown()
                    throws Exception
This shutdown method must be used by the derived class.

Throws:
Exception