Firefish 0.5.10

gov.lbl.dsd.firefish
Class Stage

java.lang.Object
  extended bygov.lbl.dsd.firefish.Stage

public class Stage
extends Object

The firefish system is architected according to the principles of the Stage Event Driven Architecture (SEDA) described in SEDA Architecture and SEDA Homepage .

Accordingly, the system is composed of several asynchronous non-blocking stages, interconnected in chains via queues holding events. A stage has an input queue into which another stage puts events. A stage has one or more threads (here: one and only one), which take events from the input queue and hand them to the stage's event handler which processes the events in a non-blocking asynchronous manner. As a result of said processing, the event handler may put new events into the queue of its own stage or other stages.

Typically (but not necessarily) a child stage responds to an event by a parent stage by putting the response to the event into the input queue of the parent stage.

Takes elements from inChannel, and uses the given executor to invoke handler.handle(element) or element.run(), depending on the type of element taken.

Version:
$Revision: 1.2 $, $Date: 2004/01/30 01:18:02 $

Constructor Summary
Stage(EventHandler handler)
           
Stage(EventHandler handler, Executor executor)
           
 
Method Summary
 void enqueue(Event ev)
           
 void enqueueInterruptable(Event ev)
           
 void shutdownAfterProcessingCurrentlyQueuedEvents()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Stage

public Stage(EventHandler handler)

Stage

public Stage(EventHandler handler,
             Executor executor)
Method Detail

enqueue

public void enqueue(Event ev)

enqueueInterruptable

public void enqueueInterruptable(Event ev)
                          throws InterruptedException
Throws:
InterruptedException

shutdownAfterProcessingCurrentlyQueuedEvents

public void shutdownAfterProcessingCurrentlyQueuedEvents()

Firefish 0.5.10

Jump to the Firefish Homepage