|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.org.ogsadai.activity.SynchronizedGrowableExternalPipe
This is a pipe designed to be shared between multiple writer threads and a single reader thread.
Field Summary | |
private static java.lang.String |
COPYRIGHT_NOTICE
Copyright statement |
private static DAILogger |
LOG
Logger object for logging in this class |
private boolean |
mClosed
Set to true when the pipe is closed. |
private java.util.List |
mData
Stores the blocks that are put onto the pipe. |
private ProcessingStatus |
mStatus
The status of the request containing the activity the has the pipe. |
Constructor Summary | |
SynchronizedGrowableExternalPipe(ProcessingStatus status)
Creates a new pipe for an input of an activity contained in the specified request. |
Method Summary | |
void |
close()
Closes the block writer to indicate that there are no more blocks are to be written. |
boolean |
hasNext()
Indicates whether or not there are any more blocks of data to be read from the block reader. |
boolean |
isOpen()
Indicates whether or not the block writer is open for writing via the put method. |
java.lang.Object |
next()
Gets the next block of data contained in the block reader. |
void |
put(java.lang.Object block)
Writes the specified block of output data. |
void |
waitForBlock()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final java.lang.String COPYRIGHT_NOTICE
private static final DAILogger LOG
private final java.util.List mData
private boolean mClosed
private ProcessingStatus mStatus
Constructor Detail |
public SynchronizedGrowableExternalPipe(ProcessingStatus status)
status
- the status of the request containing the activity that created
the pipeMethod Detail |
public java.lang.Object next()
BlockReader
next
in interface BlockReader
Object
BlockReader.next()
public void close()
BlockWriter
put
method should no longer be used.
close
in interface BlockWriter
public void put(java.lang.Object block)
BlockWriter
put
in interface BlockWriter
block
- the Object
block to write
PipeAccessException
- is there is an attempt to put data into the pipe before the
associated request has begun processingBlockWriter.put(Object)
public boolean hasNext()
BlockReader
hasNext
in interface BlockReader
public void waitForBlock()
public boolean isOpen()
BlockWriter
put
method. After the close
method has been
invoked this method should return false
.
isOpen
in interface BlockWriter
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |