com.hammingweight.hammock.mocks.util
Class MockTimerTask

java.lang.Object
  extended by java.util.TimerTask
      extended by com.hammingweight.hammock.mocks.util.MockTimerTask
All Implemented Interfaces:
IMockObject, java.lang.Runnable

public class MockTimerTask
extends java.util.TimerTask
implements IMockObject


Field Summary
static MockMethod MTHD_CANCEL
           
static MockMethod MTHD_RUN
           
static MockMethod MTHD_SCHEDULED_EXECUTION_TIME
           
 
Constructor Summary
MockTimerTask()
           
MockTimerTask(IInvocationHandler handler)
           
 
Method Summary
 boolean cancel()
           
 IInvocationHandler getInvocationHandler()
          Gets the invocation handler that the mock object uses to evaluate method invocations.
 void run()
           
 long scheduledExecutionTime()
           
 void setInvocationHandler(IInvocationHandler handler)
          Sets the invocation handler that the mock object should use to evaluate method invocations.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MTHD_CANCEL

public static final MockMethod MTHD_CANCEL

MTHD_RUN

public static final MockMethod MTHD_RUN

MTHD_SCHEDULED_EXECUTION_TIME

public static final MockMethod MTHD_SCHEDULED_EXECUTION_TIME
Constructor Detail

MockTimerTask

public MockTimerTask()

MockTimerTask

public MockTimerTask(IInvocationHandler handler)
Method Detail

setInvocationHandler

public final void setInvocationHandler(IInvocationHandler handler)
Description copied from interface: IMockObject
Sets the invocation handler that the mock object should use to evaluate method invocations.

Specified by:
setInvocationHandler in interface IMockObject
Parameters:
handler - The invocation handler to be used by the mock object.

getInvocationHandler

public final IInvocationHandler getInvocationHandler()
Description copied from interface: IMockObject
Gets the invocation handler that the mock object uses to evaluate method invocations.

Specified by:
getInvocationHandler in interface IMockObject
Returns:
The invocation handler used by the mock object.

cancel

public boolean cancel()
Overrides:
cancel in class java.util.TimerTask

run

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

scheduledExecutionTime

public long scheduledExecutionTime()
Overrides:
scheduledExecutionTime in class java.util.TimerTask