edu.stanford.hci.r3.flash
Class FlashCommunicationServer

java.lang.Object
  extended by edu.stanford.hci.r3.flash.FlashCommunicationServer

public class FlashCommunicationServer
extends java.lang.Object

A messaging server that will relay information objects to one or more Flash GUIs, which will listen for them. It's a two way pipe, so the Flash GUIs can also send messages back! This is an early implementation. Later on, we may allow our event handlers to live in the world of Flash, for faster UI prototyping.

This software is distributed under the BSD License.


Field Summary
static int DEFAULT_PORT
          communicate through this port
 
Constructor Summary
FlashCommunicationServer()
          Allows us to send messages to the Flash GUI.
FlashCommunicationServer(int port)
           
 
Method Summary
 void addFlashClientListener(FlashListener flashListener)
           
 void exitServer()
           
 void handleCommand(int clientID, java.lang.String command)
           
 void openFlashApolloGUI(java.io.File apolloGUIFile)
          Point it to the Apollo exe that will serve as your GUI.
 void openFlashGUI(java.io.File flashGUIFile)
          Currently, we assume the next client connection is for THIS flash GUI.
 void removeAllFlashClientListeners()
           
 void sendMessage(java.lang.String msg)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_PORT

public static final int DEFAULT_PORT
communicate through this port

See Also:
Constant Field Values
Constructor Detail

FlashCommunicationServer

public FlashCommunicationServer()
Allows us to send messages to the Flash GUI.


FlashCommunicationServer

public FlashCommunicationServer(int port)
Parameters:
port -
Method Detail

addFlashClientListener

public void addFlashClientListener(FlashListener flashListener)
Parameters:
flashListener -

exitServer

public void exitServer()

handleCommand

public void handleCommand(int clientID,
                          java.lang.String command)
Parameters:
clientID -
command -

openFlashGUI

public void openFlashGUI(java.io.File flashGUIFile)
Currently, we assume the next client connection is for THIS flash GUI. =) We'll hopefully be able to use this information later.

Parameters:
flashGUIFile - Or perhaps this should be a URL in the future, as the GUI can live online? Launches the flash GUI in a browser.

openFlashApolloGUI

public void openFlashApolloGUI(java.io.File apolloGUIFile)
Point it to the Apollo exe that will serve as your GUI.

Parameters:
apolloGUIFile -

removeAllFlashClientListeners

public void removeAllFlashClientListeners()

sendMessage

public void sendMessage(java.lang.String msg)
Parameters:
msg -

Copyright 2006 Stanford University