|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.gridsystems.nextgrid.api.pom.PemHelper
com.gridsystems.nextgrid.api.pom.ProcessImpl
com.gridsystems.nextgrid.api.pom.ServiceImpl
public final class ServiceImpl
Services are concrete processes, bound to a specific grounding.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.gridsystems.nextgrid.api.pom.ProcessImpl |
|---|
ProcessImpl.ValidationType |
| Field Summary |
|---|
| Fields inherited from class com.gridsystems.nextgrid.api.pom.ProcessImpl |
|---|
DFA_INITIAL_STATE, ENACTOR_LOG |
| Constructor Summary | |
|---|---|
ServiceImpl()
Creates a new instance. |
|
| Method Summary | |
|---|---|
void |
discover(nextgrid.api.env.ProcessEnvironment env)
|
void |
doEvaluate(nextgrid.api.env.ProcessEnvironment env)
Performs the actual actions needed for evaluating this process instance. |
protected void |
doReset()
Performs specific reset actions in each subclass. |
protected void |
doValidate(ProcessImpl.ValidationType type)
Performs any validation action needed for the process implementation. |
nextgrid.api.pom.Process |
findProcessById(java.net.URI id)
|
nextgrid.api.pom.Grounding |
getGrounding()
|
void |
prioritise(nextgrid.api.env.ProcessEnvironment env,
java.util.PriorityQueue<nextgrid.api.pom.Process> queue)
|
protected void |
resetChildren()
Resets any child process. |
void |
run(ProcessContext ctx)
Performs the actual enaction of a process. |
void |
setGrounding(nextgrid.api.pom.Grounding g)
|
java.lang.String |
toString()
|
| Methods inherited from class com.gridsystems.nextgrid.api.pom.ProcessImpl |
|---|
attachListeners, copy, enact, evaluate, evaluate, findRoot, getAttribute, getAttribute, getAttribute, getAttributes, getDescription, getId, getInput, getInputs, getInputs, getInputType, getName, getOutput, getOutputs, getOutputs, getOutputType, getParent, getState, getUsedInputNames, getUsedOutputNames, invalidate, isEvaluated, isLazy, isValidated, prioritise, putInput, putOutput, removeInput, removeOutput, reset, setAttribute, setAttribute, setDescription, setEvaluated, setId, setLazy, setName, setParent, setState, unuseInput, unuseOutput, useInput, useOutput, validate, waitForInputs |
| Methods inherited from class com.gridsystems.nextgrid.api.pom.PemHelper |
|---|
addListener, fireDiscovererSelected, fireDiscoveryFailed, fireDiscoveryFinished, fireDiscoveryStarting, fireEvent, fireProcessEvaluated, fireProcessFailed, fireProcessFailed, fireProcessFinished, fireProcessFinished, fireProcessSelected, fireProcessStarted, removeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface nextgrid.api.pom.Process |
|---|
addListener, copy, enact, evaluate, findRoot, getAttribute, getAttribute, getAttribute, getAttributes, getDescription, getId, getInput, getInputs, getInputType, getName, getOutput, getOutputs, getOutputType, getParent, getUsedInputNames, getUsedOutputNames, invalidate, isEvaluated, isLazy, isValidated, putInput, putOutput, removeInput, removeListener, removeOutput, reset, setAttribute, setAttribute, setDescription, setId, setLazy, setName, setParent, unuseInput, unuseOutput, useInput, useOutput, validate |
| Constructor Detail |
|---|
public ServiceImpl()
| Method Detail |
|---|
public nextgrid.api.pom.Process findProcessById(java.net.URI id)
findProcessById in interface nextgrid.api.pom.Process
public void prioritise(nextgrid.api.env.ProcessEnvironment env,
java.util.PriorityQueue<nextgrid.api.pom.Process> queue)
prioritise in interface nextgrid.api.pom.Processpublic void discover(nextgrid.api.env.ProcessEnvironment env)
discover in interface nextgrid.api.pom.Process
protected void doValidate(ProcessImpl.ValidationType type)
throws nextgrid.api.pom.ProcessException
doValidate in class ProcessImpltype - Specifies when this validation is being invoked
nextgrid.api.pom.ProcessException - If the validation failspublic nextgrid.api.pom.Grounding getGrounding()
getGrounding in interface nextgrid.api.pom.Servicepublic void setGrounding(nextgrid.api.pom.Grounding g)
setGrounding in interface nextgrid.api.pom.Service
public void doEvaluate(nextgrid.api.env.ProcessEnvironment env)
throws nextgrid.api.pom.ProcessException
doEvaluate in class ProcessImplenv - The process environment
nextgrid.api.pom.ProcessException - If an error occurs
public void run(ProcessContext ctx)
throws nextgrid.api.pom.ProcessException,
java.lang.InterruptedException
The instance must take into account possible errors, like service unavailability, or execution errors. As long as there are more "valid" candidates for the process, errors should not be propagated to the parent, and the next candidate should be selected and enacted.
A ProcessException as a result of this call means that this process is unable to correctly finish its execution, and that the parent must do something to fix the problem.
run in interface Enactablectx - A process context
nextgrid.api.pom.ProcessException - If an unrecoverable local error occurs
java.lang.InterruptedException - If the thread is interruptedprotected void doReset()
doReset in class ProcessImplprotected void resetChildren()
resetChildren in class ProcessImplpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||