org.ourgrid.peer.manager
Class FakeEventEngine

java.lang.Object
  extended by org.ourgrid.peer.manager.FakeEventEngine
All Implemented Interfaces:
java.lang.Runnable, EBSyncShutdownable, EventEngine<ActionEvent>, ShutdownEventEngine

public class FakeEventEngine
extends java.lang.Object
implements ShutdownEventEngine

The FakeEventEngine.


Constructor Summary
FakeEventEngine()
          Creates a fake JICEventHandler which will process the events.
 
Method Summary
 Event getEvent()
          Returns the next Event to be processed.
 boolean isAlive()
          Checks if the EBSyncShutdownable is alive.
 void putEvent(ActionEvent event)
          Includes an Event to be processed by this JICEventHandler.
 void run()
           
 void shutdown(EventQueue<ShutdownResponseEvent> responseQueue)
          Shuts down the object.
 void startProcessing()
          Starts processing its events.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FakeEventEngine

public FakeEventEngine()
Creates a fake JICEventHandler which will process the events.

Method Detail

putEvent

public void putEvent(ActionEvent event)
Description copied from interface: EventEngine
Includes an Event to be processed by this JICEventHandler.

Specified by:
putEvent in interface EventEngine<ActionEvent>
Parameters:
event - The Event to be included.

getEvent

public Event getEvent()
Returns the next Event to be processed.

Returns:
The next event.

startProcessing

public void startProcessing()
Description copied from interface: EventEngine
Starts processing its events.

Specified by:
startProcessing in interface EventEngine<ActionEvent>

isAlive

public boolean isAlive()
Description copied from interface: EBSyncShutdownable
Checks if the EBSyncShutdownable is alive.

Specified by:
isAlive in interface EBSyncShutdownable
Returns:
True if it is alive, false otherwise

run

public void run()
Specified by:
run in interface java.lang.Runnable

shutdown

public void shutdown(EventQueue<ShutdownResponseEvent> responseQueue)
Description copied from interface: EBSyncShutdownable
Shuts down the object.

Specified by:
shutdown in interface EBSyncShutdownable
Parameters:
responseQueue - EventQueue that will contain the ShutdownResponseEvent after the object had successfully shutdown