com.sourceforge.jpatterns.core
Class JPEngineFactory

java.lang.Object
  extended by com.sourceforge.jpatterns.core.JPEngineFactory
All Implemented Interfaces:
Serializable

public final class JPEngineFactory
extends Object
implements Serializable

Singleton-factory for the accesing the entry points of all the JPatterns operations. Currently it is only IJPEngine, still there could be another entry points may occurr here in the future. $Author:: zmicer $
$Rev:: 67 $
* $Date:: 2007-08-28 21:37:07 #$
$Date:: 2007-08-28 21:37:07 #$

See Also:
Serialized Form

Field Summary
static org.apache.log4j.Logger LOG
          Logger instance.
 
Method Summary
static JPEngineFactory getInstance()
           
static IJPEngine getJPEngine(JPConstants.EngineConfigCaregory category)
          Get the IJPEngine of the necessary category.
 void init()
          Init method.
protected  IJPEngine instantiateEngine()
           
protected static void logAndThrow(String message)
          Log the message and then throw it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

public static final org.apache.log4j.Logger LOG
Logger instance.

Method Detail

init

public void init()
Init method.


instantiateEngine

protected IJPEngine instantiateEngine()
Returns:
the new IJPEngine instance.

getInstance

public static JPEngineFactory getInstance()
Returns:
the singleton instance of the JPEngineFactory

getJPEngine

public static IJPEngine getJPEngine(JPConstants.EngineConfigCaregory category)
Get the IJPEngine of the necessary category.

Parameters:
category - the category to be used, Can not be null (otherwise IllegalArgumentException would appear).
Returns:
the JPatterns engine singleton instance

logAndThrow

protected static void logAndThrow(String message)
                           throws JPInitializationException
Log the message and then throw it.

Parameters:
message - the not emopty message to be thrown and logged
Throws:
JPInitializationException - always, using message


Copyright © 2007 jzmicer.team. All Rights Reserved.