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

Class c2.framework.Architecture

java.lang.Object
   |
   +----c2.framework.Brick
           |
           +----c2.framework.Component
                   |
                   +----c2.framework.Architecture

public class Architecture
extends Component
A C2 architecture is a network of components hooked together by connectors. Components and connectors may be added to an architecture, removed from it, welded together, and detached from each other.

Hierarchical architectures are supported by allowing an entire architecture to act as a single component in a new, bigger architecture.

NOTE: This class should not be used directly. Use either SimpleArchitecture or one of its derived classes.

See Also:
Component, Connector, SimpleArchitecture

Variable Index

 o components
Components in the architecture.
 o connectors
Connectors in the architecture.

Constructor Index

 o Architecture()
 o Architecture(String, Class)

Method Index

 o addComponent(Component)
Adds a component to the architecture.
 o addConnector(Connector)
Adds a connector to the architecture.
 o Components()
Accesses the components in the architecture.
 o Connectors()
Accesses the connectors in the architecture.
 o create(String, Class)
Creates and initializes an instance of the Architecture.
 o detachBottom(Component)
Detaches the bottom side of a component from the connector, if any, to which it was previously welded.
 o detachBottom(Connector)
Detaches the bottom side of a connector from all components and connectors to which it was previously welded.
 o detachComponent(Component)
Detaches both the top and bottom sides of a component from connectors, if any, to which it was previously welded.
 o detachConnector(Connector)
Detaches both the top and bottom sides of a connector from all components and connectors to which it was previously welded.
 o detachTop(Component)
Detaches the top side of a component from the connector, if any, to which it was previously welded.
 o detachTop(Connector)
Detaches the top side of a connector from all components and connectors to which it was previously welded.
 o finish()
Finishes architecture's execution by calling the finish() method on all of its components and connectors.
 o finished()
Tests whether all components and connectors in an architecure have finished executing.
 o removeComponent(Component)
Removes a component from the architecture.
 o removeConnector(Connector)
Removes a connector from the architecture.
 o start()
Starts up architecture's execution by calling the start() method on all of its components and connectors.
 o toString()
Displays the architecture (components, connectors, and their interconnections) textually.
 o unweld(Component, Connector)
Detaches a component from the connector below.
 o unweld(Connector, Component)
Detaches a component from the connector above.
 o unweld(Connector, Connector)
Detaches all links between two connectors.
 o unweld(Connector, Vector)
Detaches multiple components and/or connectors from the connector above.
 o unweld(Vector, Connector)
Detaches multiple components and/or connectors from the connector below.
 o weld(Component, Connector)
Welds a component on top of a connector.
 o weld(Connector, Component)
Welds a component under a connector.
 o weld(Connector, Connector)
Welds two connectors together, from the bottom of one to the top of the other.
 o weld(Connector, Vector)
Welds multiple components and/or connectors below a connector.
 o weld(Vector, Connector)
Welds multiple components and/or connectors to the top of a connector.

Variables

 o components
  protected Vector components
Components in the architecture.
 o connectors
  protected Vector connectors
Connectors in the architecture.

Constructors

 o Architecture
  public Architecture()
 o Architecture
  public Architecture(String name,
                      Class portClass)

Methods

 o create
  public void create(String name,
                     Class portClass)
Creates and initializes an instance of the Architecture.
Parameters:
name - Name of the architecture.
portClass - The type of communication ports used in the architecture.
Overrides:
create in class Component
See Also:
Port, FIFOPort
 o Components
  public Vector Components()
Accesses the components in the architecture.
Returns:
The components in the architecture.
 o Connectors
  public Vector Connectors()
Accesses the connectors in the architecture.
Returns:
The connectors in the architecture.
 o start
  public void start()
Starts up architecture's execution by calling the start() method on all of its components and connectors.
Overrides:
start in class Brick
 o finish
  public void finish()
