|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.sandia.ccaffeine.dc.user_iface.MVC.ViewSocket
public class ViewSocket
An MVC view. This view is used to send commands and data to the cca server.
Constructor Summary | |
---|---|
ViewSocket(ClientSocket clientSocket)
Create an MVC View. |
Method Summary | |
---|---|
void |
componentProperties(ComponentPropertiesEvent event)
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)
Request some information from the server. |
void |
displayComponent(DisplayComponentEvent event)
Tell all GuiListeners that an entity wants some information on a cca component. |
void |
displayPalette(DisplayPaletteEvent event)
Tell all GuiListeners that an entity wants wants to know what components are in the palette. |
void |
displayState(DisplayStateEvent event)
Notify all GuiListeners that an entity wants to know what components are in the arena and what connections exist between the components. |
void |
exit(ExitEvent event)
Notify all GuiListeners that an entity wants the application to exit. |
void |
getAllInstancesInArena(GetInstancesEvent event)
An entity wants to get all of the instantiated cca components. |
void |
getComponentProperty(GetComponentPropertyEvent event)
Notify all GuiListeners that an entity wants the the cca server to send the value of a property that is inside a component. |
void |
getPortParameter(ParamGetCurrentEvent event)
Cca components contain ports. |
void |
go(GoEvent event)
The end-user, via the GUI, wants to launch the application. |
void |
goComponentPort(GoComponentPortEvent event)
Notify all GuiListeners that this entity wants to invoke the "go" command on a specific port that is located on a specific component. |
void |
heartbeat(HeartbeatEvent event)
Notify all GuiListeners that an entity wants to emit a heartbeat. |
void |
instantiate(InstantiateEvent event)
The end-user, via the GUI, wants to retrieve a cca component. |
void |
links(DisplayChainEvent event)
Tell all GuiListeners that an entity wants to know what connections are in the arena. |
void |
nukeAll(NukeAllEvent event)
Notify all GuiListeners that an entity wants to delete all components. |
void |
path(PathEvent event)
Tell the cca server to change the path or tell the cca server to retrieve the path. |
void |
portParameter(ParamEvent event)
Cca components contain ports. |
void |
portProperties(PortPropertiesEvent event)
Retrieve the value of a port property or set the value of a port property. |
void |
remove(RemoveEvent event)
The end-user wants to remove an instantiation of a cca component. |
void |
repository(RepositoryEvent event)
Send a query to the cca server. |
void |
sendMessage(StringEvent event)
Notify all GuiListeners that an entity wants to send a string to the cca server. |
void |
setComponentProperty(SetComponentPropertyEvent event)
Notify all GuiListeners that an entity wants to set the value of a property that is inside a cca component. |
void |
setDebug(SetDebugEvent event)
Tell all GuiListeners that an entity wants the debugging turned on. |
void |
setNoDebug(SetDebugEvent event)
Tell all GuiListeners that an entity wants the debugging turned off. |
void |
setPortParameter(ParamCurrentEvent event)
Cca components contain ports. |
void |
shell(ShellEvent event)
Send an O.S. |
void |
write(java.lang.String message)
Send a message to the cca server |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ViewSocket(ClientSocket clientSocket)
outputStream
- The output stream that is
used to send commands and data to the cca server.Method Detail |
---|
public void write(java.lang.String message)
message
- The string we are sending
to the cca server.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 instantiate(InstantiateEvent event)
instantiate
in interface GuiListener
event
- public void connect(ConnectEvent event)
GuiListener
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)
GuiListener
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 getAllInstancesInArena(GetInstancesEvent event)
getAllInstancesInArena
in interface GuiListener
event
- That event that is generated
whenever an entity wants to get all of the
instantiated cca components.public void setPortParameter(ParamCurrentEvent event)
setPortParameter
in interface GuiListener
event
- The event that is generated
whenever an entity 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
an entity wans the value of one of the data fields.public void componentProperties(ComponentPropertiesEvent event)
A view entity might respond by either displaying the current value of a component property or by setting the value of a component property.
An example of a component property is the "name" of the component.
componentProperties
in interface GuiListener
event
- The event that is generated
whenever an entity wants to either get or
set the value of a component property.public void portParameter(ParamEvent event)
portParameter
in interface GuiListener
event
- The event that is generated whenever
an entity wans the value of one of the data fields.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 wants to get information on the components that are in the palette, or on the components that are in the arena, or on the connections that are established inside the arena, or on a particular component, or on the components and the connections that are in the arena, then the GUI will encapsulate the request as a DisplayEvent and will then invoke this method. This method will send the request to the cca server.
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)
displayPalette
in interface GuiListener
event
- The event that is generated whenever
an entity 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)
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
an entity wants some information on a cca component.public void displayState(DisplayStateEvent event)
displayState
in interface GuiListener
source
- The entity that created this event.public void goComponentPort(GoComponentPortEvent event)
goComponentPort
in interface GuiListener
event
- The event that is generated whenever
an entity wants to invoke the "go" command.public void nukeAll(NukeAllEvent event)
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 getComponentProperty(GetComponentPropertyEvent event)
getComponentProperty
in interface GuiListener
event
- The event that is generated
whenever an entity 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
an entity wants to set the value of a property
that is inside a component.public void sendMessage(StringEvent event)
sendMessage
in interface GuiListener
event
- The event that is created
whenever an entity wants to send
a string to the cca server.public void heartbeat(HeartbeatEvent event)
heartbeat
in interface GuiListener
event
- The event that is fabricated
whenever an entity wants to emit a heartbeat.public void exit(ExitEvent event)
exit
in interface GuiListener
event
- The event that is generated whenever
an entity wants to exit the application.public void path(PathEvent event)
path
in interface GuiListener
event
- The event that is
generated whenever an entity
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
an entity 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 an entity wants
an O.S. command executed.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |