things.thinger.kernel
Interface ProcessInterface

All Known Implementing Classes:
ActorService, CLIBackbone, CLIService, ConsoleService, HttpCLIService, HttpToolService, HttpToolServiceThread, KernalBasic_THINGProcessWrapper, KernelBasic, KernelBasicBase, LocalCommandService, ProxyService, Service, ThingService, ThingsProcess

public interface ProcessInterface

A process interface for process access.

Version:
1.0

Version History

EPG - Adapted from another project - 25 JUN 05
 
Author:
Erich P. Gatejen

Method Summary
 void forceHalt()
          Force halt.
 WhoAmI getProcessId()
           
 java.lang.String getProcessName()
           
 RESULT getResult()
          Get the latest result.
 ThingsState getThingsState()
          Get the process state.
 void releasePause()
          Allow it to resume.
 void requestHalt()
          Request halt.
 boolean requestPause()
          Request that the process is paused.
 

Method Detail

getThingsState

ThingsState getThingsState()
                           throws ThingsException
Get the process state.

Returns:
the state
Throws:
things.thinger.ThingsException
ThingsException

requestPause

boolean requestPause()
                     throws ThingsException
Request that the process is paused. It will return true if it is already paused (but not if a request is just pending). The request will be ignored if the current state cannot be paused. Only a RUNNING process will respond to a pause. There is no count on this.

Returns:
true if the process is already paused, else false
Throws:
things.thinger.ThingsException
ThingsException

releasePause

void releasePause()
                  throws ThingsException
Allow it to resume. If the process is not in a state that can be run, it will ignore this release. It will not override a halt request.

Throws:
things.thinger.ThingsException
ThingsException

requestHalt

void requestHalt()
                 throws ThingsException
Request halt. It will interrupt a pause. It will ultimately cause a PANIC to propagate through the process user. If the process isn't running or paused, it will be ignored.

Throws:
things.thinger.ThingsException
ThingsException

getProcessName

java.lang.String getProcessName()
Returns:
Returns the name.

getProcessId

WhoAmI getProcessId()
Returns:
Returns the ID.

forceHalt

void forceHalt()
               throws ThingsException
Force halt.

Throws:
things.thinger.ThingsException
ThingsException

getResult

RESULT getResult()
                 throws ThingsException
Get the latest result. Overrides the basic implementation in the ThingsProcess.

Returns:
the latest or the last result for the thread. It is completely up to the implementation how to implement this.
Throws:
ThingsException - for whatever reason. It may come from the THING itself.


Things.