net.sourceforge.jsrvany.test
Class Bus

java.lang.Object
  |
  +--net.sourceforge.jsrvany.test.Bus

public class Bus
extends java.lang.Object

This class is a bus for copying data to multiple objects

Copyright (c) 2000 Damian Fauth

 


Constructor Summary
Bus()
          default constructor
 
Method Summary
 void pause()
          signal to Threads using this bus that they must pause
 void registerBusListener(BusListener listener)
          register a listener
 void unPause()
          signal to Threads using this bus that they can continue
 void unRegisterBusListener(BusListener listener)
          unregister a listener
 void write(BusListener listener, java.lang.String data)
          write to the bus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Bus

public Bus()
default constructor
Method Detail

registerBusListener

public void registerBusListener(BusListener listener)
register a listener
Parameters:
listener - is the class implementing BusListener that wishes to be notified about the latest data on the bus

unRegisterBusListener

public void unRegisterBusListener(BusListener listener)
unregister a listener
Parameters:
listener - is the class implementing BusListener that wishes to be removed

write

public void write(BusListener listener,
                  java.lang.String data)
write to the bus
Parameters:
data - is the data being written

pause

public void pause()
signal to Threads using this bus that they must pause
Returns:
void

unPause

public void unPause()
signal to Threads using this bus that they can continue
Returns:
void