package com.whatevernot.engine;
import java.util.concurrent.BlockingQueue;
import com.whatevernot.engine.standard.Engine;
import com.whatevernot.util.ITimer;
import com.whatevernot.util.NullTimer;
/**
* Standard Singleton access.
* @author parki
*/
public class EngineFactory
{
/**
* Return an engine implementation to the caller.
* @return An engine to handle requests.
*/
public static IEngine makeEngine()
{
return makeEngine(new NullTimer());
}
/**
* Return an engine with the supplied blocking queue.
* @param blockingQueue The queue.
* @return The engine.
*/
public static IEngine makeEngine(BlockingQueue<Runnable> blockingQueue)
{
return new Engine(blockingQueue);
}
/**
* Return an engine implementation to the caller. The
* caller also supplies a timer object used to record the
* execution of the engine.
* @return The engine.
*/
public static IEngine makeEngine(ITimer timer)
{
return new Engine(timer);
}
}