Class c2.framework.ConnectorThread
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class c2.framework.ConnectorThread

java.lang.Object
   |
   +----c2.framework.Brick
           |
           +----c2.framework.Connector
                   |
                   +----c2.framework.ConnectorThread

public class ConnectorThread
extends Connector
implements Runnable
A connector that runs in its own thread of control.

See the Connector class for details on connectors.

See Also:
Connector

Variable Index

 o sem
 o t

Constructor Index

 o ConnectorThread()
 o ConnectorThread(String)

Method Index

 o create(String)
 o finish()
Immediately stops the execution of the component or connector (even if it has outstanding messages to process).
 o finished()
Returns true if the component or connector is idle (ie that it is not processing any messages).
 o newMessage(Port)
This method is invoked when the brick receives a new request or notification.
 o run()
The run method is called when the thread is created.
 o start()
Start the component or connector running.

Variables

 o t
  protected Thread t
 o sem
  protected Semaphor sem

Constructors

 o ConnectorThread
  public ConnectorThread()
 o ConnectorThread
  public ConnectorThread(String _name)

Methods

 o create
  public void create(String name)
Overrides:
create in class Connector
 o newMessage
  protected void newMessage(Port p)
This method is invoked when the brick receives a new request or notification.
Overrides:
newMessage in class Connector
 o start
  public void start()
Start the component or connector running.
Overrides:
start in class Brick
 o finish
  public void finish()
Immediately stops the execution of the component or connector (even if it has outstanding messages to process).
Overrides:
finish in class Brick
 o finished
  public boolean finished()
Returns true if the component or connector is idle (ie that it is not processing any messages).
Overrides:
finished in class Brick
 o run
  public void run()
The run method is called when the thread is created. It waits (on a semaphor) for requests and notifications to arrive, and calls the appropriate handle() method to process them.

All Packages  Class Hierarchy  This Package  Previous  Next  Index