xmlBlaster 2.2.0 API

org.xmlBlaster.client
Class StreamingCallback.Writer

java.lang.Object
  extended by java.lang.Thread
      extended by org.xmlBlaster.client.StreamingCallback.Writer
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
StreamingCallback

 class StreamingCallback.Writer
extends java.lang.Thread

Writer needed since the out stream must be written from a thread which does not die before the thread which reads the in counterpart. For some "strange" reason the implementation of the Pipe streams makes a check if the thread which has made the last write operation on the out stream still is valid. If not, a Dead End IO Exception is thrown when reading.

Author:
Michele Laghi

Nested Class Summary
(package private)  class StreamingCallback.Writer.WriterData
           
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
private  java.util.concurrent.LinkedBlockingQueue<StreamingCallback.Writer.WriterData> channel
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
StreamingCallback.Writer()
           
StreamingCallback.Writer(java.lang.String name)
           
 
Method Summary
 void close(java.io.OutputStream outStream)
           
 void run()
           
 void write(java.io.OutputStream outStream, byte[] buf)
           
 
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
 

Field Detail

channel

private java.util.concurrent.LinkedBlockingQueue<StreamingCallback.Writer.WriterData> channel
Constructor Detail

StreamingCallback.Writer

public StreamingCallback.Writer(java.lang.String name)

StreamingCallback.Writer

public StreamingCallback.Writer()
Method Detail

write

public void write(java.io.OutputStream outStream,
                  byte[] buf)
           throws java.lang.InterruptedException,
                  XmlBlasterException
Throws:
java.lang.InterruptedException
XmlBlasterException

close

public void close(java.io.OutputStream outStream)
           throws java.lang.InterruptedException,
                  XmlBlasterException
Throws:
java.lang.InterruptedException
XmlBlasterException

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread
See Also:
Thread.run()

xmlBlaster 2.2.0 API

Copyright © 1999-2014 The xmlBlaster.org contributers.