Finishes architecture's execution by calling the finish() method on all of its components and connectors.
Overrides:
finish in class Brick
 o finished
  public boolean finished()
Tests whether all components and connectors in an architecure have finished executing.
Returns:
true if no components or connectors are executing any longer.
Overrides:
finished in class Brick
 o addComponent
  public void addComponent(Component c)
Adds a component to the architecture.
Parameters:
c - Component to be added.
 o addConnector
  public void addConnector(Connector c)
Adds a connector to the architecture.
Parameters:
c - Connector to be added.
 o removeComponent
  public void removeComponent(Component c)
Removes a component from the architecture.
Parameters:
c - Component to be removed.
 o removeConnector
  public void removeConnector(Connector c)
Removes a connector from the architecture.
Parameters:
c - Connector to be removed.
 o weld
  public void weld(Component comp,
                   Connector conn)
Welds a component on top of a connector.
Parameters:
comp - C2 component.
conn - C2 connector.
 o unweld
  public void unweld(Component comp,
                     Connector conn)
Detaches a component from the connector below.
Parameters:
comp - C2 component.
conn - C2 connector.
 o weld
  public void weld(Connector conn,
                   Component comp)
Welds a component under a connector.
Parameters:
comp - C2 component.
conn - C2 connector.
 o unweld
  public void unweld(Connector conn,
                     Component comp)
Detaches a component from the connector above.
Parameters:
comp - C2 component.
conn - C2 connector.
 o weld
  public void weld(Connector conn1,
                   Connector conn2)
Welds two connectors together, from the bottom of one to the top of the other.
Parameters:
conn1 - Top C2 connector.
conn2 - Bottom C2 connector.
 o unweld
  public void unweld(Connector conn1,
                     Connector conn2)
Detaches all links between two connectors.
Parameters:
conn1 - Top C2 connector.
conn2 - Bottom C2 connector.
 o weld
  public void weld(Vector brick_set,
                   Connector conn)
Welds multiple components and/or connectors to the top of a connector.
Parameters:
brick_set - Set of C2 components and/or connectors.
conn - C2 connector.
 o unweld
  public void unweld(Vector brick_set,
                     Connector conn)
Detaches multiple components and/or connectors from the connector below.
Parameters:
brick_set - Set of C2 components and/or connectors.
conn - C2 connector.
 o weld
  public void weld(Connector conn,
                   Vector brick_set)
Welds multiple components and/or connectors below a connector.
Parameters:
conn - C2 connector.
brick_set - Set of C2 components and/or connectors.
 o unweld
  public void unweld(Connector conn,
                     Vector brick_set)
Detaches multiple components and/or connectors from the connector above.
Parameters:
conn - C2 connector.
brick_set - Set of C2 components and/or connectors.
 o detachTop
  public void detachTop(Component comp)
Detaches the top side of a component from the connector, if any, to which it was previously welded.
Parameters:
comp - C2 component.
 o detachBottom
  public void detachBottom(Component comp)
Detaches the bottom side of a component from the connector, if any, to which it was previously welded.
Parameters:
comp - C2 component.
 o detachComponent
  public void detachComponent(Component comp)
Detaches both the top and bottom sides of a component from connectors, if any, to which it was previously welded.
Parameters:
comp - C2 component.
 o detachTop
  public void detachTop(Connector conn)
Detaches the top side of a connector from all components and connectors to which it was previously welded.
Parameters:
conn - C2 connector.
 o detachBottom
  public void detachBottom(Connector conn)
Detaches the bottom side of a connector from all components and connectors to which it was previously welded.
Parameters:
conn - C2 connector.
 o detachConnector
  public void detachConnector(Connector conn)
Detaches both the top and bottom sides of a connector from all components and connectors to which it was previously welded.
Parameters:
conn - C2 connector.
 o toString
  public String toString()
Displays the architecture (components, connectors, and their interconnections) textually.
Overrides:
toString in class Component

All Packages  Class Hierarchy  This Package  Previous  Next  Index