public class PipelineManager extends GenericService implements Schedulable
This is the class responsible for the creation, registration and removal of pipeline chains. All access to pipeline chains is managed through this service.
PipelineChain
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION |
SERVICE_INFO_KEY
DEFAULT_LOG_TRACE_STATUS
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
Constructor and Description |
---|
PipelineManager() |
Modifier and Type | Method and Description |
---|---|
boolean |
chainExists(java.lang.String pChainId) |
PipelineChain |
copyChain(java.lang.String pChainId,
java.lang.String pNewChainId)
Duplicates a chain and renames it.
|
protected javax.servlet.Servlet |
createAdminServlet()
Displays a table of the chains in the manager and their various states.
|
PipelineChain |
createChain(java.lang.String pChainId)
Creates a new chain in the PipelineManager.
|
PipelineChain |
createChain(java.lang.String pChainId,
java.lang.String pChainClassName,
java.lang.String pReturnTypeClassName)
Creates a new chain in the PipelineManager using the class whose name is in
aChainClassName and a return type class whose name is in aReturnTypeClassName.
|
void |
disableChain(java.lang.String pChainId)
Disables the given chain so that threads cannot execute it.
|
void |
doStartService()
Calls the auto loader for the configuration file.
|
void |
doStopService()
Stops the scheduled service for reinitializing the PipelineManager
|
PipelineChain |
duplicateChain(java.lang.String pChainId)
Duplicates a chain and its links and returns the new chain object.
|
void |
enableChain(java.lang.String pChainId)
Enables the given chain so that threads can execute it.
|
java.util.Hashtable |
getChainContexts()
Expose our chain contexts using a hidden, expert method.
|
long |
getChainLockWaitTimeout() |
atg.xml.XMLFile |
getDefinitionFile()
Returns the definitionFile
|
boolean |
getLoggingDebugOnProcessors()
Returns true if loggingDebug is true for the processors, false otherwise
|
boolean |
getReinitializeOnChainExec()
Returns property reinitializeOnChainExec.
|
Schedule |
getSchedule()
Returns the schedule
|
Scheduler |
getScheduler()
Returns the scheduler
|
javax.transaction.TransactionManager |
getTransactionManager() |
PipelineChain |
lockChain(java.lang.String pChainId)
Locks a chain for editing.
|
void |
performScheduledTask(Scheduler pScheduler,
ScheduledJob pJob)
This is called when a scheduled job tied to this object occurs.
|
void |
reinitialize()
Rereads the XML configuration file and reconstructs the chains
|
void |
removeChain(java.lang.String pChainId)
Removes the given chain from the PipelineManager.
|
void |
replaceChain(PipelineChain pChain)
Replaces the chain in the PipelineManager with the given chain of the same name.
|
PipelineResult |
runProcess(java.lang.String pChainId,
java.lang.Object pParam)
This method runs the chain aChainId in the PipelineManager.
|
void |
setChainLockWaitTimeout(long pChainLockWaitTimeout) |
void |
setDefinitionFile(atg.xml.XMLFile pDefinitionFile)
Sets the definitionFile
|
void |
setLoggingDebugOnProcessors(boolean pLoggingDebug)
Turns on logging debug for all the processors in this PipelineManager
|
void |
setReinitializeOnChainExec(boolean pReinitializeOnChainExec)
Sets property reinitializeOnChainExec
|
void |
setSchedule(Schedule pSchedule)
Sets the schedule
|
void |
setScheduler(Scheduler pScheduler)
Sets the scheduler
|
void |
setTransactionManager(javax.transaction.TransactionManager pTransactionManager) |
void |
unlockChain(java.lang.String pChainId)
Unlocks the given chain.
|
addLogListener, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public atg.xml.XMLFile getDefinitionFile()
public void setDefinitionFile(atg.xml.XMLFile pDefinitionFile)
public void setChainLockWaitTimeout(long pChainLockWaitTimeout)
public long getChainLockWaitTimeout()
public void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
public javax.transaction.TransactionManager getTransactionManager()
public Scheduler getScheduler()
public void setScheduler(Scheduler pScheduler)
public Schedule getSchedule()
public void setSchedule(Schedule pSchedule)
public boolean getReinitializeOnChainExec()
public void setReinitializeOnChainExec(boolean pReinitializeOnChainExec)
pReinitializeOnChainExec
- the value to set for property reinitializeOnChainExecpublic boolean getLoggingDebugOnProcessors()
public void setLoggingDebugOnProcessors(boolean pLoggingDebug)
public java.util.Hashtable getChainContexts()
public void doStartService() throws ServiceException
doStartService
in class GenericService
ServiceException
- if the Service had a problem starting uppublic void doStopService() throws ServiceException
doStopService
in class GenericService
ServiceException
- if the Service had a problem shutting downpublic void performScheduledTask(Scheduler pScheduler, ScheduledJob pJob)
performScheduledTask
in interface Schedulable
pScheduler
- calling the jobpJob
- the ScheduledJobpublic void reinitialize() throws ServiceException
ServiceException
public PipelineResult runProcess(java.lang.String pChainId, java.lang.Object pParam) throws RunProcessException
RunProcessException
public PipelineChain lockChain(java.lang.String pChainId) throws LockChainException
LockChainException
public void unlockChain(java.lang.String pChainId) throws UnlockChainException
UnlockChainException
public PipelineChain duplicateChain(java.lang.String pChainId) throws DuplicateChainException
DuplicateChainException
public PipelineChain copyChain(java.lang.String pChainId, java.lang.String pNewChainId) throws CopyChainException
CopyChainException
public void replaceChain(PipelineChain pChain) throws ReplaceChainException
ReplaceChainException
public void enableChain(java.lang.String pChainId) throws EnableChainException, LockChainException
public void disableChain(java.lang.String pChainId) throws DisableChainException, LockChainException
public PipelineChain createChain(java.lang.String pChainId) throws CreateChainException
CreateChainException
public PipelineChain createChain(java.lang.String pChainId, java.lang.String pChainClassName, java.lang.String pReturnTypeClassName) throws CreateChainException
CreateChainException
public void removeChain(java.lang.String pChainId) throws LockChainException, RemoveChainException
public boolean chainExists(java.lang.String pChainId)
protected javax.servlet.Servlet createAdminServlet()
createAdminServlet
in class GenericService