ref_send API 2.17
defensive programming in Java

org.ref_send.promise
Interface Resolver<T>

Type Parameters:
T - promised referent type
All Superinterfaces:
Receiver<T>

public interface Resolver<T>
extends Receiver<T>

A Promise resolver.


Method Summary
 void apply(T referent)
          Resolve the corresponding promise to the given reference.
 void progress()
          Logs progress towards resolution.
 void reject(java.lang.Exception reason)
          Put the corresponding promise in the rejected state.
 void resolve(Promise<? extends T> promise)
          Resolve the corresponding promise to the given promise.
 

Method Detail

progress

void progress()
Logs progress towards resolution.


reject

void reject(java.lang.Exception reason)
Put the corresponding promise in the rejected state.

This method is syntactic sugar for:

 resolve(reject(reason));
 

Parameters:
reason - reason the corresponding promise will not be fulfilled

resolve

void resolve(Promise<? extends T> promise)
Resolve the corresponding promise to the given promise.

Parameters:
promise - promise to forward requests to

apply

void apply(T referent)
Resolve the corresponding promise to the given reference.

Specified by:
apply in interface Receiver<T>
Parameters:
referent - reference to forward requests to

ref_send API 2.17
defensive programming in Java

Submit a bug or feature, or get help

Copyright 1998-2009 Waterken Inc. under the terms of the MIT X license.