Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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

    java.lang.Object
      rice.Continuation.ListenerContinuation<R,E>

All Implemented Interfaces:
  Continuation<R,E>

Enclosing interface:
  Continuation<R,E extends java.lang.Exception>

    public static class Continuation.ListenerContinuation<R,E extends java.lang.Exception>

extends java.lang.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 java.lang.Exception>, Continuation.ExternalContinuation<R,E extends java.lang.Exception>, Continuation.ExternalContinuationRunnable<R,E extends java.lang.Exception>, Continuation.ExternalRunnable, Continuation.ListenerContinuation<R,E extends java.lang.Exception>, Continuation.MultiContinuation, Continuation.NamedContinuation, Continuation.SimpleContinuation, Continuation.StandardContinuation<R,E extends java.lang.Exception>`

Field Summary
`protected Logger` | `logger`
`protected java.lang.String` | `name` The name of this continuation

Constructor Summary
`Continuation.ListenerContinuation(java.lang.String name, Environment env)` Constructor which takes in a name

Method Summary
`void` | `receiveException(java.lang.Exception result)` Called when an exception occurred as a result of the previous command.
`void` | `receiveResult(java.lang.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 java.lang.String name

  The name of this continuation

### logger

    protected Logger logger

Constructor Detail

### Continuation.ListenerContinuation

    public Continuation.ListenerContinuation(java.lang.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(java.lang.Object result)

  Called when a previously requested result is now available. Does absolutely nothing.

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

### receiveException

    public void receiveException(java.lang.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 java.lang.Exception>`
  Parameters:
    `result` - The exception which was caused.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2005 - Rice Pastry.