|
||||||||||
上一个类 下一个类 | 框架 无框架 | |||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |
java.lang.Objectorg.activiti.engine.ProcessEngines
public abstract class ProcessEngines
Helper for initializing and closing process engines in server environments.
All created ProcessEngine
s will be registered with this class.
The activiti-webapp-init webapp will
call the init()
method when the webapp is deployed and it will call the
destroy()
method when the webapp is destroyed, using a context-listener
(org.activiti.impl.servlet.listener.ProcessEnginesServletContextListener
). That way,
all applications can just use the getProcessEngines()
to
obtain pre-initialized and cached process engines.
Please note that there is no lazy initialization of process engines, so make sure the
context-listener is configured or ProcessEngine
s are already created so they were registered
on this class.
The init()
method will try to build one ProcessEngine
for
each activiti.cfg.xml file found on the classpath. If you have more then one,
make sure you specify different process.engine.name values.
字段摘要 | |
---|---|
protected static boolean |
isInitialized
|
static String |
NAME_DEFAULT
|
protected static List<ProcessEngineInfo> |
processEngineInfos
|
protected static Map<String,ProcessEngineInfo> |
processEngineInfosByName
|
protected static Map<String,ProcessEngineInfo> |
processEngineInfosByResourceUrl
|
protected static Map<String,ProcessEngine> |
processEngines
|
构造方法摘要 | |
---|---|
ProcessEngines()
|
方法摘要 | |
---|---|
static void |
destroy()
closes all process engines. |
static ProcessEngine |
getDefaultProcessEngine()
|
static ProcessEngine |
getProcessEngine(String processEngineName)
obtain a process engine by name. |
static ProcessEngineInfo |
getProcessEngineInfo(String processEngineName)
Get initialization results. |
static List<ProcessEngineInfo> |
getProcessEngineInfos()
Get initialization results. |
static Map<String,ProcessEngine> |
getProcessEngines()
provides access to process engine to application clients in a managed server environment. |
static void |
init()
Initializes all process engines that can be found on the classpath for resources activiti.cfg.xml (plain Activiti style configuration)
and for resources activiti-context.xml (Spring style configuration). |
protected static void |
initProcessEngineFromSpringResource(URL resource)
|
static void |
registerProcessEngine(ProcessEngine processEngine)
Registers the given process engine. |
static ProcessEngineInfo |
retry(String resourceUrl)
retries to initialize a process engine that previously failed. |
static void |
unregister(ProcessEngine processEngine)
Unregisters the given process engine. |
从类 java.lang.Object 继承的方法 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
字段详细信息 |
---|
public static final String NAME_DEFAULT
protected static boolean isInitialized
protected static Map<String,ProcessEngine> processEngines
protected static Map<String,ProcessEngineInfo> processEngineInfosByName
protected static Map<String,ProcessEngineInfo> processEngineInfosByResourceUrl
protected static List<ProcessEngineInfo> processEngineInfos
构造方法详细信息 |
---|
public ProcessEngines()
方法详细信息 |
---|
public static void init()
activiti.cfg.xml
(plain Activiti style configuration)
and for resources activiti-context.xml
(Spring style configuration).
protected static void initProcessEngineFromSpringResource(URL resource)
public static void registerProcessEngine(ProcessEngine processEngine)
ProcessEngineInfo
will be
available for this process engine. An engine that is registered will be closed
when the destroy()
is called.
public static void unregister(ProcessEngine processEngine)
public static List<ProcessEngineInfo> getProcessEngineInfos()
public static ProcessEngineInfo getProcessEngineInfo(String processEngineName)
init()
. No ProcessEngineInfo
is available for engines which were registered programatically.
public static ProcessEngine getDefaultProcessEngine()
public static ProcessEngine getProcessEngine(String processEngineName)
processEngineName
- is the name of the process engine or null for the default process engine.public static ProcessEngineInfo retry(String resourceUrl)
public static Map<String,ProcessEngine> getProcessEngines()
public static void destroy()
|
||||||||||
上一个类 下一个类 | 框架 无框架 | |||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |