edu.cmu.emulator.event
Class MethodCaller

java.lang.Object
  extended by edu.cmu.emulator.event.MethodCaller
All Implemented Interfaces:
EmuEventTarget

public class MethodCaller
extends Object
implements EmuEventTarget

The target object responsible for method invocation in the Emulator 'Event model'. An instance of this class is set as the target of each event. It uses the java Reflection API to invoke the method in the specified object from the MethodCall class.

See Also:
MethodCall

Field Summary
private static boolean debug
           
 
Constructor Summary
MethodCaller()
           
 
Method Summary
 void eventTriggered(EmuEvent event)
          Implementation of the EmuEventTarget interface.
 void sleep(Long sleepMillis)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

private static final boolean debug
See Also:
Constant Field Values
Constructor Detail

MethodCaller

public MethodCaller()
Method Detail

eventTriggered

public void eventTriggered(EmuEvent event)
Implementation of the EmuEventTarget interface. This method is invoked when an event is triggered by the EmuEventQueue. Invokes the method from the MethodCall object.

Specified by:
eventTriggered in interface EmuEventTarget
Parameters:
event - The MethodCall object that is encapsulated as a EmuEvent object.

sleep

public void sleep(Long sleepMillis)


Copyright © 2013. All Rights Reserved.