Prism.core
Interface IArchitecture

All Known Implementing Classes:
Architecture, ExtensibleArchitecture

public interface IArchitecture

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(Brick b)
          This method will add a brick instance to the architecture enabling it to send/recieve events from this architecture.
 Brick getBrickByInstanceName(java.lang.String name)
           
 java.util.Vector getBricks()
          Returns a list of Bricks in this architecture.
 void remove(Brick 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.
 

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(Brick 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.

getBrickByInstanceName

Brick getBrickByInstanceName(java.lang.String name)

remove

void remove(Brick 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 getBricks()
Returns a list of Bricks in this architecture.

Returns:
DyanmicArray list of Bricks

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