net.sf.asyncobjects
Interface AsyncObject

All Known Subinterfaces:
AByteChannel, AByteInput, AByteOutput, ACallable<T>, AChannel<D,I,O>, ACloseable, AInput<D>, AListener<Event>, AMapper<I,O>, AOutput<D>, AQueue<T>, AResolver<T>, ARunnable, ASemaphore, AServerSocket, ASocket, ASocketFactory, ATextChannel, ATextInput, ATextOutput, ATimer, ATimerTask
All Known Implementing Classes:
AsyncUnicastServer, BoundedByteInput, BoundedInput, BoundedTextInput, BufferedByteChannel, BufferedByteInput, BufferedByteOutput, BufferedInput, BufferedOutput, BufferedTextChannel, BufferedTextInput, BufferedTextOutput, BytePipe, BytePipe.InternalBytePipeInput, BytePipe.InternalBytePipeOutput, CallableAdapter.InternalCallableAdapter, CloseableWrapper, DecoderTextInput, EncoderTextOutput, ExhaustingByteInput, ExhaustingInput, ExhaustingTextInput, GeneratingInput, InputStreamAdapter, ListenerAdapter.InternalListenerAdapter, MapperAdapter.InternalMapperAdapter, MulticastByteOutput, MulticastOutput, MulticastTextOutput, NIOServerSocket, NIOSocket, NIOSocketFactory, NIOSocketInputStream, NIOSocketOutputStream, NIOStream, NulByteInput, NulInput, NulTextInput, OutputStreamAdapter, Pipe, Pipe.InternalPipeInput, Pipe.InternalPipeOutput, Promise.InternalPromiseResolverImpl, Queue, RandomByteInput, RandomTextInput, RecordingByteOutput, RecordingOutput, RecordingTextOutput, RepeatingByteInput, RepeatingInput, RepeatingTextInput, RunnableAdapter.InternalRunnableAdapter, SavingByteInput, SavingInput, SavingTextInput, Semaphore, TextPipe, TextPipe.InternalTextPipeInput, TextPipe.InternalTextPipeOutput, TimerTaskAdapter.InternalTimerTask, TimerWrapper, TServerSocket, TSocket, TSocket.TInputStreamAdapter, TSocket.TOutputStreamAdapter, TSocketFactory, UncloseableByteInput, UncloseableInput, UncloseableTextInput, When.InternalArgumentListener, When.InternalBodyPromiseResolver, When.InternalFinallyListenerAfterFault, When.InternalFinallyListenerAfterSuccess, When.InternalResultPromiseResolver, WrappingChannel

public interface AsyncObject

Base class for all asynchronous interfaces, all operations in subinterfaces are asynchonous.

The subinterfaces might have methods of one of three kinds:

Note that subinterfaces if this interface should be never implemented directly for normal components. They are implemented by runtime and the framework makes many assumptions about implementation properties of these interfaces. These assumptions will be documented later.

There are currently three public methods of creating objects that implement subinterfaces of this interface:

AsyncUnicastServer.export()
This method creates proxy that invokes instances of AsyncUnicastServer server class.
Promise.willBe(Class)
This methods allows to create instances that will forward messages posted to it to resolution of the promise.
Receiving instance as result of request/response method that returns interface that extends this interface.
This option is actually calling Promise.willBe(Class) internally.

Also note that method names starting with "__internal_" are strongly discoraged from being used. Method from this namespace reserved for usage in custom proxy factories. Usage of underscored in interface names and server names is also strictly discoraged.


Method Summary
 void dereference(AResolver<?> l)
          adds listener for this object if it is promise reference this method exists for when constuct.
 boolean isImmediate()
           
 

Method Detail

isImmediate

boolean isImmediate()
Returns:
true if no dereferencing is required

dereference

void dereference(AResolver<?> l)
adds listener for this object if it is promise reference this method exists for when constuct.

Parameters:
l - a resolver that is notified with dereferenced value


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