net.sf.asyncobjects
Interface ACloseable

All Superinterfaces:
AsyncObject
All Known Subinterfaces:
AByteChannel, AByteInput, AByteOutput, AChannel<D,I,O>, AInput<D>, AOutput<D>, AServerSocket, ASocket, ATextChannel, ATextInput, ATextOutput, ATimer
All Known Implementing Classes:
BoundedByteInput, BoundedInput, BoundedTextInput, BufferedByteChannel, BufferedByteInput, BufferedByteOutput, BufferedInput, BufferedOutput, BufferedTextChannel, BufferedTextInput, BufferedTextOutput, BytePipe, BytePipe.InternalBytePipeInput, BytePipe.InternalBytePipeOutput, CloseableWrapper, DecoderTextInput, EncoderTextOutput, ExhaustingByteInput, ExhaustingInput, ExhaustingTextInput, GeneratingInput, InputStreamAdapter, MulticastByteOutput, MulticastOutput, MulticastTextOutput, NIOServerSocket, NIOSocket, NIOSocketInputStream, NIOSocketOutputStream, NIOStream, NulByteInput, NulInput, NulTextInput, OutputStreamAdapter, Pipe, Pipe.InternalPipeInput, Pipe.InternalPipeOutput, RandomByteInput, RandomTextInput, RecordingByteOutput, RecordingOutput, RecordingTextOutput, RepeatingByteInput, RepeatingInput, RepeatingTextInput, SavingByteInput, SavingInput, SavingTextInput, TextPipe, TextPipe.InternalTextPipeInput, TextPipe.InternalTextPipeOutput, TimerWrapper, TServerSocket, TSocket, TSocket.TInputStreamAdapter, TSocket.TOutputStreamAdapter, UncloseableByteInput, UncloseableInput, UncloseableTextInput, WrappingChannel

public interface ACloseable
extends AsyncObject

The object that should be closed after it is no more used. Such objects usually represent some connection resource. For example file stream or network socket.

Author:
const
See Also:
Using

Method Summary
 Promise<Void> close()
          Close resource
 
Methods inherited from interface net.sf.asyncobjects.AsyncObject
dereference, isImmediate
 

Method Detail

close

Promise<Void> close()
Close resource

Returns:
a promise that resolves when object is closed.


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