org.axonframework.common
Class DirectExecutor

java.lang.Object
  extended by org.axonframework.common.DirectExecutor
All Implemented Interfaces:
Executor

public final class DirectExecutor
extends Object
implements Executor

Simple executor implementation that runs a given Runnable immediately in the calling thread.

Since:
0.7
Author:
Allard Buijze

Field Summary
static DirectExecutor INSTANCE
          Returns a singleton instance of the DirectExecutor.
 
Constructor Summary
DirectExecutor()
           
 
Method Summary
 void execute(Runnable command)
          Executes the given command immediately in the current thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final DirectExecutor INSTANCE
Returns a singleton instance of the DirectExecutor. Using this constant prevents the creation of unnecessary DirectExecutor instances.

Constructor Detail

DirectExecutor

public DirectExecutor()
Method Detail

execute

public void execute(Runnable command)
Executes the given command immediately in the current thread.

Specified by:
execute in interface Executor
Parameters:
command - the command to execute.


Copyright © 2010-2016. All Rights Reserved.