|
|||||||||
| 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
jpl.mipl.pgs.core.ActivatableServerBase
jpl.mipl.pgs.core.Controller
public class Controller
The Controller is responsible for scheduling requests to appropriate Service Factory, while performing load balancing among service factories. It also monitors service factories for overall system integrity and functioning.
Copyright 2004-2005, California Institute of Technology.
ALL RIGHTS RESERVED.
U.S. Government Sponsorship acknowledge.
| Nested Class Summary | |
|---|---|
static class |
Controller.ThreadGroupNotifier
|
| Field Summary | |
|---|---|
static long |
serialVersionUID
|
| Fields inherited from class jpl.mipl.pgs.core.ActivatableServerBase |
|---|
currentStatus, logger, mission, serverName, startUpData, userPassWd |
| Fields inherited from class java.rmi.server.RemoteObject |
|---|
ref |
| Constructor Summary | |
|---|---|
Controller(ActivationID activationid,
MarshalledObject marshalledobject)
Constructs a Controller. |
|
| Method Summary | |
|---|---|
void |
abort(String processName,
Long pIID,
String reason)
Abort the specified process instance. |
void |
addSF(PGSSession tsession,
ServiceFactory_IF sf)
For adding the given Service Factory to Controller's list. |
void |
configure(PGSSession tsession,
Map ht)
For updating Controller's configuration. |
String |
doCommand(PGSSession tsession,
Map command)
Pass the command to scheduler. |
void |
pause(String processName,
Long pIID,
String reason,
String nodeName)
Pause either all or specified process instance. |
void |
reassingRequests(long sfid)
No-Op. |
void |
releaseRequest(Map request)
|
void |
releaseRequest(PGSSession tsession,
Map request)
Runs the given request. |
void |
removeSF(PGSSession tsession,
long sfid)
Removes the Service Factory identified with sfId from the list. |
void |
resume(String processName,
Long pIID,
String nodeName)
Resume the specified process instance. |
boolean |
shutdown(PGSSession tsession,
String explanation,
boolean forceExit)
Stops this server. |
void |
stop(String processName,
Long pIID,
String reason)
Stop the specified process instance. |
| Methods inherited from class jpl.mipl.pgs.core.ActivatableServerBase |
|---|
getStatus, shutDown |
| 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 |
| Methods inherited from interface jpl.mipl.pgs.core.ServerBase_IF |
|---|
getStatus |
| Field Detail |
|---|
public static final long serialVersionUID
| Constructor Detail |
|---|
public Controller(ActivationID activationid,
MarshalledObject marshalledobject)
throws ActivationException,
RemoteException
activationid - The usual.marshalledobject - A marshalled object containing the serialized
Configuration file (UPF).
ActivationException
RemoteExceptionfor details.| Method Detail |
|---|
public void configure(PGSSession tsession,
Map ht)
throws RemoteException
Controller_IF
configure in interface Controller_IFtsession - A valid session as created by using the persistent store interface.ht - A hashtable containing any of the parameters in the startup data.
jpl.mipl.pgs.utils.UPF.MONITOR_FREQUENCY
NOTE: The current implementation does not user perstore for storing/retrieving
the configuration information. Thus, in event of server startup, old
values will be used. This will change.
RemoteException
public boolean shutdown(PGSSession tsession,
String explanation,
boolean forceExit)
throws RemoteException
ActivatableServerBase
shutdown in interface ServerBase_IFshutdown in class ActivatableServerBasetsession - 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.
RemoteException - If the user is not authorized or an error occurs
in shutdown.public void reassingRequests(long sfid)
public void removeSF(PGSSession tsession,
long sfid)
throws RemoteException
removeSF in interface Controller_IFtsession - sfid - The id of the service factory that is to be removed from the
list.
RemoteException - If the user is not authorized or the sfId is
invalid.
public void addSF(PGSSession tsession,
ServiceFactory_IF sf)
throws RemoteException
Controller_IF
addSF in interface Controller_IFtsession - A valid session as created by using the persistent store interface.sf - the service factory to be added.
RemoteException - if the user is not an authorized user or if
an exception is received from the activation system.
public final void releaseRequest(Map request)
throws RemoteException
RemoteExceptionreleaseRequest(PGSSession,Map)
public String doCommand(PGSSession tsession,
Map command)
throws RemoteException
Controller_IF
doCommand in interface Controller_IFRemoteException
public final void releaseRequest(PGSSession tsession,
Map request)
throws NoRunningSF,
RequestRejected,
RemoteException
releaseRequest in interface Controller_IFtsession - A valid PGSSession object.request - A map containing the UPF content that specifies which ProcessDefinition or ProcessInstance is to be executed
NoRunningSF - if there aren't any running SF that can handle this request or the request parameter
contains SFID, the ID of the service factory that is to be
used for running this request and that SF is no longer available.
RequestRejected - if between asking the SF that it can handle this request and dispatching to SF
an error occurs (such as SF is shutting down).
RemoteException - For generic errors.
public void pause(String processName,
Long pIID,
String reason,
String nodeName)
throws RemoteException
pause in interface ProcessControl_IFprocessName - 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 pause.nodeName - the name of the node where the process is to pause.
The algorithm is as follows:
-- if process id is not null, then pause it at the specified node.
-- else if process name is not null, then pause all processes with that given name at the specified node
-- else pause all process instances.
RemoteException
public void resume(String processName,
Long pIID,
String nodeName)
throws RemoteException
resume in interface ProcessControl_IFRemoteException
public void stop(String processName,
Long pIID,
String reason)
throws RemoteException
stop in interface ProcessControl_IFRemoteException
public void abort(String processName,
Long pIID,
String reason)
throws RemoteException
abort in interface ProcessControl_IFRemoteException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||