com.ibm.websphere.samples.asynchbeans.wstrader.applet
Class StreamerHandler

java.lang.Object
  extended by java.lang.Thread
      extended by com.ibm.websphere.samples.asynchbeans.wstrader.applet.StreamerHandler
All Implemented Interfaces:
NotificationBroadcaster, java.lang.Runnable

public class StreamerHandler
extends java.lang.Thread
implements NotificationBroadcaster

The WebSphere Trader Client interface to the remote HTTP server. We use a singleton StreamerHandler so that all applets in a single JVM only have one HTTP connection open.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Method Summary
 void addNotificationListener(NotificationListener listener)
          Register a listener to this broadcaster.
 void cancel()
          Cancel this thread.
static StreamerHandler create(java.net.URL codeBase, java.util.Hashtable tickerLookup, java.lang.String name, java.lang.String dftSymbols, java.lang.String cookie)
          Create a new singleton ServerMonitor or get the currently created on if one already exists
 boolean getCancelled()
          True if we have been asked to cancel the thread.
static StreamerHandler getSelf()
          Get the singleton StreamerHandler
 java.lang.String getStreamerName()
          Retreive the name of this streamer
 void removeNotificationListener(NotificationListener listener)
          Remove the specified listener from this broadcaster.
 void run()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

create

public static StreamerHandler create(java.net.URL codeBase,
                                     java.util.Hashtable tickerLookup,
                                     java.lang.String name,
                                     java.lang.String dftSymbols,
                                     java.lang.String cookie)
Create a new singleton ServerMonitor or get the currently created on if one already exists


getSelf

public static StreamerHandler getSelf()
Get the singleton StreamerHandler


cancel

public void cancel()
Cancel this thread.


getStreamerName

public java.lang.String getStreamerName()
Retreive the name of this streamer


getCancelled

public boolean getCancelled()
True if we have been asked to cancel the thread.


run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread
See Also:
Thread.run()

addNotificationListener

public void addNotificationListener(NotificationListener listener)
Description copied from interface: NotificationBroadcaster
Register a listener to this broadcaster.

Specified by:
addNotificationListener in interface NotificationBroadcaster
See Also:
NotificationBroadcaster.addNotificationListener(NotificationListener)

removeNotificationListener

public void removeNotificationListener(NotificationListener listener)
Description copied from interface: NotificationBroadcaster
Remove the specified listener from this broadcaster.

Specified by:
removeNotificationListener in interface NotificationBroadcaster
See Also:
NotificationBroadcaster.removeNotificationListener(NotificationListener)