jpl.mipl.cassini.CDRS.servers
Class CDRSServerManager

java.lang.Object
  extended by jpl.mipl.cassini.CDRS.servers.CDRSServerManager

public class CDRSServerManager
extends Object

Purpose:For starting and shutting down of servers.

 <b>
      Copyright 2002, California Institute of Technology. 
      ALL RIGHTS RESERVED.
      U.S. Government Sponsorship acknowledge.2002.
 
      CASSINI Downlink and Reconciliation Subsystem
  </b>
  ============================================================================
  <b>Modification History :</b>
  --------------------
 
  <b>Date       Who        What</b>
  ----------------------------------------------------------------------------
  02/16/2002    Raj        Initial Release
  04/15/2002    Raj        Added support for persistent group id usage.
  04/17/2002    Raj        Make last parameter in ActivationDesc to true
                           (for automatic start of the group if the only
                            object in the group crashes). NEED TO CHANGE IT
                            to false when the bug is fixed in JDK.
  05/06/2002    Raj        Added support for startup/shutdown of sub-control
                           and shutdown for server.
  09/18/2002    Raj        Modified call to checkAccess as per changes
                           to CDRSAccessUtils.
 
  03/11/2003    Raj        Fix for AR-108963.
  03/11/2003    Raj        Fix for AR-108961. Also changed to use env variable
                           LOGNAME and not USER.
  04/10/2003    Raj        Changed the wait time when starting RMID to
                           10 seconds from 3 seconds.
  ============================================================================
 

Version:
1.0
Author:
Raj Patel (rrp@mipl.jpl.nasa.gov)

Constructor Summary
CDRSServerManager(Properties startUpData)
          The constructor
 
Method Summary
 void cleanup()
          Clean up.
 void finalize()
           
 boolean shutDownSC(short serverId)
          For sub control shut down.
 boolean shutDownServer(short serverId)
          For server shut down.
 boolean shutDownServer(String serverName)
          For server shut down.
 CDRSServerBase startCDRSServer(Properties startUpData, Connection dbConn)
          For starting a CDRSServer other then the subcontrol
 CDRSServerBase startCDRSServer(short serverId)
          For starting the server by id.
 CDRSServerBase startCDRSServer(String serverName)
          For starting the server by name .
 CDRSServerBase startCDRSSubControl(Properties startUpData, Connection dbConn)
          For starting a given subcontrol.
 void startCDRSSubControls()
          Starts all of the subcontrols that can be started on this host and are not currently running.
 void startRMID()
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CDRSServerManager

public CDRSServerManager(Properties startUpData)
                  throws Exception
The constructor

Throws:
Exception
Method Detail

startCDRSServer

public CDRSServerBase startCDRSServer(String serverName)
                               throws Exception
For starting the server by name .

Throws:
Exception

startCDRSServer

public CDRSServerBase startCDRSServer(short serverId)
                               throws Exception
For starting the server by id.

Throws:
Exception

startCDRSServer

public CDRSServerBase startCDRSServer(Properties startUpData,
                                      Connection dbConn)
                               throws Exception
For starting a CDRSServer other then the subcontrol

Throws:
Exception

startCDRSSubControls

public void startCDRSSubControls()
                          throws Exception
Starts all of the subcontrols that can be started on this host and are not currently running.

Throws:
Exception

startCDRSSubControl

public CDRSServerBase startCDRSSubControl(Properties startUpData,
                                          Connection dbConn)
                                   throws Exception
For starting a given subcontrol.

Parameters:
startUpData - This properties specifies at the least the following: dbusername, dbname, dbservername,id of the server to be started and name of the server to be registered in the database.
dbConn - A live connection to the database.
Throws:
Exception

shutDownServer

public boolean shutDownServer(String serverName)
                       throws Exception
For server shut down. Any pending requests are discarded.

Throws:
Exception

shutDownServer

public boolean shutDownServer(short serverId)
                       throws Exception
For server shut down. Any pending requests are discarded.

Throws:
Exception

shutDownSC

public boolean shutDownSC(short serverId)
                   throws Exception
For sub control shut down. Any pending requests are discarded.

Throws:
Exception

startRMID

public void startRMID()
               throws Exception
Throws:
Exception

cleanup

public void cleanup()
             throws Exception
Clean up. Close connection when not needed.

Throws:
Exception

finalize

public void finalize()
              throws Throwable
Overrides:
finalize in class Object
Throws:
Throwable