|
|||||||||
| 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.jbpm.standalone.DefaultStdController
public class DefaultStdController
Default implementation of the StandaloneController_IF interface.
This is a light weight implementation of the Controller_IF class.
This class provides similar functionality as the Controller class.
The main difference is that this class runs all pipelines on single
machine, namely the machine on which the instance of this class is running.
Implementation Hints:
The default execution engine, JBPMExeEngine, starts the
controller in a separate thread but it does not associate any thread groups
with the controller thread. It is a wise idea thus for completely new implementation
of the StandaloneController_IF to catch Throwable instead of just exception
to avoid thread death.
Copyright 2004-present, California Institute of Technology.
ALL RIGHTS RESERVED.
U.S. Government Sponsorship acknowledge.
| Field Summary | |
|---|---|
static long |
serialVersionUID
|
| Fields inherited from class jpl.mipl.pgs.core.ActivatableServerBase |
|---|
currentStatus, mission, serverName, startUpData, userPassWd |
| Fields inherited from class java.rmi.server.RemoteObject |
|---|
ref |
| Fields inherited from interface jpl.mipl.pgs.jbpm.standalone.StandaloneController_IF |
|---|
STDCONTROLLER_SERVER_NAME |
| Constructor Summary | |
|---|---|
protected |
DefaultStdController(ActivationID activationid,
MarshalledObject marshalledobject)
Create a JBPM execution engine using the scheduler class as specified by JVM environment variable SCHEDULER_CLASS_NAME. |
| Method Summary | |
|---|---|
void |
abort(String processName,
Long pIID,
String reason)
Abort the specified process instance. |
void |
addSF(PGSSession session,
ServiceFactory_IF sf)
No-Op |
void |
configure(PGSSession session,
Map newConfiguration)
No-Op |
String |
doCommand(PGSSession session,
Map command)
Pass the command to scheduler. |
PersistentStore_IF |
getReferenceToPS()
For obtaining reference to PS. |
int |
getStatus()
Always returns 0. |
void |
pause(String processName,
Long pIID,
String reason,
String nodeName)
Pause either all or specified process instance. |
void |
releaseRequest(PGSSession session,
Map request)
Runs the request in separate thread. |
void |
removeSF(PGSSession session,
long sfid)
No-OP |
void |
requestCompleted(jpl.mipl.pgs.jbpm.standalone.SimpleRequestRunner rr)
Called by the SimpleRequestRunner to indicate request completion. |
void |
resume(String processName,
Long pIID,
String nodeName)
Resume the specified process instance. |
boolean |
shutdown(PGSSession session,
String explanation,
boolean forceExit)
Shutdown this engine. |
void |
stop(String processName,
Long pIID,
String reason)
Stop the specified process instance. |
void |
uncaughtException(Thread t,
Throwable e)
Called by the thread group associated with the threads used in this class to report exceptions not caught by the threads. |
| Methods inherited from class jpl.mipl.pgs.core.ActivatableServerBase |
|---|
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 |
| Field Detail |
|---|
public static final long serialVersionUID
| Constructor Detail |
|---|
protected DefaultStdController(ActivationID activationid,
MarshalledObject marshalledobject)
throws Exception
SCHEDULER_CLASS_NAME.
Please see shutdown(PGSSession, String, boolean) for implementation hints of
scheduler.
Exception| Method Detail |
|---|
public boolean shutdown(PGSSession session,
String explanation,
boolean forceExit)
throws RemoteException
shutdown in interface ServerBase_IFshutdown in class ActivatableServerBasesession - A valid PGSSessionexplanation - An explanation for shutting down the engine.forceExit - If true, each pipeline is aborted. If false, each pipeline is stopped.
Note:If this method is called from outside this class (i.e., the main process of
this class), than the calling method is responsible for shutting down the main process.
For example, after calling this method, the scheduler class should call System.exit to
ensure proper shutdown of the engine.
RemoteException - If the user is not authorized or an error occurs
in shutdown.
public int getStatus()
throws RemoteException
getStatus in interface ServerBase_IFgetStatus in class ActivatableServerBaseRemoteException
public void addSF(PGSSession session,
ServiceFactory_IF sf)
throws RemoteException
addSF in interface Controller_IFsession - 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 void removeSF(PGSSession session,
long sfid)
throws RemoteException
removeSF in interface Controller_IFsession - A valid session as created by using the persistent store interface.sfid - the service factory to be removed.
RemoteException - if the user is not an authorized user or if
an exception is received from the activation system.
public void configure(PGSSession session,
Map newConfiguration)
throws RemoteException
configure in interface Controller_IFsession - A valid session as created by using the persistent store interface.newConfiguration - 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 void pause(String processName,
Long pIID,
String reason,
String nodeName)
throws RemoteException
ProcessControl_IF
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 puase.nodeName - the name of the node where the process is to pause.
RemoteException - if the given process instance is not in this engine's list.ProcessControl_IF.pause(java.lang.String, java.lang.Long, java.lang.String, java.lang.String)
public void resume(String processName,
Long pIID,
String nodeName)
throws RemoteException
ProcessControl_IF
resume in interface ProcessControl_IFRemoteException - if the given process instance is not in this engine's list.ProcessControl_IF.resume(java.lang.String, java.lang.Long, java.lang.String)
public void stop(String processName,
Long pIID,
String reason)
throws RemoteException
ProcessControl_IF
stop in interface ProcessControl_IFRemoteException - if the given process instance is not in this engine's list.ProcessControl_IF.stop(java.lang.String, java.lang.Long, java.lang.String)
public void abort(String processName,
Long pIID,
String reason)
throws RemoteException
ProcessControl_IF
abort in interface ProcessControl_IFRemoteException - if the given process instance is not in this engine's list.ProcessControl_IF.abort(java.lang.String, java.lang.Long, java.lang.String)
public PersistentStore_IF getReferenceToPS()
throws RemoteException
getReferenceToPS in interface StandaloneController_IFException
RemoteException
public void releaseRequest(PGSSession session,
Map request)
throws NoRunningSF,
RequestRejected,
RemoteException
releaseRequest in interface Controller_IFsession - A valid PGS session objectrequest - The request parameters
RemoteException - if there is an error obtaining reference to PS (if perstor is in use) or error creating process runner.
NoRunningSF - thrown when there are no running SF.
RequestRejected thrown when non of the running SF can handle this request.
RemoteException unexpected error
RequestRejectedpublic void requestCompleted(jpl.mipl.pgs.jbpm.standalone.SimpleRequestRunner rr)
requestCompleted in interface StandaloneController_IF
public void uncaughtException(Thread t,
Throwable e)
public String doCommand(PGSSession session,
Map command)
throws RemoteException
doCommand in interface Controller_IFRemoteException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||