Prism.core
Interface IComponent

All Superinterfaces:
IBrick
All Known Implementing Classes:
Component, ExtensibleComponent, HelloWorldClient, HelloWorldServer

public interface IComponent
extends IBrick

This interface needs to be implemented by any Prism component.

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

Field Summary
static int CONNS_PER_COMPONENT
           
 
Method Summary
 void addPort(IPort b)
          Adds a port.
 java.util.Vector<IPort> getPorts()
          This method returns a list of all available ports.
 void handle(Event e)
          Handling of Event.
 void removePort(IPort b)
          Removes a port.
 void send(Event e)
          This method sends the event up/down the Prism architecture that this component is a part of.
 
Methods inherited from interface Prism.core.IBrick
add, getName, getScaffold, getStyle, setName, setScaffold, start
 

Field Detail

CONNS_PER_COMPONENT

static final int CONNS_PER_COMPONENT
See Also:
Constant Field Values
Method Detail

send

void send(Event e)
This method sends the event up/down the Prism architecture that this component is a part of.

Parameters:
e - a Event to be sent to the Brick above/below.

handle

void handle(Event e)
Handling of Event. This is application specific code and should be implemented by subclasses of this class.

Specified by:
handle in interface IBrick
Parameters:
e - Event to be handled

addPort

void addPort(IPort b)
Adds a port.

Parameters:
port - Port to be added.

removePort

void removePort(IPort b)
Removes a port.

Parameters:
port - Port to be removed.

getPorts

java.util.Vector<IPort> getPorts()
This method returns a list of all available ports.

Returns:
Vector List of available ports