Prism.core
Interface IArchitecture

All Superinterfaces:
IBrick
All Known Implementing Classes:
Architecture, ExtensibleArchitecture

public interface IArchitecture
extends IBrick

An architecture class in Prism needs to implement this interface.

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

Field Summary
static int INITIAL_SIZE_OF_BRICK_ARRAY
           
 
Method Summary
 void add(IBrick b)
          This method will add a brick instance to the architecture enabling it to send/recieve events from this architecture.
 IBrick getBrickByInstanceName(java.lang.String name)
           
 java.util.Vector<IBrick> getBricks()
          Returns a list of Bricks in this architecture.
 void remove(IBrick b)
          This method removes a brick from the architecture and thereby preventing it from receiving anymore messages from this architecture.
 void unweld(IPort p1, IPort p2)
          This method disconnects two ports
 void weld(IPort p1, IPort p2)
          This is a generic method for connecting two Ports.
 
Methods inherited from interface Prism.core.IBrick
add, getName, getScaffold, getStyle, handle, setName, setScaffold, start
 

Field Detail

INITIAL_SIZE_OF_BRICK_ARRAY

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

add

void add(IBrick b)
This method will add a brick instance to the architecture enabling it to send/recieve events from this architecture.

Parameters:
b - A brick object to be added to the architecture.

remove

void remove(IBrick b)
This method removes a brick from the architecture and thereby preventing it from receiving anymore messages from this architecture. If it is not found to be a part of this architecture then the method does nothing and returns.

Parameters:
b - A brick object to be removed from the architecture.

getBricks

java.util.Vector<IBrick> getBricks()
Returns a list of Bricks in this architecture.

Returns:
DyanmicArray list of Bricks

getBrickByInstanceName

IBrick getBrickByInstanceName(java.lang.String name)

weld

void weld(IPort p1,
          IPort p2)
This is a generic method for connecting two Ports. It is assumed that the two ports have already been assigned to another parent Brick (component/connector) object. Here we also enforce topological constraints by allowing or disallowing the weld.

Parameters:
p1 - First Port
p2 - second Port

unweld

void unweld(IPort p1,
            IPort p2)
This method disconnects two ports

Parameters:
p1 - First Port
p2 - Second Port