Prism.core
Class Brick

java.lang.Object
  extended by Prism.core.Brick
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Architecture, Component, Connector, Port

public abstract class Brick
extends java.lang.Object
implements java.io.Serializable

Brick is the abstract building block for architectures. It is never used directly, but instantiated as either a component, connector, or port. This class does not have a behavior of its own, but depends on sub classes to handle messages.

Version:
2.0
Author:
USC Soft. Arch. Group. Contact: Sam Malek malek@usc.edu
See Also:
Serialized Form

Field Summary
 java.lang.String name
           
 AbstractScaffold scaffold
           
 
Constructor Summary
Brick(java.lang.String bName)
          A simple constructor to store the brick name.
 
Method Summary
 void add(Event event)
          Add a message to the scaffold which results in a message getting added to the scaffold's queue.
 int getStyle()
           
abstract  void handle(Event e)
          This abstract method needs to be overriden by any object that extends Brick.
 void start()
          By default a brick does not do anything.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

scaffold

public transient AbstractScaffold scaffold

name

public java.lang.String name
Constructor Detail

Brick

public Brick(java.lang.String bName)
A simple constructor to store the brick name.

Parameters:
bName - Name of the brick
Method Detail

getStyle

public int getStyle()

start

public void start()
By default a brick does not do anything. The start method is called to activate this brick


add

public void add(Event event)
Add a message to the scaffold which results in a message getting added to the scaffold's queue.

Parameters:
event - Event object to be added

handle

public abstract void handle(Event e)
This abstract method needs to be overriden by any object that extends Brick. The subclassing object shall provide the desired implementation to handle an Event.

Parameters:
e - Event object to be handled