oemware.core
Class NamedPipeThread

java.lang.Object
  extended by java.lang.Thread
      extended by oemware.core.ThreadBase
          extended by oemware.core.SingleThread
              extended by oemware.core.NamedPipeThread
All Implemented Interfaces:
java.lang.Runnable

public final class NamedPipeThread
extends SingleThread

The named pipe thread class. This operates on a named pipe object. Data is pulled/added to a queue (one queue per object. The named pipe thread doesn't do anything around data validation or verification. It simply reads and writes the buffer size.

Version:
$Id: NamedPipeThread.java 13 2008-06-15 19:43:04Z oemware $

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 oemware.core.ThreadBase
mJoinThread, mJoinTimeout, mRunning
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
NamedPipeThread(NamedPipe pNamedPipe, java.util.concurrent.BlockingQueue<java.nio.ByteBuffer> pQueue, int pBufferSize)
          Create a new object.
NamedPipeThread(NamedPipe pNamedPipe, ObjectPool pBufferPool, java.util.concurrent.BlockingQueue<java.nio.ByteBuffer> pQueue, int pBufferSize)
          Create a new object.
 
Method Summary
 void execute()
          Handle the read/write to the named pipe.
 NamedPipe getNamedPipe()
           
 
Methods inherited from class oemware.core.SingleThread
getDeductExecuteTime, getSleepTime, run, setDeductExecuteTime, setSleepTime
 
Methods inherited from class oemware.core.ThreadBase
afterStart, afterStop, beforeStart, beforeStop, getJoinThread, getJoinTimeout, isRunning, setJoinThread, setJoinTimeout, shutdown, startup
 
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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NamedPipeThread

public NamedPipeThread(NamedPipe pNamedPipe,
                       java.util.concurrent.BlockingQueue<java.nio.ByteBuffer> pQueue,
                       int pBufferSize)
Create a new object.

Parameters:
pNamedPipe - The named pipe.
pQueue - The read/write queue (based on pRead flag).
pBufferSize - The size of the buffer. This is only used if the buffer pool isn't passed in.

NamedPipeThread

public NamedPipeThread(NamedPipe pNamedPipe,
                       ObjectPool pBufferPool,
                       java.util.concurrent.BlockingQueue<java.nio.ByteBuffer> pQueue,
                       int pBufferSize)
Create a new object.

Parameters:
pNamedPipe - The named pipe.
pBufferPool - This is an optional param. May be null.
pQueue - The read/write queue (based on pRead flag).
pBufferSize - The size of the buffer. This is only used if the buffer pool isn't passed in.
Method Detail

execute

public final void execute()
Handle the read/write to the named pipe.

Specified by:
execute in class SingleThread

getNamedPipe

public final NamedPipe getNamedPipe()


Copyright © 2008 Deft Labs - Released under LGPL, Version 3.0