net.sf.asyncobjects.io
Interface AOutput<D extends BatchedData<D>>

Type Parameters:
D - a bached data element
All Superinterfaces:
ACloseable, AsyncObject
All Known Subinterfaces:
AByteOutput, ATextOutput
All Known Implementing Classes:
BufferedByteOutput, BufferedOutput, BufferedTextOutput, BytePipe.InternalBytePipeOutput, EncoderTextOutput, MulticastByteOutput, MulticastOutput, MulticastTextOutput, NIOSocketOutputStream, OutputStreamAdapter, Pipe.InternalPipeOutput, RecordingByteOutput, RecordingOutput, RecordingTextOutput, TextPipe.InternalTextPipeOutput, TSocket.TOutputStreamAdapter

public interface AOutput<D extends BatchedData<D>>
extends ACloseable

A generic output interface.

Author:
const

Method Summary
 Promise<Void> flush()
          Flush data in stream, upon return of this method all data will be written out to most underlying layer
 Promise<Void> write(D data)
          This method writes out the data.
 
Methods inherited from interface net.sf.asyncobjects.ACloseable
close
 
Methods inherited from interface net.sf.asyncobjects.AsyncObject
dereference, isImmediate
 

Method Detail

write

Promise<Void> write(D data)
This method writes out the data. Upon resolving promise, the output will be ready to accept next porition of data.

Parameters:
data - data to write out
Returns:
a promise that resolves to null when stream is ready for next operation.

flush

Promise<Void> flush()
Flush data in stream, upon return of this method all data will be written out to most underlying layer

Returns:
a promise that will resolve when data will be written out


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