|
|||||||||
| 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.ServiceFactory
public class ServiceFactory
The Service Factory processes requests assigned to it by the Controller. It
maintains it's load factor using the supplied load calculator.
Copyright 2004-PRESENT, California Institute of Technology.
ALL RIGHTS RESERVED.
U.S. Government Sponsorship acknowledge.
| Field Summary |
|---|
| Fields inherited from class jpl.mipl.pgs.core.ActivatableServerBase |
|---|
currentStatus, logger, mission, serverName, startUpData, userPassWd |
| Fields inherited from class java.rmi.server.RemoteObject |
|---|
ref |
| Fields inherited from interface jpl.mipl.pgs.core.ServiceFactory_IF |
|---|
CANNOT_HANDLE_THIS_REQUEST |
| Constructor Summary | |
|---|---|
ServiceFactory(ActivationID id,
MarshalledObject data)
Default constructor |
|
| Method Summary | |
|---|---|
void |
abort(String processName,
Long pIID,
String reason)
Abort the specified process instance. |
protected void |
checkRequests()
|
void |
configure(PGSSession tsession,
Map ht)
For configuring ServiceFactory. |
int |
getActiveRequestsCount()
Returns number of requests this SF is running. |
Map |
getInfo()
Return the startup data |
float |
getLoadFactor(Map request)
Get the load factor from the Load Calculator |
void |
pause(String processName,
Long pIID,
String reason,
String nodeName)
Pause either all or specified process instance. |
void |
requestCompleted(String processInstanceId)
|
void |
reRunAbortedRequests()
Execute all stopped requests belonging to this service factory. |
void |
reRunStoppedRequests()
Execute all stopped requests belonging to this service factory. |
void |
resume(String processName,
Long pIID,
String nodeName)
Resume the specified process instance. |
void |
runRequest(PGSSession tsession,
Map request)
Starts the request specified my the parameter. |
void |
setController(Controller_IF controller)
Set the reference to the controller |
boolean |
shutdown(PGSSession tsession,
String explanation,
boolean forceExit)
Shut down this service factory |
void |
stop(PGSSession tsession,
boolean waitForAll)
Stop the factory and all request it is running. |
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 |
| Constructor Detail |
|---|
public ServiceFactory(ActivationID id,
MarshalledObject data)
throws RemoteException,
ActivationException
id - activation iddata - A marshalled object containing startup data
RemoteException - if the parent class throws remote exception or for
other reasons.
ActivationException - if the parent class throws activation exception
or for other reasons.| Method Detail |
|---|
public void configure(PGSSession tsession,
Map ht)
throws RemoteException
configure in interface ServiceFactory_IFtsession - A valid PGSSession.ht - Containing the following parameters:Monitor Frequency
RemoteException
public void reRunStoppedRequests()
throws RemoteException
reRunStoppedRequests in interface ServiceFactory_IFRemoteException
public void reRunAbortedRequests()
throws RemoteException
reRunAbortedRequests in interface ServiceFactory_IFRemoteExceptionprotected final void checkRequests()
public Map getInfo()
throws RemoteException
getInfo in interface ServiceFactory_IFRemoteException
public float getLoadFactor(Map request)
throws RemoteException
getLoadFactor in interface ServiceFactory_IFRemoteException
public void runRequest(PGSSession tsession,
Map request)
throws RemoteException
runRequest in interface ServiceFactory_IFtsession - The PGS session object to be used to authenticate the userrequest - The request to be processed. When database is in use, this
method first looks for
USERID, if not
found, it uses the id and password of the user that started this
SF. If USERID is specified then
PASSWD must also be
specified.
RemoteException
public void requestCompleted(String processInstanceId)
throws Exception
Exception
public void stop(PGSSession tsession,
boolean waitForAll)
throws RemoteException
stop in interface ServiceFactory_IFtsession - A session object created by using PersistentStorewaitForAll - If true, the SF will wait for all request to complete
before returning. If false, the SF will just signal
each running request to stop and return.
RemoteException
public void setController(Controller_IF controller)
throws RemoteException
setController in interface ServiceFactory_IFRemoteException
public boolean shutdown(PGSSession tsession,
String explanation,
boolean forceExit)
throws RemoteException
shutdown in interface ServerBase_IFshutdown in class ActivatableServerBasetsession - A session object created by PersistentStoreexplanation - The reason for shutdownforceExit - If set to true, each running request will be aborted. If
false each running request is stopped. In either case this method
waits for all running request to halt.
RemoteException - If the user is not authorized or an error occurs
in shutdown.
public int getActiveRequestsCount()
throws RemoteException
ServiceFactory_IF
getActiveRequestsCount in interface ServiceFactory_IFRemoteExceptionServiceFactory_IF.getActiveRequestsCount()
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 at specified node. if
nodeName is null, process instances are paused at current state.
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 | ||||||||