gov.sandia.ccaffeine.dc.user_iface.MVC.event
Class AddUsesPortsEvent

java.lang.Object
  extended by java.util.EventObject
      extended by gov.sandia.ccaffeine.dc.user_iface.MVC.event.AddUsesPortsEvent
All Implemented Interfaces:
java.io.Serializable

public class AddUsesPortsEvent
extends java.util.EventObject

Used to notify components that the cca server added one or more Uses Ports to a component. A view entity might respond by rendering a box for each port. The boxes could be placed on the right side of the component.

Possible Scenario:
The end-user drags a component from the palette to the arena
The cca server instantiates a new cca component
The cca server creates Uses Ports for the new component
The cca server sends the Uses Ports to the client
The client displays the new Uses Ports are small boxes on the right side of the component

See Also:
Serialized Form

Field Summary
protected  java.util.Vector classNameAndInstanceNameOfAllPorts
          The class name and the instance name of all the ports that were added to a component.
protected  java.lang.String componentInstanceName
          The name of the component that is receiving the new ports.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
AddUsesPortsEvent(java.lang.Object source, java.lang.String componentInstanceName, java.util.Vector classNameAndInstanceNameOfAllPorts)
          Create an AddUsesPortEvent.
 
Method Summary
 java.util.Vector getClassNameAndInstanceNameOfAllPorts()
          Get the class name and the instance name of all the ports that were added to a component.
 java.lang.String getComponentInstanceName()
           
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

componentInstanceName

protected java.lang.String componentInstanceName
The name of the component that is receiving the new ports. The name is usually the java class name of the component (without the package name) concatenated with an index number. Example: "StartComponent0"


classNameAndInstanceNameOfAllPorts

protected java.util.Vector classNameAndInstanceNameOfAllPorts
The class name and the instance name of all the ports that were added to a component.

vector[0] contains the instance name of port[0]
vector[1] contains the class name of port[0]
vector[2] contains the instance name of port[1]
vector[3] contains the class name of port[1]
etc.

The class name of a port is the name of the port's java class. The port name may or may not include the package name. Examples of class names are "gov.cca.PrintService" and "StringConsumerPort."

The instance name of a port is the name of an instantiation of the cca port. aExamples of instance names are "pSvc" and "out0"

Constructor Detail

AddUsesPortsEvent

public AddUsesPortsEvent(java.lang.Object source,
                         java.lang.String componentInstanceName,
                         java.util.Vector classNameAndInstanceNameOfAllPorts)
Create an AddUsesPortEvent. The event can be used to notify components that the cca server added one or more Provides Ports to a component. A view entity might respond by rendering a box for each component. The boxes could be placed on the right side of the component.

Parameters:
source - The object that created this event.
componentInstanceName - The name of the cca component that received the newly created ports. The name is usually the java class name of the component (without the package name) concatenated with an index number. Example: "StartComponent0"
classNameAndInstanceNameOfAllPorts - the class name and the instance name of all the ports that were added to a component.
vector[0] contains the instance name of port[0]
vector[1] contains the class name of port[0]
vector[2] contains the instance name of port[1]
vector[3] contains the class name of port[1]
etc.
The class name of a port is the name of the port's java class. The class name may or may not include the package name. Examples of class names are "gov.cca.PrintService" and "StringConsumerPort."
The instance name of a port is the name of an instantiation of the cca port. Examples of instance names are "pSvc" and "out0"
Method Detail

getComponentInstanceName

public java.lang.String getComponentInstanceName()

getClassNameAndInstanceNameOfAllPorts

public java.util.Vector getClassNameAndInstanceNameOfAllPorts()
Get the class name and the instance name of all the ports that were added to a component.

vector[0] contains the instance name of port[0]
vector[1] contains the class name of port[0]
vector[2] contains the instance name of port[1]
vector[3] contains the class name of port[1]
etc.

Returns:
The class name and the instance name of all ports that were added to a cca component.
The class name of a port is the name of the port's java class. The class name may or may not include the package name. Examples of class names are "gov.cca.PrintService" and "StringConsumerPort."
The instance name of a port is the name of an instantiation of the cca port. Examples of instance names are "pSvc" and "out0"