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.ExternalContinuation

    java.lang.Object
      rice.Continuation.ExternalContinuation

All Implemented Interfaces:
  Continuation

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

    public static class Continuation.ExternalContinuation

extends java.lang.Object
implements Continuation

This class provides a continuation which is designed to be used from an external thread. Applications should construct this continuation pass it in to the appropriate method, and then call sleep(). Once the thread is woken up, the user should check exceptionThrown() to determine if an error was caused, and then call getException() or getResult() as apprpritate.

Nested Class Summary

Nested classes/interfaces inherited from interface rice.Continuation
`Continuation.ErrorContinuation, Continuation.ExternalContinuation, Continuation.ExternalContinuationRunnable, Continuation.ExternalRunnable, Continuation.ListenerContinuation, Continuation.MultiContinuation, Continuation.NamedContinuation, Continuation.SimpleContinuation, Continuation.StandardContinuation`

Field Summary
`protected boolean` | `done`
`protected java.lang.Exception` | `exception`
`protected java.lang.Object` | `result`

Constructor Summary
`Continuation.ExternalContinuation()`

Method Summary
`boolean` | `exceptionThrown()`
`java.lang.Exception` | `getException()`
`java.lang.Object` | `getResult()`
`void` | `receiveException(java.lang.Exception e)` Called when an execption occured as a result of the previous command.
`void` | `receiveResult(java.lang.Object o)` Called when a previously requested result is now availble.
`void` | `sleep()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### exception

    protected java.lang.Exception exception

### result

    protected java.lang.Object result

### done

    protected boolean done

Constructor Detail

### Continuation.ExternalContinuation

    public Continuation.ExternalContinuation()

Method Detail

### receiveResult

    public void receiveResult(java.lang.Object o)

  Description copied from interface: `Continuation`
  Called when a previously requested result is now availble.

  Specified by:
    `receiveResult` in interface `Continuation`
  Parameters:
    `o` - The result of the command.

### receiveException

    public void receiveException(java.lang.Exception e)

  Description copied from interface: `Continuation`
  Called when an execption occured as a result of the previous command.

  Specified by:
    `receiveException` in interface `Continuation`

### getResult

    public java.lang.Object getResult()

### getException

    public java.lang.Exception getException()

### sleep

    public void sleep()

### exceptionThrown

    public boolean exceptionThrown()

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.