Prism.framework
Class ComponentThread

java.lang.Object
  |
  +--Prism.framework.Brick
        |
        +--Prism.framework.Component
              |
              +--Prism.framework.ComponentThread
All Implemented Interfaces:
ArchitectureEventConstants, IComponent, java.lang.Runnable, ScaffoldConstants

public abstract class ComponentThread
extends Component
implements java.lang.Runnable

A ComponentThread is used when an active component is required to operate even when it is not processing messages. In order for this component to be able to handle messages, it should yield execution periodically.

Version:
0.1
Author:
Nikunj Mehta

Fields inherited from class Prism.framework.Brick
bottomId, myId, name, scaffold, sideId, topId
 
Fields inherited from interface Prism.framework.ArchitectureEventConstants
NOTIF_BEING_HDLD, NOTIF_HDLD, NOTIF_RECD, NOTIF_SENT, PEER_BEING_HDLD, PEER_HDLD, PEER_RECD, PEER_SENT, REQ_BEING_HDLD, REQ_HDLD, REQ_RECD, REQ_SENT
 
Fields inherited from interface Prism.framework.ScaffoldConstants
DISPATCH, MONITOR, SCHEDULER
 
Constructor Summary
ComponentThread()
          Create a ComponentThread without a name
ComponentThread(java.lang.String name)
          Create a ComponentThread with a specified name
 
Method Summary
abstract  void run()
          Run this method all the time when started.
 
Methods inherited from class Prism.framework.Component
getBottom, getSide, getTop, handle, handle, handle, handle, hasBottom, hasSide, hasTop, send, send, send, setBottom, setBottomFree, setSide, setSideFree, setTop, setTopFree, toString
 
Methods inherited from class Prism.framework.Brick
add, fireEvent, getBottomId, getSideId, getTopId, setBottomId, setName, setNameAfterTheFact, setScaffold, setSideId, setTopId, start
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ComponentThread

public ComponentThread()
Create a ComponentThread without a name

ComponentThread

public ComponentThread(java.lang.String name)
Create a ComponentThread with a specified name
Parameters:
name - String name of the ComponentThread
Method Detail

run

public abstract void run()
Run this method all the time when started. Here it does nothing and a subclass has to provide a definition
Specified by:
run in interface java.lang.Runnable