RxJava



rx.concurrency
Class TestScheduler

java.lang.Object
  extended by rx.Scheduler
      extended by rx.concurrency.TestScheduler

public class TestScheduler
extends Scheduler


Constructor Summary
TestScheduler()
           
 
Method Summary
 void advanceTimeBy(long delayTime, java.util.concurrent.TimeUnit unit)
           
 void advanceTimeTo(long delayTime, java.util.concurrent.TimeUnit unit)
           
 long now()
          Returns the scheduler's notion of current absolute time in milliseconds.
<T> Subscription
schedule(T state, Func2<Scheduler,T,Subscription> action)
          Schedules a cancelable action to be executed.
<T> Subscription
schedule(T state, Func2<Scheduler,T,Subscription> action, long delayTime, java.util.concurrent.TimeUnit unit)
          Schedules a cancelable action to be executed in delayTime.
 void triggerActions()
           
 
Methods inherited from class rx.Scheduler
schedule, schedule, schedule, schedule, schedule, schedule, schedule, schedulePeriodically, schedulePeriodically, schedulePeriodically, schedulePeriodically
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestScheduler

public TestScheduler()
Method Detail

now

public long now()
Description copied from class: Scheduler
Returns the scheduler's notion of current absolute time in milliseconds.

Overrides:
now in class Scheduler

advanceTimeBy

public void advanceTimeBy(long delayTime,
                          java.util.concurrent.TimeUnit unit)

advanceTimeTo

public void advanceTimeTo(long delayTime,
                          java.util.concurrent.TimeUnit unit)

triggerActions

public void triggerActions()

schedule

public <T> Subscription schedule(T state,
                                 Func2<Scheduler,T,Subscription> action)
Description copied from class: Scheduler
Schedules a cancelable action to be executed.

Specified by:
schedule in class Scheduler
Parameters:
state - State to pass into the action.
action - Action to schedule.
Returns:
a subscription to be able to unsubscribe from action.

schedule

public <T> Subscription schedule(T state,
                                 Func2<Scheduler,T,Subscription> action,
                                 long delayTime,
                                 java.util.concurrent.TimeUnit unit)
Description copied from class: Scheduler
Schedules a cancelable action to be executed in delayTime.

Specified by:
schedule in class Scheduler
Parameters:
state - State to pass into the action.
action - Action to schedule.
delayTime - Time the action is to be delayed before executing.
unit - Time unit of the delay time.
Returns:
a subscription to be able to unsubscribe from action.