Class ActivitiProfiler
- java.lang.Object
-
- org.activiti.engine.test.profiler.ActivitiProfiler
-
- All Implemented Interfaces:
ProcessEngineConfigurator
public class ActivitiProfiler extends java.lang.Object implements ProcessEngineConfigurator
-
-
Field Summary
Fields Modifier and Type Field Description protected ProfileSession
currentProfileSession
protected static ActivitiProfiler
INSTANCE
protected java.util.List<ProfileSession>
profileSessions
-
Constructor Summary
Constructors Constructor Description ActivitiProfiler()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
beforeInit(ProcessEngineConfigurationImpl processEngineConfiguration)
Called before any initialisation has been done.void
configure(ProcessEngineConfigurationImpl processEngineConfiguration)
Called when the engine boots up, before it is usable, but after the initialisation of internal objects is done.ProfileSession
getCurrentProfileSession()
static ActivitiProfiler
getInstance()
int
getPriority()
When theProcessEngineConfigurator
instances are used, they are first ordered by this priority number (lowest to highest).java.util.List<ProfileSession>
getProfileSessions()
void
reset()
void
setCurrentProfileSession(ProfileSession currentProfileSession)
void
setProfileSessions(java.util.List<ProfileSession> profileSessions)
void
startProfileSession(java.lang.String name)
void
stopCurrentProfileSession()
-
-
-
Field Detail
-
INSTANCE
protected static ActivitiProfiler INSTANCE
-
currentProfileSession
protected ProfileSession currentProfileSession
-
profileSessions
protected java.util.List<ProfileSession> profileSessions
-
-
Method Detail
-
getInstance
public static ActivitiProfiler getInstance()
-
beforeInit
public void beforeInit(ProcessEngineConfigurationImpl processEngineConfiguration)
Description copied from interface:ProcessEngineConfigurator
Called before any initialisation has been done. This can for example be useful to change configuration settings before anything that uses those properties is created. Allows to tweak the process engine by passing theProcessEngineConfigurationImpl
which allows tweaking it programmatically. An example is the jdbc url. When aProcessEngineConfigurator
instance wants to change it, it needs to do it in this method, or otherwise the datasource would already have been created with the 'old' value for the jdbc url.- Specified by:
beforeInit
in interfaceProcessEngineConfigurator
-
configure
public void configure(ProcessEngineConfigurationImpl processEngineConfiguration)
Description copied from interface:ProcessEngineConfigurator
Called when the engine boots up, before it is usable, but after the initialisation of internal objects is done. Allows to tweak the process engine by passing theProcessEngineConfigurationImpl
which allows tweaking it programmatically. An example is the ldap user/group manager, which is an addition to the engine. No default properties need to be overridden for this (otherwise theProcessEngineConfigurator.beforeInit(ProcessEngineConfigurationImpl)
method should be used) so the logic contained in this method is executed after initialisation of the default objects. Probably a better name would be 'afterInit' (cfrProcessEngineConfigurator.beforeInit(ProcessEngineConfigurationImpl)
), but not possible due to backwards compatibility.- Specified by:
configure
in interfaceProcessEngineConfigurator
-
getPriority
public int getPriority()
Description copied from interface:ProcessEngineConfigurator
When theProcessEngineConfigurator
instances are used, they are first ordered by this priority number (lowest to highest). If you have dependencies betweenProcessEngineConfigurator
instances, use the priorities accordingly to order them as needed.- Specified by:
getPriority
in interfaceProcessEngineConfigurator
-
reset
public void reset()
-
startProfileSession
public void startProfileSession(java.lang.String name)
-
stopCurrentProfileSession
public void stopCurrentProfileSession()
-
getCurrentProfileSession
public ProfileSession getCurrentProfileSession()
-
setCurrentProfileSession
public void setCurrentProfileSession(ProfileSession currentProfileSession)
-
getProfileSessions
public java.util.List<ProfileSession> getProfileSessions()
-
setProfileSessions
public void setProfileSessions(java.util.List<ProfileSession> profileSessions)
-
-