org.ow2.petals.microkernel.api.container.thread
Class ComponentLifeCycleThread
java.lang.Object
java.lang.Thread
org.ow2.petals.microkernel.api.container.thread.AbstractThread
org.ow2.petals.microkernel.api.container.thread.ComponentLifeCycleThread
- All Implemented Interfaces:
- Runnable
public class ComponentLifeCycleThread
- extends AbstractThread
The component life cycle thread.
Each component life cycle have its own
thread to process operation that requires own ClassLoader.
NOTE: This should implement the javax.jbi.component.ComponentLifeCycle
interface but due to the use of Thread and the start/stop methods it is
impossible to do this. LET'S SEE IF FUTURE JAVA VERSION ALLOWS TO DO THINGS
LIKE THAT.
- Author:
- Christophe Hamerling - EBM WebSourcing
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
INIT
public static final String INIT
- See Also:
- Constant Field Values
START
public static final String START
- See Also:
- Constant Field Values
STOP
public static final String STOP
- See Also:
- Constant Field Values
SHUTDOWN
public static final String SHUTDOWN
- See Also:
- Constant Field Values
MBEANNAME
public static final String MBEANNAME
- See Also:
- Constant Field Values
ComponentLifeCycleThread
public ComponentLifeCycleThread(javax.jbi.component.Component component,
long tasktimeout,
LoggingUtil logger)
- Constructor.
- Parameters:
component
- tasktimeout
- logger
-
doTask
protected boolean doTask(String action)
- Excute the task.
- Specified by:
doTask
in class AbstractThread
- Parameters:
action
-
- Returns:
- true if the thread needs to continue, false if shutdown is
required
getComponent
public javax.jbi.component.Component getComponent()
- Returns:
- the component
doStart
public void doStart()
throws javax.jbi.JBIException
- Start life cycle step
- Throws:
javax.jbi.JBIException
doStop
public void doStop()
throws javax.jbi.JBIException
- Stop life cycle step
- Throws:
javax.jbi.JBIException
doShutdown
public void doShutdown()
throws javax.jbi.JBIException
- Shutdown life cycle step
- Throws:
javax.jbi.JBIException
doInit
public void doInit(javax.jbi.component.ComponentContext context)
throws javax.jbi.JBIException
- Throws:
javax.jbi.JBIException
getExtensionMBeanName
public ObjectName getExtensionMBeanName()
Copyright © 2005-2015 Linagora. All Rights Reserved.