| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.asyncobjects.AsyncUnicastServer<T>
T - facet type for the objectpublic abstract class AsyncUnicastServer<T extends 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.
To support oneway method, the method should implement method that have the same method signature as is declared in the interface.
To support a request/response method, the method should have method that have the same parameter types as is declared in the interface. The return type must match return type defined in the interface.
PromisePromise.nullPromise().AsyncObject or interfaces that extend itAsyncObject.dereference(AResolver).
 Note if the method throws an exception, it fails with this exception. For a
 request-response method the returns a Promise, it the same as
 returning promise created with Promise.smashed(Throwable). For the
 method that return type that extends AsyncObject interface, result is
 the same as if the method Promise.willBe(Class) were called on the
 smashed Promise.
 
The invocation of the request/response method finishes when one of the following is true:
Promise the method finishes when
 promise is either resolved (in that case it finishes successfully)
 or smashed (in that case it fails).AsyncObject for which
 AsyncObject.isImmediate() == falseAsyncObject.dereference(AResolver) the method
 AResolver.smash(Throwable) is called (in that case it fails)
 or the method AResolver.resolve(Object) is called (in that case it
 finishes successfully) with argument of that method.
| 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 | 
|---|
protected AsyncUnicastServer()
| Method Detail | 
|---|
public final T export()
protected Vat myVat()
public final Promise<T> promise()
Promise.with(export()).public final void dereference(AResolver<?> r)
dereference in interface AsyncObjectr - a resolverAsyncObject.dereference(AResolver)public final boolean isImmediate()
isImmediate in interface AsyncObjectAsyncObject.isImmediate()| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||