|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.sandia.ccaffeine.dc.user_iface.ccacmd.Server
public class Server
Interface to Server
Constructor Summary | |
---|---|
Server(CmdContextCCA cmdContextCCA)
|
Method Summary | |
---|---|
void |
componentProperties(ComponentPropertiesEvent event)
The GUI is requesting the cca server to send back or to set the value of a component property. |
void |
componentProperties(int numberOfArguments,
java.lang.String componentInstanceName,
java.lang.String propertyName,
java.lang.String propertyValue)
Retrieve the value of a component property or set the value of a component property. |
void |
connect(ConnectEvent event)
The GUI is asking the cca server to connect the Provides Port of a cca component to a Uses Port. |
void |
disconnect(DisconnectEvent event)
The GUI is asking the cca server to disconnect the connection between a Provides Port of a cca component and a Uses Port. |
void |
display(DisplayEvent event)
The GUI is requesting some information from the cca server. |
void |
displayComponent(DisplayComponentEvent event)
The GUI is requesting the cca server to send back a cca component. |
void |
displayPalette(DisplayPaletteEvent event)
The GUI is requesting the cca server to send back all of the components that are in the palette. |
void |
displayState(DisplayStateEvent event)
The GUI is requesting the cca server to send back all components that are in the arena and to send back all connections. |
void |
exit(ExitEvent event)
The GUI wants to tell the cca server that the GUI is shutting down. |
void |
getAllInstancesInArena(GetInstancesEvent event)
The GUI is asking the cca server to send back all of the instantiated cca components. |
void |
getComponentProperty(GetComponentPropertyEvent event)
The GUI is requesting the cca server to send back the value of a property that is inside a cca component. |
void |
getPortParameter(ParamGetCurrentEvent event)
The GUI is asking the cca server to send back the value of one of the parameters of a port that is on a cca component. |
void |
go(GoEvent event)
The GUI wants the cca server to launch an application. |
void |
go(int numberOfArguments,
java.lang.String componentInstanceName,
java.lang.String portInstanceName)
Launch the application. |
void |
goComponentPort(GoComponentPortEvent event)
The GUI is requesting that the cca server execute the "go" command" on a specific port that is located on a specific component. |
void |
heartbeat(HeartbeatEvent event)
The GUI wants to send a heartbeat to the cca server. |
void |
instantiate(InstantiateEvent event)
The GUI is asking the cca server to retrieve a cca component. |
void |
links(DisplayChainEvent event)
The GUI is requesting the cca server to send back all connections. |
void |
nukeAll(NukeAllEvent event)
The GUI is requesting the cca server to delete all components. |
void |
path(PathEvent event)
The GUI wants to tell the cca server to send back or to set the file path that contains cca components. |
void |
portParameter(int numberOfArguments,
java.lang.String componentInstanceName,
java.lang.String portInstanceName,
java.lang.String dataFieldName,
java.lang.String dataFieldValue)
Cca components contain ports. |
void |
portParameter(ParamEvent event)
The GUI is asking the cca server to get or set one of the parameters of a port that is on a cca port. |
void |
portProperties(PortPropertiesEvent event)
The GUI is requesting the cca server to send back or to set the value of a port property. |
void |
remove(RemoveEvent event)
The GUI wants the cca server to remove an instantiation of a cca component. |
void |
repository(RepositoryEvent event)
The GUI wants the cca server to send back all components that are in the repository or to send back one specific compnonent that is in the repository. |
void |
sendMessage(StringEvent event)
The GUI wants to send a message to the cca server. |
void |
setComponentProperty(SetComponentPropertyEvent event)
The GUI wants the server to set the value of a property that is inside of a cca component. |
void |
setDebug(SetDebugEvent event)
The GUI is asking the cca server to turn on debugging. |
void |
setNoDebug(SetDebugEvent event)
The GUI is asking the cca server to turn off debugging |
void |
setPortParameter(ParamCurrentEvent event)
The GUI is asking the cca server to set one of the parameters of a port that is on a cca component. |
void |
shell(ShellEvent event)
The GUI wants to send an O.S. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Server(CmdContextCCA cmdContextCCA)
Method Detail |
---|
public void remove(RemoveEvent event)
remove
in interface GuiListener
event
- The event that is generated whenever
the GUI wants to remove an instantiation of a cca
component.public void go(GoEvent event)
go
in interface GuiListener
event
- The event that is generated whenever
the GUI wants to launch the application.public void go(int numberOfArguments, java.lang.String componentInstanceName, java.lang.String portInstanceName)
numberOfArguments
- the number of
arguments in the "go" command.componentInstanceName
- ITo call "go" on a specific
component, pass in the
name of the component.
The instance
name is usually the name of the component's
java class (without the package name)
concatenated with an index number.
EXAMPLE: "StarterComponent0".
Can be null.portInstanceName
- To call "go" on a specific
"go" port on a specific component,
pass in the
name of the "go" port. Can be null.public void instantiate(InstantiateEvent event)
instantiate
in interface GuiListener
event
- The event that is generated whenever
the GUI wants to retrieve a cca component.public void connect(ConnectEvent event)
connect
in interface GuiListener
event
- The event that is sent whenever
the GUI wants to connect a Uses Port with a
Provides Port.public void disconnect(DisconnectEvent event)
disconnect
in interface GuiListener
event
- The event that is sent whenever
the GUI wants to connect a Uses Port with a
Provides Port.public void setPortParameter(ParamCurrentEvent event)
setPortParameter
in interface GuiListener
event
- The event that is generated
whenever the GUI wants to set the value of
a data field.public void getPortParameter(ParamGetCurrentEvent event)
getPortParameter
in interface GuiListener
event
- The event that is generated whenever
the GUI wants the value of one of the data fields.public void portParameter(ParamEvent event)
portParameter
in interface GuiListener
event
- The event that is generated whenever
the GUI wants to get or set the value of one
of the data fields.public void portParameter(int numberOfArguments, java.lang.String componentInstanceName, java.lang.String portInstanceName, java.lang.String dataFieldName, java.lang.String dataFieldValue)
numberOfArguments
- If we are tying to get the value of a
parameter then we need 3 arguments
(instanceName, portName, parameterName).
If we are trying to set the value of a
parameter then we need 4 or more argumentscomponentInstanceName
- The name of the cca component that contains
the port which contains the data field.
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 data field.
Example: "configure_port"dataFieldName
- The name of the data field.dataFieldValue
- If an entity is setting the value
of a data field then we need to
know what that value is.
Can be set to null;public void getAllInstancesInArena(GetInstancesEvent event)
getAllInstancesInArena
in interface GuiListener
event
- That event that is generated
whenever the GUI wants to get all of the
instantiated cca components.public void setDebug(SetDebugEvent event)
setDebug
in interface GuiListener
public void setNoDebug(SetDebugEvent event)
setNoDebug
in interface GuiListener
public void display(DisplayEvent event)
If the GUI sends the server a "draw palette" request, the server will send back all of the cca classes that are in the palette. The GUI can respond by rendering an icon, in the palette, for each cca class.
If the GUI sends the server a "draw arena" request, the server will send back all of the cca instances that are in the work area. The GUI can respond by rendering an icon, in the work area, for each cca instance.
If the GUI sends the server a "draw chain" request, the server will send back a connection, or a line, that connects two different ports; the two ports may be on the same cca component or may be on different components. The GUI can respond by drawing a line between the two ports.
If the GUI sends the server a "draw component" request, the server will send back one instantiated component. The GUI can respond by rendering the component in the work area.
If the GUI sends the server a "draw state" request, the server will send back all of the components that are in the work area and will send back all of the connections that are attached to two ports. The GUI can respond by rendering the components and the connections in the work area.
display
in interface GuiListener
DisplayEvent
- The event that is
generated whenever an entity is requesting
some information from the server.public void displayPalette(DisplayPaletteEvent event)
The cca server will send back all of the components that are in the palette. A GUI might respond by rending an icon, in the palette, for each component.
displayPalette
in interface GuiListener
event
- The event that is generated whenever
the GUI wants to know what components
are in the palette.public void links(DisplayChainEvent event)
links
in interface GuiListener
event
- The event that is created
whenever the GUI wants to know what connections
are in the arena.public void displayComponent(DisplayComponentEvent event)
The cca server will respond by sending back one cca component. The GUI might respond by rendering the component in the workspace.
displayComponent
in interface GuiListener
source
- The entity that created this event.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"event
- The event that is created whenever
the GUI wants some information on a cca component.public void displayState(DisplayStateEvent event)
The cca server will respond by sending back all of the components that are in the workspace and all of the connections. A GUI might respond by rendering an icon, in the work area, for each component and by drawing lines between the components to connect them.
displayState
in interface GuiListener
event
- The event that is created whenever
we want to know the state of the arena.public void goComponentPort(GoComponentPortEvent event)
goComponentPort
in interface GuiListener
event
- The event that is generated whenever
the GUI wants to invoke the "go" command.public void nukeAll(NukeAllEvent event)
The server will respond by deleting all components. The GUI might respond by removing all components from the workspace. param event The event that is created whenever the GUI wants to to delete all components.
nukeAll
in interface GuiListener
public void portProperties(PortPropertiesEvent event)
portProperties
in interface GuiListener
event
- The event that is generated
whenever an entity wants to either get or
set the value of a port property.public void componentProperties(ComponentPropertiesEvent event)
componentProperties
in interface GuiListener
event
- The event that is generated
whenever the GUI wants to either get or
set the value of a component property.public void componentProperties(int numberOfArguments, java.lang.String componentInstanceName, java.lang.String propertyName, java.lang.String propertyValue)
An example of a component property is "name" of component, the component's "key" value, and "value" of the component.
event
- The event that is generated
whenever an entity wants to either get or
set the value of a component property.numberOfArguments
- The number of arguments in the "properties"
command.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
- If we want to
get or set the value of a specific
component property, then we need the
name of the property.propertyValue
- If we are
setting the value of a specific component property,
then we need the value of the property.public void getComponentProperty(GetComponentPropertyEvent event)
getComponentProperty
in interface GuiListener
event
- The event that is generated
whenever the GUI wants the value of a
property that is inside a component.public void setComponentProperty(SetComponentPropertyEvent event)
setComponentProperty
in interface GuiListener
event
- The event that is created whenever
the GUI wants to set the value of a property.public void sendMessage(StringEvent event)
sendMessage
in interface GuiListener
event
- The event that is created
the GUI wants to send
a string to the cca server.public void heartbeat(HeartbeatEvent event)
heartbeat
in interface GuiListener
event
- The event that is fabricated
the GUI wants to emit a heartbeat.public void exit(ExitEvent event)
exit
in interface GuiListener
event
- The event that is generated whenever
the GUI wants to exit the application.public void path(PathEvent event)
path
in interface GuiListener
event
- The event that is
generated whenever the GUI
wants either to set the path
to a new value or to query
for the path value.public void repository(RepositoryEvent event)
repository
in interface GuiListener
event
- The event that is created whenever
the GUI wants to get one component or all components
from the repository,public void shell(ShellEvent event)
shell
in interface GuiListener
event
- The event that is
created whenever the GUI wants
an O.S. command executed.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |