rice
Class Continuation.ListenerContinuation<R,E extends Exception>

java.lang.Object
  extended by rice.Continuation.ListenerContinuation<R,E>
All Implemented Interfaces:
Continuation<R,E>
Enclosing interface:
Continuation<R,E extends Exception>

public static class Continuation.ListenerContinuation<R,E extends Exception>
extends Object
implements Continuation<R,E>

This class is a Continuation provided for simplicity which listens for any errors and ignores any success values. This Continuation is provided for testing convenience only and should *NOT* be used in production environment.


Nested Class Summary
 
Nested classes/interfaces inherited from interface rice.Continuation
Continuation.ErrorContinuation<R,E extends Exception>, Continuation.ExternalContinuation<R,E extends Exception>, Continuation.ExternalContinuationRunnable<R,E extends Exception>, Continuation.ExternalRunnable, Continuation.ListenerContinuation<R,E extends Exception>, Continuation.MultiContinuation, Continuation.NamedContinuation, Continuation.SimpleContinuation, Continuation.StandardContinuation<R,E extends Exception>
 
Field Summary
protected  Logger logger
           
protected  String name
          The name of this continuation
 
Constructor Summary
Continuation.ListenerContinuation(String name, Environment env)
          Constructor which takes in a name
 
Method Summary
 void receiveException(Exception result)
          Called when an exception occurred as a result of the previous command.
 void receiveResult(Object result)
          Called when a previously requested result is now available.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected String name
The name of this continuation


logger

protected Logger logger
Constructor Detail

Continuation.ListenerContinuation

public Continuation.ListenerContinuation(String name,
                                         Environment env)
Constructor which takes in a name

Parameters:
name - A name which uniquely identifies this continuation for debugging purposes
Method Detail

receiveResult

public void receiveResult(Object result)
Called when a previously requested result is now available. Does absolutely nothing.

Specified by:
receiveResult in interface Continuation<R,E extends Exception>
Parameters:
result - The result

receiveException

public void receiveException(Exception result)
Called when an exception occurred as a result of the previous command. Simply prints an error message to the screen.

Specified by:
receiveException in interface Continuation<R,E extends Exception>
Parameters:
result - The exception which was caused.


Copyright © 2010. All Rights Reserved.