jpl.mipl.pgs.client
Class controller

java.lang.Object
  extended by jpl.mipl.pgs.client.ClientHelper
      extended by jpl.mipl.pgs.client.controller
All Implemented Interfaces:
Remote, ProcessControl_IF

public class controller
extends ClientHelper
implements ProcessControl_IF

User nterface for starting the controller server.

 <b>
      Copyright 2007-Present, California Institute of Technology. 
      ALL RIGHTS RESERVED.
      U.S. Government Sponsorship acknowledge.
 
  </b>
 

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

Field Summary
static String RECONFIGURE
           
static String SCHEDULER_COMMAND
           
static String SCHEDULER_RECONFIG_FILE
           
 
Fields inherited from class jpl.mipl.pgs.client.ClientHelper
arguments, passWd, testParsing, userId
 
Constructor Summary
controller(String[] args)
          Constructor
 
Method Summary
 void abort(String processName, Long pIID, String reason)
          Abort the specified process instance.
 void configure(Map newConfig)
          Update the controller configuration
 String doCommand(Map cmd)
          This mechanism allows this controller interface to send commands to the project specific Scheduler.
 String getUsage()
          Usage message
 void init()
          Obtain user data to create a new session and find the controler server.
static void main(String[] args)
          Main program for interacting with the controller
 void pause(String psname, Long piid, String reason, String nodeName)
          Pause a process instance
 void resume(String processName, Long pIID, String nodeName)
          Resume a process instance
 void sendRequest(Map request)
          Send a request to the controller server for execution
 void start()
          Starts the controller server
 void stop(boolean forceIt)
          Stop the controller server
 void stop(String processName, Long pIID, String reason)
          Stop a process instance
 
Methods inherited from class jpl.mipl.pgs.client.ClientHelper
getValue, getValue, getValues, getValues, isCommand
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RECONFIGURE

public static final String RECONFIGURE
See Also:
Constant Field Values

SCHEDULER_COMMAND

public static final String SCHEDULER_COMMAND
See Also:
Constant Field Values

SCHEDULER_RECONFIG_FILE

public static final String SCHEDULER_RECONFIG_FILE
See Also:
Constant Field Values
Constructor Detail

controller

public controller(String[] args)
           throws Exception
Constructor

Throws:
Exception
Method Detail

getUsage

public String getUsage()
Usage message

Specified by:
getUsage in class ClientHelper

init

public void init()
          throws Exception
Obtain user data to create a new session and find the controler server.

Overrides:
init in class ClientHelper
Throws:
thrown - if session not created or controller not found
Exception

start

public void start()
           throws Exception
Starts the controller server

Throws:
thrown - if controller cannot be started
Exception

stop

public void stop(boolean forceIt)
          throws Exception
Stop the controller server

Throws:
thrown - if controller cannot be stopped
Exception

pause

public void pause(String psname,
                  Long piid,
                  String reason,
                  String nodeName)
           throws RemoteException
Pause a process instance

Specified by:
pause in interface ProcessControl_IF
Parameters:
psname - the name of the process that is to be stopped.
piid - the ID of the process instance that is to be stopped.
reason - an explanation, if appropriate, for the puase.
nodeName - the name of the node where the process is to pause.
Throws:
thrown - if process instance cannot be paused
RemoteException

resume

public void resume(String processName,
                   Long pIID,
                   String nodeName)
            throws RemoteException
Resume a process instance

Specified by:
resume in interface ProcessControl_IF
Throws:
thrown - if process instance cannot be resumed
RemoteException

stop

public void stop(String processName,
                 Long pIID,
                 String reason)
          throws RemoteException
Stop a process instance

Specified by:
stop in interface ProcessControl_IF
Throws:
thrown - if process instance cannot be stopped
RemoteException

abort

public void abort(String processName,
                  Long pIID,
                  String reason)
           throws RemoteException
Abort the specified process instance. See #pause for parameter documentation.

Specified by:
abort in interface ProcessControl_IF
Throws:
thrown - if process instance cannot be aborted
RemoteException

sendRequest

public void sendRequest(Map request)
                 throws Exception
Send a request to the controller server for execution

Throws:
thrown - if request cannot be released
Exception

configure

public void configure(Map newConfig)
               throws Exception
Update the controller configuration

Throws:
thrown - if configuration cannot be updated
Exception

doCommand

public String doCommand(Map cmd)
                 throws Exception
This mechanism allows this controller interface to send commands to the project specific Scheduler. When this is called it sends the Map cmd to the Scheduler calling its doCommnand() method.

Throws:
thrown - if the Scheduler cannot execute the given command
Exception

main

public static final void main(String[] args)
                       throws Exception
Main program for interacting with the controller

Throws:
Exception