xmlBlaster 1.6.4 API

org.xmlBlaster.client
Class StreamingCallback.Writer

java.lang.Object
  extended byjava.lang.Thread
      extended byorg.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
           
 
Field Summary
private  EDU.oswego.cs.dl.util.concurrent.LinkedQueue 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, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, 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 EDU.oswego.cs.dl.util.concurrent.LinkedQueue 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()
See Also:
Thread.run()

xmlBlaster 1.6.4 API

Copyright © 1999-2008 The xmlBlaster.org contributers.