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

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

public class DisconnectEvent
extends java.util.EventObject

Used to notify components that the cca server broke a connection between a Provides Port and a Uses Port. A view entity might respond by erasing the line that was drawn between the two ports.

Possible Scenario
The screen shows a line connecting a Provides Port and a Uses Port
The end-user clicks on a connected Provides Port
The cca server removes the connection
The cca server sends a disconnect message to this client
The client responds by removing the line

See Also:
Serialized Form

Field Summary
protected  java.lang.String sourceComponentName
          The name of the component that houses the source port.
protected  java.lang.String sourcePortName
          The name of the source port.
protected  java.lang.String targetComponentName
          The name of the component that houses the target port.
protected  java.lang.String targetPortName
          This is the name of the target port.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
DisconnectEvent(java.lang.Object source, java.lang.String sourceComponentName, java.lang.String sourcePortName, java.lang.String targetComponentName, java.lang.String targetPortName)
          Create a DisconnectEvent.
 
Method Summary
 java.lang.String getSourceComponentName()
          Get the name of the component that houses the source port.
 java.lang.String getSourcePortName()
          Get the name of the source port.
 java.lang.String getTargetComponentName()
          Get the name of the component that houses the target port.
 java.lang.String getTargetPortName()
          Get the name of the target port.
 
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

sourceComponentName

protected java.lang.String sourceComponentName
The name of the component that houses the source port. The source port is no longer connected to the target port. The name is usually the java class name of the component (without the package name) concatenated with an index number. Example: "StartComponent0"


sourcePortName

protected java.lang.String sourcePortName
The name of the source port. The source port is no longer connected to the target port. Example: "out0"


targetComponentName

protected java.lang.String targetComponentName
The name of the component that houses the target port. The target port is no longer connected to the source port. The name is usually the java class name of the component (without the package name) concatenated with an index number. Example: "PrinterComponent0"


targetPortName

protected java.lang.String targetPortName
This is the name of the target port. The target port is one of the two ports that are no longer connected. Example: "printer_port"

Constructor Detail

DisconnectEvent

public DisconnectEvent(java.lang.Object source,
                       java.lang.String sourceComponentName,
                       java.lang.String sourcePortName,
                       java.lang.String targetComponentName,
                       java.lang.String targetPortName)
Create a DisconnectEvent. This event can be used to notify components that the cca server broke a connection between a Provides Port and a Uses Port. A view entity might respond by erasing the line that was drawn between the two ports.

Parameters:
source - The entity that created this event.
sourceComponentName - The name of the component that houses the source port. The name is usually the java class name of the component (without the package name) concatenated with an index number. Example: "StartComponent0"
sourcePortName - The name of the source port. Example: "out0"
targetComponentName - The name of the component that houses the target port. The name is usually the java class name of the component (without the package name) concatenated with an index number. Example: "PrinterComponent0"
targetPortName - the name of the target port. Example: "out0"
Method Detail

getSourceComponentName

public java.lang.String getSourceComponentName()
Get the name of the component that houses the source port. The source port is no longer connected to the target port. The name is usually the java class name of the component (without the package name) concatenated with an index number. Example: "StartComponent0"

Returns:
The name of the component that houses the source port.

getSourcePortName

public java.lang.String getSourcePortName()
Get the name of the source port. The source port is no longer connected to the target port. Example: "out0"

Returns:
the name of the source port

getTargetComponentName

public java.lang.String getTargetComponentName()
Get the name of the component that houses the target port. The target port is no longer connected to the source port. The name is usually the java class name of the component (without the package name) concatenated with an index number. Example: "Printer0"

Returns:
The name of the component that houses the target port.

getTargetPortName

public java.lang.String getTargetPortName()
Get the name of the target port. The target port is one of the two ports that are no longer connected. Example: "out0"

Returns:
the name of the source port