Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## things.thinger.service.thing
Class ThingService

    java.lang.Object
      java.lang.Thread
          things.thinger.kernel.ThingsProcess
              things.thinger.service.Service
                  things.thinger.service.thing.ThingService

All Implemented Interfaces:
  java.lang.Runnable, Verbose, PushDrain, ControlInterface, ProcessInterface, ResourceListener

    public class ThingService

extends Service
implements PushDrain

Thing execution service. THIS IS NOT DONE.

Version:
  1.0

  Version History

      EPG - Initial - 5 FEB 06

Author:
  Erich P. Gatejen

Nested Class Summary

Nested classes/interfaces inherited from class java.lang.Thread
`java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler`

Field Summary

Fields inherited from class things.thinger.kernel.ThingsProcess
`DEFAULT_NAME, internalResult, myPostLogger, ssi`

Fields inherited from class java.lang.Thread
`MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY`

Constructor Summary
`ThingService()`

Method Summary
`void` | `constructThingsProcess()` Complete construction.
`void` | `destructThingsProcess()` Destroy.
`void` | `executeThingsProcess()` This is the entry point for the actual processing
`WhoAmI` | `getListenerId()` Get the ID of the listener.
`java.lang.String` | `getProcessName()` Get process name.
`void` | `init(ConduitID yourId)` Initialize the PushDrain.
`Receipt` | `postListener(Data n)` Listen for a post.
`void` | `resourceRevocation(WhoAmI resourceID)` The identified resource is in the process of being revoked.
`void` | `resourceRevoked(WhoAmI resourceID)` The identified resource bas been revoked.
`void` | `serviceOff()` Called to turn the service off.
`void` | `serviceOn()` Called to turn the service on.

Methods inherited from class things.thinger.service.Service
`setLogger`

Methods inherited from class things.thinger.kernel.ThingsProcess
`acceptHalt, acceptPause, finalize, fix, forceFinalize, forceHalt, getCurrentState, getCurrentStateNumeric, getProcessId, getResult, getStartTime, getThingsState, init, isVerbose, release, releasePause, requestHalt, requestPause, run, screech, verboseOff, verboseOn`

Methods inherited from class java.lang.Thread
`activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield`

Methods inherited from class java.lang.Object
`clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ThingService

    public ThingService()

Method Detail

### serviceOn

    public void serviceOn()
                   throws SystemException

  Called to turn the service on. This may be called by another thread.

  Specified by:
    `serviceOn` in class `Service`
  Throws:
    `SystemException`

### serviceOff

    public void serviceOff()
                    throws SystemException

  Called to turn the service off. This may be called by another thread.

  Specified by:
    `serviceOff` in class `Service`
  Throws:
    `SystemException`

### executeThingsProcess

    public void executeThingsProcess()
                              throws SystemException

  This is the entry point for the actual processing

  Specified by:
    `executeThingsProcess` in class `ThingsProcess`
  Throws:
    `SystemException`

### constructThingsProcess

    public void constructThingsProcess()
                                throws SystemException

  Complete construction. This will be called when the process is initialized.

  Specified by:
    `constructThingsProcess` in class `ThingsProcess`
  Throws:
    `SystemException`

### destructThingsProcess

    public void destructThingsProcess()
                               throws SystemException

  Destroy. This will be called when the Process is finalizing.

  Specified by:
    `destructThingsProcess` in class `ThingsProcess`
  Throws:
    `SystemException`

### getProcessName

    public java.lang.String getProcessName()

  Get process name. It does not have to be a unique ID.

  Specified by:
    `getProcessName` in interface `ProcessInterface`
  Specified by:
    `getProcessName` in class `ThingsProcess`
  Returns:
    the name as a String

### init

    public void init(ConduitID yourId)
              throws SystemException

  Initialize the PushDrain. This will be called by it's controller. An subsequent calls may result in a PANIC SystemException. Don't do it!

  Specified by:
    `init` in interface `PushDrain`
  Parameters:
    `yourId` - The ConduitID for this PushDrain.
  Throws:
    `SystemException`
  See Also:
    `ConduitID`

### postListener

    public Receipt postListener(Data n)
                         throws SystemException

  Listen for a post. Consumers should implement this.

  Specified by:
    `postListener` in interface `PushDrain`
  Parameters:
    `n` - The Data to post.
  Returns:
    a receipt
  Throws:
    `SystemException`

### resourceRevocation

    public void resourceRevocation(WhoAmI resourceID)
                            throws SystemException,
                                   java.lang.InterruptedException

  The identified resource is in the process of being revoked. It is still possible for the resource listener to call the resource within the context of this thread and call.

  Specified by:
    `resourceRevocation` in interface `ResourceListener`
  Parameters:
    `resourceID` - the ID of the resource that is being revoked.
  Throws:
    `SystemException`
    `java.lang.InterruptedException`
  See Also:
    `WhoAmI`

### resourceRevoked

    public void resourceRevoked(WhoAmI resourceID)
                         throws SystemException,
                                java.lang.InterruptedException

  The identified resource bas been revoked. It is gone. Attempting to call it would be a very bad thing. The listener should remove the resource from it's internal lists..

  Specified by:
    `resourceRevoked` in interface `ResourceListener`
  Parameters:
    `resourceID` - the ID of the resource that has been revoked.
  Throws:
    `SystemException`
    `java.lang.InterruptedException`
  See Also:
    `WhoAmI`

### getListenerId

    public WhoAmI getListenerId()

  Get the ID of the listener.

  Specified by:
    `getListenerId` in interface `ResourceListener`
  Returns:
    The listener's ID.
  See Also:
    `WhoAmI`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Things.