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.httptool
Class HttpToolServiceThread

    java.lang.Object
      java.lang.Thread
          things.thinger.kernel.ThingsProcess
              things.thinger.service.httptool.HttpToolServiceThread

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

    public class HttpToolServiceThread

extends ThingsProcess

A specific thread.

Version:
  1.0

  Version History

      EPG - Added by request.  Based on something from another tool - 13 DEC 08
       EPG - Set content type charset for PAGE as utf-8.  Firefox 4 gets bitchy without it.  - 8 APR 10
       EPG - Stupid bug.  I set the Http-Version as "HTTP" instead of "HTTP/1.1"  Firefox 4 really didn't like.  It treated the streamed data as text instead of an HTTP message.
             For some reason whenever it went through the logging proxy it worked.  Weird. - 9 APR 10

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
`static int` | `COPY_BUFFER_SIZE`
`Rendezvous<HttpToolServiceContext>` | `handoff`

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
`HttpToolServiceThread(PageManager pageManager, ActionManager actionManager, ServeManager serveManager)` Constructor.

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` | `process()` This is the entry point for the actual processing
`protected long` | `processRequest()` Process a request.
`void` | `resourceRevocation(WhoAmI resourceID)` The identified resource is in the process of being revoked.
`void` | `resourceRevoked(WhoAmI resourceID)` The identified resource bas been revoked.

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`

Field Detail

### handoff

    public Rendezvous<HttpToolServiceContext> handoff

### COPY_BUFFER_SIZE

    public static final int COPY_BUFFER_SIZE

See Also:
  Constant Field Values

Constructor Detail

### HttpToolServiceThread

    public HttpToolServiceThread(PageManager pageManager,
                                 ActionManager actionManager,
                                 ServeManager serveManager)
                          throws java.lang.Throwable

  Constructor.

  Throws:
    `java.lang.Throwable`

Method Detail

### 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`

### executeThingsProcess

    public void executeThingsProcess()
                              throws SystemException,
                                     java.lang.InterruptedException

  This is the entry point for the actual processing. It's ok to let interrupted exceptions leave. It'll be the kernel or process that did it.

  Specified by:
    `executeThingsProcess` in class `ThingsProcess`
  Throws:
    `SystemException`
    `java.lang.InterruptedException`

### 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

### process

    public void process()
                 throws java.lang.Throwable

  This is the entry point for the actual processing

  Throws:
    `java.lang.Throwable`

### processRequest

    protected long processRequest()
                           throws SystemException

  Process a request. This will be single threaded for now.

  Throws:
    `SystemException` - *ONLY* if you want the service to die!

### resourceRevocation

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

  Description copied from interface: `ResourceListener`
  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.

  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

  Description copied from interface: `ResourceListener`
  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..

  Parameters:
    `resourceID` - the ID of the resource that has been revoked.
  Throws:
    `SystemException`
    `java.lang.InterruptedException`
  See Also:
    `WhoAmI`

### getListenerId

    public WhoAmI getListenerId()

  Description copied from interface: `ResourceListener`
  Get the ID of the listener.

  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.