net.sf.asyncobjects.io
Class Pipe.InternalPipeOutput

java.lang.Object
  extended by net.sf.asyncobjects.AsyncUnicastServer<O>
      extended by net.sf.asyncobjects.io.Pipe.InternalPipeOutput
All Implemented Interfaces:
ACloseable, AsyncObject, ExplicitSharing, AOutput<D>
Direct Known Subclasses:
BytePipe.InternalBytePipeOutput, TextPipe.InternalTextPipeOutput
Enclosing class:
Pipe<D extends BatchedData<D>,I extends AInput<D>,O extends AOutput<D>,C extends AChannel<D,I,O>>

public class Pipe.InternalPipeOutput
extends AsyncUnicastServer<O>
implements AOutput<D>

This is an internal class. Output of the pipe. This class supports AByteOutput interface.


Constructor Summary
protected Pipe.InternalPipeOutput()
          A constructor
 
Method Summary
 Promise<Void> close()
          close stream
 Promise<Void> flush()
          Flush output
 Promise<Void> write(D buffer)
          Write data to stream
 
Methods inherited from class net.sf.asyncobjects.AsyncUnicastServer
dereference, export, isImmediate, myVat, promise
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.asyncobjects.AsyncObject
dereference, isImmediate
 

Constructor Detail

Pipe.InternalPipeOutput

protected Pipe.InternalPipeOutput()
A constructor

Method Detail

write

public Promise<Void> write(D buffer)
Write data to stream

Specified by:
write in interface AOutput<D extends BatchedData<D>>
Parameters:
buffer - a data to write
Returns:
a promise that resolves when pipe is ready for further writing
See Also:
AOutput.write(BatchedData)

flush

public Promise<Void> flush()
Flush output

Specified by:
flush in interface AOutput<D extends BatchedData<D>>
Returns:
when flush finishes
See Also:
AOutput.flush()

close

public Promise<Void> close()
close stream

Specified by:
close in interface ACloseable
Returns:
a promise that resolves to null or breaks with exception.
See Also:
ACloseable.close()


Copyright © 2002-2007 Constantine Plotnikov. All Rights Reserved.