gov.sandia.ccaffeine.dc.user_iface
Class AccessServer

java.lang.Object
  extended by gov.sandia.ccaffeine.dc.user_iface.AccessServer

public class AccessServer
extends java.lang.Object

This class allows the client to send querries and commands to the cca server.


Constructor Summary
AccessServer()
           
 
Method Summary
 void addGuiListener(GuiListener listener)
           
 void broadcastConnect(ConnectEvent event)
          The client wants the cca server to connect two ports.
 void broadcastConnect(java.lang.String sourceComponentName, java.lang.String sourcePort, java.lang.String targetComponentName, java.lang.String targetPort)
          The client wants the cca server to connect two ports.
 void broadcastDisconnect(DisconnectEvent event)
          The client wants the cca server to break the connection that exists between two ports.
 void broadcastDisconnect(java.lang.String sourceComponentName, java.lang.String sourcePort, java.lang.String targetComponentName, java.lang.String targetPort)
          The client wants the cca server to break the connection that exists between two ports.
 void broadcastDisplayComponent(DisplayComponentEvent event)
          The client wants the cca server to retrieve information on a specific component.
 void broadcastDisplayComponent(java.lang.String componentInstanceName)
          The client wants the cca server to retrieve information on a specific component.
 void broadcastDisplayPalette()
          The client wants the cca server to retrieve information on every component that is inside the palette.
 void broadcastDisplayPalette(DisplayPaletteEvent event)
          The client wants the cca server to retrieve information on every component that is inside the palette.
 void broadcastDisplayState()
          The client wants the cca server to retrieve information on every component and every connection that is in the arena.
 void broadcastDisplayState(DisplayStateEvent event)
          The client wants the cca server to retrieve information on every component and every connection that is in the arena.
 void broadcastExit()
          The client wants to tell the cca server that it is shutting down.
 void broadcastExit(ExitEvent event)
          The client wants to tell the cca server that it is shutting down.
 void broadcastGetAllInstancesInArena()
          The client wants the cca server to retrieve information on all components that are inside the arena.
 void broadcastGetAllInstancesInArena(GetInstancesEvent event)
          The client wants the cca server to retrieve information on all components that are inside the arena.
 void broadcastGetComponentProperty(GetComponentPropertyEvent event)
          The client wants the cca server to retrieve the value of a specific property that is contained inside a specific component.
 void broadcastGetComponentProperty(java.lang.String componentInstanceName, java.lang.String propertyName)
          The client wants the cca server to retrieve the value of a specific property that is contained inside a specific component.
 void broadcastGetPortParameter(ParamGetCurrentEvent event)
          The client wants the cca server to retrieve the value of one of the parameters that are inside a port.
 void broadcastGetPortParameter(java.lang.String componentInstanceName, java.lang.String portInstanceName, java.lang.String dataFieldName)
          The client wants the cca server to retrieve the value of one of the parameters that are inside a port.
 void broadcastGo()
          The client wants the cca server to lanuch the applicaton.
 void broadcastGo(GoEvent event)
          The client wants the cca server to lanuch the applicaton.
 void broadcastGoComponentPort(GoComponentPortEvent event)
          The client wants the cca server to launch by application by invoking the "go" command on a specific port that is inside a specific component.
 void broadcastGoComponentPort(java.lang.String componentInstanceName, java.lang.String portInstanceName)
          The client wants the cca server to launch by application by invoking the "go" command on a specific port that is inside a specific component.
 void broadcastHeartbeat()
          The client wants to send a heartbeat to the cca server.
 void broadcastHeartbeat(HeartbeatEvent event)
          The client wants to send a heartbeat to the cca server.
 void broadcastInstantiate(InstantiateEvent event)
          The client wants the cca server to instantatiate a component.
 void broadcastInstantiate(java.lang.String className, java.lang.String instanceName)
          The client wants the cca server to instantatiate a component.
 void broadcastLinks()
          The client wants the cca server to retrieve information on every connection that is inside the arena.
 void broadcastLinks(DisplayChainEvent event)
          The client wants the cca server to retrieve information on every connection that is inside the arena.
 void broadcastMessage(java.lang.String message)
          The client wants to send a message to the cca server.
 void broadcastMessage(StringEvent event)
          The client wants to send a message to the cca server.
 void broadcastNukeAll()
          The client wants the cca server to destroy all of the instantiated components (i.e.
 void broadcastNukeAll(NukeAllEvent event)
          The client wants the cca server to destroy all of the instantiated components (i.e.
 void broadcastPath(PathEvent event)
          The client wants either to tell the cca server the name of the folder that contains cca component or to ask the cca server to retrieve the name of the folder.
 void broadcastPathAppendDir(java.lang.String dirname)
          The client wants the cca server to add a directory to the component path.
 void broadcastRemove(java.lang.String componentInstanceName)
          The client wants the cca server to remove an instantiation of a cca component.
protected  void broadcastRemoveEvent(RemoveEvent event)
          The client wants the cca server to remove an instantiation of a cca component.
protected  void broadcastRepository(RepositoryEvent event)
          The client wants either to tell the cca server something about hte repository.
 void broadcastRepositoryGetGlobal(java.lang.String componentname)
          The client wants the cca server to add a component to the pallette.
 void broadcastSetComponentProperty(SetComponentPropertyEvent event)
          The client wants the cca server to set the value of a specific property that is contained inside a specific component.
 void broadcastSetComponentProperty(java.lang.String componentInstanceName, java.lang.String propertyName, java.lang.String propertyValue)
          The client wants the cca server to set the value of a specific property that is contained inside a specific component.
 void broadcastSetDebug()
          The client wants the cca server to print debugging statements.
 void broadcastSetDebug(SetDebugEvent event)
          The client wants the cca server to print debugging statements.
 void broadcastSetNoDebug()
          The client wants the cca server to stop printing debugging statements.
 void broadcastSetNoDebug(SetDebugEvent event)
          The client wants the cca server to stop printing debugging statements.
 void broadcastSetPortParameter(ParamCurrentEvent event)
          The client wants the cca server to set the value of one of the parameters that are inside a port.
 void broadcastSetPortParameter(java.lang.String componentInstanceName, java.lang.String portInstanceName, java.lang.String dataFieldName, java.lang.String dataFieldValue)
          The client wants the cca server to set the value of one of the parameters that are inside a port.
 void removeGuiListener(GuiListener listener)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccessServer

public AccessServer()
Method Detail

addGuiListener

public void addGuiListener(GuiListener listener)

removeGuiListener

public void removeGuiListener(GuiListener listener)

broadcastRemove

public void broadcastRemove(java.lang.String componentInstanceName)
The client wants the cca server to remove an instantiation of a cca component. The client's view will respond by sending a "remove" command to the cca server.

Parameters:
componentInstanceName - The name of the component that was removed. The name is usually the java class name of the component (without the package name) concatenated with an index number. Example: "StartComponent0"

broadcastRemoveEvent

protected void broadcastRemoveEvent(RemoveEvent event)
The client wants the cca server to remove an instantiation of a cca component. The client's view will respond by sending a "remove" command to the cca server.

Parameters:
event - The event that is generated whenever the GUI is requesting that a component be removed.

broadcastGo

public void broadcastGo()
The client wants the cca server to lanuch the applicaton. The client's view will send a "run" command to the cca server.


broadcastGo

public void broadcastGo(GoEvent event)
The client wants the cca server to lanuch the applicaton. The client's view will respond by sending a "run" command to the cca server.

Parameters:
The - event that is generated whenever the GUI is requesting that the application be launched.

broadcastPathAppendDir

public void broadcastPathAppendDir(java.lang.String dirname)
The client wants the cca server to add a directory to the component path. The client's view will respond by sending a "path append" command to the cca server.

Parameters:
dirname - Full path to append.

broadcastRepositoryGetGlobal

public void broadcastRepositoryGetGlobal(java.lang.String componentname)
The client wants the cca server to add a component to the pallette. The client's view will respond by sending a "repository get-global" command to the cca server.

Parameters:
componentname - Full babel-style class name (or palette alias if known).

broadcastInstantiate

public void broadcastInstantiate(java.lang.String className,
                                 java.lang.String instanceName)
The client wants the cca server to instantatiate a component. The client's view will respond by sending a "pull down" command to the cca server.

Parameters:
className - The name of the component's class. The name is actually the name of the component's java class. EXAMPLE: "gov.sandia.ccaffeine.dc.component.PrinterComponent"
instanceName - The name of the cca component object. The instance name is usually the name of the component's java class (without the package name) concatenated with an index number. EXAMPLE: "StarterComponent0"

broadcastInstantiate

public void broadcastInstantiate(InstantiateEvent event)
The client wants the cca server to instantatiate a component. The client's view will respond by sending a "pull down" command to the cca server.

Parameters:
The - event that is generated whenever the GUI is requesting that a component be instantiated.

broadcastConnect

public void broadcastConnect(java.lang.String sourceComponentName,
                             java.lang.String sourcePort,
                             java.lang.String targetComponentName,
                             java.lang.String targetPort)
The client wants the cca server to connect two ports. The two ports may be on different components or may be on the same component. The client's view will respond by sending a "connect" command to the cca server.

Parameters:
sourceComponentName - The name of the component that houses the source port. The "source" is the entity that is requesting the connection. The "source" is to be connected to the "target." 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. The "source" is the entity that is requesting the connection. The "source" is to be connected to the "target." Example: "out0"
targetComponentName - The name of the component that houses the target port. The "target" is the entity that receives the connection request. The "source" is to be connected to the "target." 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. The "target" is the entity that receives the connection request. The "source" is to be connected to the "target." Example: "out0"

broadcastConnect

public void broadcastConnect(ConnectEvent event)
The client wants the cca server to connect two ports. The two ports may be on different components or may be on the same component. The client's view will respond by sending a "connect" command to the cca server.

Parameters:
The - event that is generated whenever the GUI wants to connect a ProvidesPort to a UsesPort.

broadcastDisconnect

public void broadcastDisconnect(java.lang.String sourceComponentName,
                                java.lang.String sourcePort,
                                java.lang.String targetComponentName,
                                java.lang.String targetPort)
The client wants the cca server to break the connection that exists between two ports. The client's view will respond by sending a "disconnect" command to the cca server.

Parameters:
sourceComponentName - The name of the component that houses the source port. The "source" is the entity that originally requested the connection. The "source" is connected to the "target." 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. The "source" is the entity that originally requested the connection. The "source" is connected to the "target." Example: "out0"
targetComponentName - The name of the component that houses the target port. The "target" is the entity that originally received the connection request. The "source" is to be connected to the "target." 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. The "target" is the entity that originally received the connection request. The "source" is connected to the "target." Example: "out0"

broadcastDisconnect

public void broadcastDisconnect(DisconnectEvent event)
The client wants the cca server to break the connection that exists between two ports. The client's view will respond by sending a "disconnect" command to the cca server.

Parameters:
The - event that is generated whenever the GUI wants to disconnect the connection between a ProvidesPort and a UsesPort.

broadcastGetAllInstancesInArena

public void broadcastGetAllInstancesInArena()
The client wants the cca server to retrieve information on all components that are inside the arena. The client's view will respond by sending an "instances" command to the cca server.


broadcastGetAllInstancesInArena

public void broadcastGetAllInstancesInArena(GetInstancesEvent event)
The client wants the cca server to retrieve information on all components that are inside the arena. The client's view will respond by sending an "instances" command to the cca server.

Parameters:
event - The event that is generated whenever the GUI wants to get information on all of the instantiated components.

broadcastSetPortParameter

public void broadcastSetPortParameter(java.lang.String componentInstanceName,
                                      java.lang.String portInstanceName,
                                      java.lang.String dataFieldName,
                                      java.lang.String dataFieldValue)
The client wants the cca server to set the value of one of the parameters that are inside a port. A client's view will respond by sending a "port-properties" command to the cca server.

Parameters:
componentInstanceName - The name of the cca component that contains the port. The name is usually the java class name of the component (without the package name) concatenated with an index number. Example: "TimeStamper0"
portInstanceName - The name of a port that contains the parameter. Example: "configure_port"
dataFieldName - The name of the parameter.

broadcastSetPortParameter

public void broadcastSetPortParameter(ParamCurrentEvent event)
The client wants the cca server to set the value of one of the parameters that are inside a port. A client's view will respond by sending a "port-properties" command to the cca server.

Parameters:
The - event that is generated whenever the GUI wants to set the value of a port parameter.

broadcastGetPortParameter

public void broadcastGetPortParameter(java.lang.String componentInstanceName,
                                      java.lang.String portInstanceName,
                                      java.lang.String dataFieldName)
The client wants the cca server to retrieve the value of one of the parameters that are inside a port. A client's view will respond by sending a "configure" or a "parameters" command to the cca server.

Parameters:
componentInstanceName - The name of the cca component that contains the port. The name is usually the java class name of the component (without the package name) concatenated with an index number. Example: "TimeStamper0"
portInstanceName - The name of a port that contains the parameter. Example: "configure_port"
dataFieldName - The name of the parameter.

broadcastGetPortParameter

public void broadcastGetPortParameter(ParamGetCurrentEvent event)
The client wants the cca server to retrieve the value of one of the parameters that are inside a port. A client's view will respond by sending a "configure" or a "parameters" command to the cca server.

Parameters:
event - The event that is created when the GUI wants to get the value of a parameter.

broadcastSetDebug

public void broadcastSetDebug()
The client wants the cca server to print debugging statements. A client's view will respond by sending a "debug" or "noisy" command to the cca server.


broadcastSetDebug

public void broadcastSetDebug(SetDebugEvent event)
The client wants the cca server to print debugging statements. A client's view will respond by sending a "debug" or "noisy" command to the cca server.


broadcastSetNoDebug

public void broadcastSetNoDebug()
The client wants the cca server to stop printing debugging statements. A client's view will respond by sending a "nodebug" or "quiet" command to the cca server.


broadcastSetNoDebug

public void broadcastSetNoDebug(SetDebugEvent event)
The client wants the cca server to stop printing debugging statements. A client's view will respond by sending a "nodebug" or "quiet" command to the cca server.


broadcastDisplayPalette

public void broadcastDisplayPalette()
The client wants the cca server to retrieve information on every component that is inside the palette. A client's view will respond by sending a "display palette" command to the cca server.


broadcastDisplayPalette

public void broadcastDisplayPalette(DisplayPaletteEvent event)
The client wants the cca server to retrieve information on every component that is inside the palette. A client's view will respond by sending a "display palette" command to the cca server.

Parameters:
event - The event that is generated whenever the GUI wants to know what components are in the palette.

broadcastLinks

public void broadcastLinks()
The client wants the cca server to retrieve information on every connection that is inside the arena. A connection connects a "uses" port with a "provides" port. A client's view will respond by sending a "links" command to the cca server.


broadcastLinks

public void broadcastLinks(DisplayChainEvent event)
The client wants the cca server to retrieve information on every connection that is inside the arena. A connection connects a "uses" port with a "provides" port. A client's view will respond by sending a "links" command to the cca server.

Parameters:
event - The event that is created whenever the GUI wants to know what connections are in the arena.

broadcastDisplayComponent

public void broadcastDisplayComponent(java.lang.String componentInstanceName)
The client wants the cca server to retrieve information on a specific component. A client's view will respond by sending a "display component" command to the cca server.

Parameters:
componentInstanceName - The name of the cca component object. The instance name is usually the name of the component's java class (without the package name) concatenated with an index number. EXAMPLE: "StarterComponent0"

broadcastDisplayComponent

public void broadcastDisplayComponent(DisplayComponentEvent event)
The client wants the cca server to retrieve information on a specific component. A client's view will respond by sending a "display component" command to the cca server.

Parameters:
event - The event that is created whenever the GUI wants some information on a cca component.

broadcastDisplayState

public void broadcastDisplayState()
The client wants the cca server to retrieve information on every component and every connection that is in the arena. A connection connects a "uses" port with a "provides" port. A client's view will respond by sending a "display state" command to the cca server.


broadcastDisplayState

public void broadcastDisplayState(DisplayStateEvent event)
The client wants the cca server to retrieve information on every component and every connection that is in the arena. A connection connects a "uses" port with a "provides" port. A client's view will respond by sending a "display state" command to the cca server.

Parameters:
event - The event that is created whenever the GUI wants to know the state of the arena.

broadcastGoComponentPort

public void broadcastGoComponentPort(java.lang.String componentInstanceName,
                                     java.lang.String portInstanceName)
The client wants the cca server to launch by application by invoking the "go" command on a specific port that is inside a specific component. A client's view will respond by sending a "go" command to the cca server.

Parameters:
componentInstanceName - The name of the cca component object that contains the "go" port. The instance name is usually the name of the component's java class (without the package name) concatenated with an index number. EXAMPLE: "StarterComponent0"
portInstanceName - The name of the GO port

broadcastGoComponentPort

public void broadcastGoComponentPort(GoComponentPortEvent event)
The client wants the cca server to launch by application by invoking the "go" command on a specific port that is inside a specific component. A client's view will respond by sending a "go" command to the cca server.

Parameters:
event - The event that is generated whenever the GUI wants to invoke the "go" command.

broadcastNukeAll

public void broadcastNukeAll()
The client wants the cca server to destroy all of the instantiated components (i.e. all of the components that are in the arena). A client's view will respond by sending a "nuke all" command to the cca server.


broadcastNukeAll

public void broadcastNukeAll(NukeAllEvent event)
The client wants the cca server to destroy all of the instantiated components (i.e. all of the components that are in the arena). A client's view will respond by sending a "nuke all" command to the cca server. param event The event that is created when the GUI wants to to delete all components.


broadcastGetComponentProperty

public void broadcastGetComponentProperty(java.lang.String componentInstanceName,
                                          java.lang.String propertyName)
The client wants the cca server to retrieve the value of a specific property that is contained inside a specific component. A client's view will respond by sending a "property" or a "set property" command to the cca server.

Parameters:
componentInstanceName - The name of the component that contains the property The name is usually the java class name of the component (without the package name) concatenated with an index number. Example: "StartComponent0"
propertyName - The name of the property.

broadcastGetComponentProperty

public void broadcastGetComponentProperty(GetComponentPropertyEvent event)
The client wants the cca server to retrieve the value of a specific property that is contained inside a specific component. A client's view will respond by sending a "property" or a "set property" command to the cca server.

Parameters:
event - The event that is generated whenever the GUi wants the value of a property.

broadcastSetComponentProperty

public void broadcastSetComponentProperty(java.lang.String componentInstanceName,
                                          java.lang.String propertyName,
                                          java.lang.String propertyValue)
The client wants the cca server to set the value of a specific property that is contained inside a specific component. A client's view will respond by sending a "property" or a "set property" command to the cca server.

Parameters:
componentInstanceName - The name of the component that contains the property. The name is usually the java class name of the component (without the package name) concatenated with an index number. Example: "StartComponent0"
propertyName - The name of the property.
propertyValue - The value of the property.

broadcastSetComponentProperty

public void broadcastSetComponentProperty(SetComponentPropertyEvent event)
The client wants the cca server to set the value of a specific property that is contained inside a specific component. A client's view will respond by sending a "property" or a "set property" command to the cca server.

Parameters:
event - The event that is created whenever the GUI wants to set the value of a property.

broadcastMessage

public void broadcastMessage(java.lang.String message)
The client wants to send a message to the cca server. A client's view will respond by sending a "message" command to the cca server.

Parameters:
message - The message that is to be sent to the cca server.

broadcastMessage

public void broadcastMessage(StringEvent event)
The client wants to send a message to the cca server. A client's view will respond by sending a "message" command to the cca server.

Parameters:
event - The event that is created whenever the GUi wants to send a string to the cca server.

broadcastHeartbeat

public void broadcastHeartbeat()
The client wants to send a heartbeat to the cca server. The server uses the heartbeat to determine if the client dies unexpectedly. A client's view will respond by sending a "heartbeat" command to the cca server.


broadcastHeartbeat

public void broadcastHeartbeat(HeartbeatEvent event)
The client wants to send a heartbeat to the cca server. The server uses the heartbeat to determine if the client dies unexpectedly. A client's view will respond by sending a "heartbeat" command to the cca server.

Parameters:
event - The event that is fabricated whenever the GUI wants to send a heartbeat to the cca server.

broadcastExit

public void broadcastExit()
The client wants to tell the cca server that it is shutting down. A client's view will respond by sending an "exit" command to the cca server.


broadcastExit

public void broadcastExit(ExitEvent event)
The client wants to tell the cca server that it is shutting down. A client's view will respond by sending an "exit" command to the cca server.

Parameters:
event - The event that is generated whenever the GUI wants to exit the application.

broadcastPath

public void broadcastPath(PathEvent event)
The client wants either to tell the cca server the name of the folder that contains cca component or to ask the cca server to retrieve the name of the folder. A client's view will respond by sending a "path" command to the cca server.

Parameters:
event - The event that is generated whenever the GUI wants the cca server either to set the path to a new value or to query for the path value.

broadcastRepository

protected void broadcastRepository(RepositoryEvent event)
The client wants either to tell the cca server something about hte repository. A client's view will respond by sending a "repository" command to the cca server.

Parameters:
event - The event that is generated by the GUI