com.ibm.tspaces.examples.services
Class Demo

java.lang.Object
  |
  +--com.ibm.tspaces.examples.services.Demo

public class Demo
extends java.lang.Object
implements java.awt.event.MouseListener, java.awt.event.ActionListener

This class is responsible for all the functionality needed to run a Demo of the TSpaces Service client. This includes easily starting the separate components -- the T Spaces Server, and any number of service providers based on a config file. This is almost an exact copy of the Demo program that was used for the old AdminServer component.

Author:
Joseph Gebis

Inner Class Summary
 class Demo.ActionButton
          This inner class controls the buttons that actually start the programs
 class Demo.ActionThread
          This inner class creates a thread associated with a program.
static interface Demo.ButtonInterface
           
 class Demo.DemoURIHandler
          This class handles URI's received by the http server of the Demo application.
 class Demo.DoneButton
          This inner class represents the button used to quit the Demo app.
 class Demo.StatusLight
          This inner class represents that status of a component: either not running (in which case the status light is a dimmed color) or running (in which case the status light is a green color).
 class Demo.URLButton
          This inner class represents a button that will retrieve the contents of a URL.
 
Constructor Summary
Demo()
          Constructor.
Demo(java.lang.String inputfileName)
          Constructor.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 java.lang.String address()
          Returns a string representing the address (hostname:port) for this server.
 void cleanup()
          Performs final cleanup.
 java.lang.String endButton(java.lang.String buttonName)
          Ends a running component.
protected  void finalize()
          finalizer
 java.lang.String host()
          Returns a string representing the address (hostname) for this server.
static void main(java.lang.String[] argv)
           
 void mouseClicked(java.awt.event.MouseEvent e)
           
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
           
 void mouseReleased(java.awt.event.MouseEvent e)
           
 java.lang.String startButton(java.lang.String buttonName)
          Starts a component running.
 java.lang.String statusHTML()
          Returns a string in HTML that represents the current status of
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Demo

public Demo()
Constructor.

Demo

public Demo(java.lang.String inputfileName)
Constructor.
Method Detail

cleanup

public void cleanup()
Performs final cleanup.

address

public java.lang.String address()
Returns a string representing the address (hostname:port) for this server.
Returns:
a string representing the address (hostname:port) for this server

host

public java.lang.String host()
Returns a string representing the address (hostname) for this server.
Returns:
a string representing the address (hostname) for this server

startButton

public java.lang.String startButton(java.lang.String buttonName)
Starts a component running.
Parameters:
buttonName - the name of the button to start
Returns:
a string representing the status

endButton

public java.lang.String endButton(java.lang.String buttonName)
Ends a running component.
Parameters:
buttonName - the name of the button to end
Returns:
a string representing the status

statusHTML

public java.lang.String statusHTML()
Returns a string in HTML that represents the current status of

finalize

protected void finalize()
finalizer
Overrides:
finalize in class java.lang.Object

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Specified by:
mouseExited in interface java.awt.event.MouseListener

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

main

public static void main(java.lang.String[] argv)