net.sf.asyncobjects
Class AsyncUnicastServer<T extends AsyncObject>

java.lang.Object
  extended by net.sf.asyncobjects.AsyncUnicastServer<T>
Type Parameters:
T - facet type for the object
All Implemented Interfaces:
AsyncObject, ExplicitSharing
Direct Known Subclasses:
BufferedInput, BufferedOutput, CallableAdapter.InternalCallableAdapter, CloseableWrapper, GeneratingInput, InputStreamAdapter, ListenerAdapter.InternalListenerAdapter, MapperAdapter.InternalMapperAdapter, MulticastOutput, NIOServerSocket, NIOSocket, NIOSocketFactory, NIOStream, NulInput, OutputStreamAdapter, Pipe, Pipe.InternalPipeInput, Pipe.InternalPipeOutput, Promise.InternalPromiseResolverImpl, Queue, RecordingOutput, RunnableAdapter.InternalRunnableAdapter, Semaphore, TimerTaskAdapter.InternalTimerTask, TimerWrapper, TServerSocket, TSocket, TSocketFactory, When.InternalArgumentListener, When.InternalBodyPromiseResolver, When.InternalFinallyListenerAfterFault, When.InternalFinallyListenerAfterSuccess, When.InternalResultPromiseResolver, WrappingChannel

public abstract class AsyncUnicastServer<T extends AsyncObject>
extends Object
implements ExplicitSharing, AsyncObject

Unicast server implementation. This is a base class for all servers. The class must support all methods that are declared in the asynchronous interfaces implemented by the this object.

The invocation of the request/response method finishes when one of the following is true:


Constructor Summary
protected AsyncUnicastServer()
          A constructor
 
Method Summary
 void dereference(AResolver<?> r)
          Implementation of dereference method.
 T export()
           
 boolean isImmediate()
           
protected  Vat myVat()
           
 Promise<T> promise()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsyncUnicastServer

protected AsyncUnicastServer()
A constructor

Method Detail

export

public final T export()
Returns:
proxy object that enqueues events for this object

myVat

protected Vat myVat()
Returns:
the vat to which events from this object are dispatched.

promise

public final Promise<T> promise()
Returns:
a promise for exported reference. It is identical to Promise.with(export()).

dereference

public final void dereference(AResolver<?> r)
Implementation of dereference method.

Specified by:
dereference in interface AsyncObject
Parameters:
r - a resolver
See Also:
AsyncObject.dereference(AResolver)

isImmediate

public final boolean isImmediate()
Specified by:
isImmediate in interface AsyncObject
Returns:
true if no dereferencing is required
See Also:
AsyncObject.isImmediate()


Copyright 2002-2007 Constantine Plotnikov. All Rights Reserved.