org.ourgrid.mygrid.replicaexecutor
Class ReplicaExecutorEventEngine

java.lang.Object
  extended by org.ourgrid.mygrid.replicaexecutor.ReplicaExecutorEventEngine
All Implemented Interfaces:
java.lang.Runnable, EBSyncShutdownable, EventEngine<ActionEvent>, ShutdownEventEngine

public class ReplicaExecutorEventEngine
extends java.lang.Object
implements ShutdownEventEngine

Description: This class is responsible for receiving events that come from the EBReplicaExecutorFacade and process then.

Version:
1.0 Created on 13/07/2004

Constructor Summary
protected ReplicaExecutorEventEngine()
          Creates an empty ReplicaExecutorEventEngine This constructor should not be used.
  ReplicaExecutorEventEngine(EBReplicaExecutorFacade ebReplicaExecutorFacade, EBSchedulerFacade ebSchedulerFacade)
          Creates a ReplicaExecutorEventEngine with a EBReplicaExecutorFacade and a EBSchedulerFacade
 
Method Summary
 EBReplicaManager getEBReplicaManager()
          Gets the EBReplicaManager object
 boolean isAlive()
          Indicates if the thread is alive
 void putEvent(ActionEvent event)
          Puts an Event in the EventQueue.
 void run()
          The Thread behavior.
 void shutdown(EventQueue<ShutdownResponseEvent> eq)
          Marks this Runnable to be shutdown.
 void startProcessing()
          Starts the ReplicaExecutorEventEngine Thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReplicaExecutorEventEngine

protected ReplicaExecutorEventEngine()
Creates an empty ReplicaExecutorEventEngine This constructor should not be used.


ReplicaExecutorEventEngine

public ReplicaExecutorEventEngine(EBReplicaExecutorFacade ebReplicaExecutorFacade,
                                  EBSchedulerFacade ebSchedulerFacade)
Creates a ReplicaExecutorEventEngine with a EBReplicaExecutorFacade and a EBSchedulerFacade

Parameters:
ebReplicaExecutorFacade - The EBReplicaExecutorFacade who sends events to this event processor .
ebSchedulerFacade - The EBSchedulerFacade who sends requests to the EBReplicaExecutorFacade
Method Detail

startProcessing

public void startProcessing()
Starts the ReplicaExecutorEventEngine Thread.

Specified by:
startProcessing in interface EventEngine<ActionEvent>

putEvent

public void putEvent(ActionEvent event)
Puts an Event in the EventQueue.

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

run

public void run()
The Thread behavior.

Specified by:
run in interface java.lang.Runnable

shutdown

public void shutdown(EventQueue<ShutdownResponseEvent> eq)
Marks this Runnable to be shutdown.

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

getEBReplicaManager

public EBReplicaManager getEBReplicaManager()
Gets the EBReplicaManager object

Returns:
The EBReplicaManager

isAlive

public boolean isAlive()
Indicates if the thread is alive

Specified by:
isAlive in interface EBSyncShutdownable
Returns:
true if the thread is alive, false otherwise