Bees v0.5.0 API

bees.core
Class ResponderCoroutine

java.lang.Object
  |
  +--bees.core.Coroutine
        |
        +--bees.core.ResponderCoroutine
Direct Known Subclasses:
AuthorizationCoroutine, BDomainCoroutine, ConnectBDomainCoroutine, CreateBDomainCoroutine, DischargeBDomainCoroutine, InheritedCapabilityCoroutine, KernelObjectCoroutine

public abstract class ResponderCoroutine
extends Coroutine

A ResponderCoroutine is a Coroutine that automatically repeats state transitions to a StateResponder specified in the Constructor.

See Also:
StateResponder

Fields inherited from class bees.core.Coroutine
DEFAULT_TIMEOUT, INVALID_ID, STATE_ANY, STATE_COMPLETE, STATE_ERROR, STATE_ERROR_CAGED, STATE_ERROR_INTERNAL, STATE_ERROR_TIMEOUT, STATE_ERROR_USER, STATE_NEWBORN, STATE_USER
 
Constructor Summary
ResponderCoroutine(StateResponder sr)
          Construct a ResponderCoroutine with the given value.
 
Method Summary
 StateResponder getResponder()
           
protected  void setState(int newState)
          Set the state of the Coroutine and notify any waiting threads.
 java.lang.String toString()
           
 
Methods inherited from class bees.core.Coroutine
cleanup, drop, finalize, getCoroutine, getID, getState, getThrowable, handle, setThrowable, waitForCompletion, waitForCompletion, waitForState, waitForState
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResponderCoroutine

public ResponderCoroutine(StateResponder sr)
Construct a ResponderCoroutine with the given value.
Parameters:
sr - The StateResponder to notify of state changes.
Method Detail

getResponder

public StateResponder getResponder()
Returns:
The StateResponder to notify of state changes.

setState

protected void setState(int newState)
Description copied from class: Coroutine
Set the state of the Coroutine and notify any waiting threads. If the new state value is less than the current state it is ignored. If the new state value is an error or STATE_COMPLETE the Coroutine is disabled.
Overrides:
setState in class Coroutine
See Also:
Coroutine.setState(int)

toString

public java.lang.String toString()
Overrides:
toString in class Coroutine
See Also:
Object.toString()

Bees v0.5.0 API

This documentation is Copyright (C) 2002 The University of Utah. All Rights Reserved. See the individual source files for distribution terms.
Documentation, software, and mailing lists for Bees v0.5.0 can be found at the Janos Project: http://www.cs.utah.edu/flux/janos/