public class UserCodeProcess extends StandardClient implements ProxyObserver<Job>, Runnable
agentisServer, MAIN_ARG_CONFIG, MAIN_ARG_CONNECT, MAIN_ARG_LOGFILE, MAIN_ARG_LOGLEVEL, MAIN_ARG_NONEWLOGSTREAM| Constructor and Description |
|---|
UserCodeProcess() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Job contents)
Receives job from the AgentProxy.
|
boolean |
assessStartConditions(Job job)
Override this method to implement application specific evaluation of start condition.
|
void |
complete(Job thisJob,
String jobKey)
Method called to handle the Complete transition
|
void |
control(String control,
String msg) |
protected Job |
getActualJob()
Gets the next possible Job based on the Transitions of the Default StateMachine
|
String |
getDesc() |
static void |
main(String[] args) |
void |
remove(String id)
Job removal notification from the AgentProxy.
|
void |
resume(Job thisJob,
String jobKey)
Method called to handle the Resume transition
|
void |
run() |
void |
runUserCodeLogic(Job job)
Override this mehod to implement application specific (business) logic
Default implementation - the agent execute any scripts, query or both defined
|
static void |
shutdown() |
void |
start(Job thisJob,
String jobKey)
Method called to handle the Start transition
|
void |
suspend(Job thisJob,
String jobKey)
Method called to handle the Suspend transition
|
getRequiredStateMachine, loginreadC2KArgs, setShutdownHandler, shutdownpublic UserCodeProcess()
throws InvalidDataException,
ObjectNotFoundException
public void start(Job thisJob, String jobKey) throws AccessRightsException, InvalidDataException, InvalidTransitionException, ObjectNotFoundException, PersistencyException, ObjectAlreadyExistsException, ScriptErrorException, InvalidCollectionModification
thisJob - the actual Job to be executed.jobKey - the key of the job (i.e. itemPath:stepPat)AccessRightsExceptionInvalidDataExceptionInvalidTransitionExceptionObjectNotFoundExceptionPersistencyExceptionObjectAlreadyExistsExceptionScriptErrorExceptionInvalidCollectionModificationpublic void complete(Job thisJob, String jobKey) throws Exception
thisJob - the actual Job to be executed.jobKey - the key of the job (i.e. itemPath:stepPat)Exceptionpublic void resume(Job thisJob, String jobKey) throws AccessRightsException, InvalidDataException, InvalidTransitionException, ObjectNotFoundException, PersistencyException, ObjectAlreadyExistsException, ScriptErrorException, InvalidCollectionModification
thisJob - the actual Job to be executed.jobKey - the key of the job (i.e. itemPath:stepPat)AccessRightsExceptionInvalidDataExceptionInvalidTransitionExceptionObjectNotFoundExceptionPersistencyExceptionObjectAlreadyExistsExceptionScriptErrorExceptionInvalidCollectionModificationpublic void suspend(Job thisJob, String jobKey) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException, InvalidDataException, ObjectNotFoundException, IOException, org.exolab.castor.mapping.MappingException, AccessRightsException, InvalidTransitionException, PersistencyException, ObjectAlreadyExistsException, InvalidCollectionModification, ScriptErrorException
thisJob - the actual Job to be executed.jobKey - the key of the job (i.e. itemPath:stepPat)org.exolab.castor.xml.MarshalExceptionorg.exolab.castor.xml.ValidationExceptionInvalidDataExceptionObjectNotFoundExceptionIOExceptionorg.exolab.castor.mapping.MappingExceptionAccessRightsExceptionInvalidTransitionExceptionPersistencyExceptionObjectAlreadyExistsExceptionInvalidCollectionModificationScriptErrorExceptionpublic boolean assessStartConditions(Job job)
job - the actual Job to be executed.public void runUserCodeLogic(Job job) throws AccessRightsException, InvalidDataException, InvalidTransitionException, ObjectNotFoundException, PersistencyException, ObjectAlreadyExistsException, InvalidCollectionModification, ScriptErrorException
job - the actual Job to be executed.AccessRightsExceptionInvalidDataExceptionInvalidTransitionExceptionObjectNotFoundExceptionPersistencyExceptionObjectAlreadyExistsExceptionInvalidCollectionModificationScriptErrorExceptionprotected Job getActualJob()
public void add(Job contents)
add in interface ProxyObserver<Job>public void control(String control, String msg)
control in interface ProxyObserver<Job>public void remove(String id)
remove in interface ProxyObserver<Job>public String getDesc()
public static void shutdown()
public static void main(String[] args)
Copyright © 1997–2017 CRISTAL-iSE. All rights reserved.