org.ow2.petals.microkernel.api.container.thread
Class BootstrapThread

java.lang.Object
  extended by java.lang.Thread
      extended by org.ow2.petals.microkernel.api.container.thread.AbstractThread
          extended by org.ow2.petals.microkernel.api.container.thread.BootstrapThread
All Implemented Interfaces:
Runnable, javax.jbi.component.Bootstrap

public class BootstrapThread
extends AbstractThread
implements javax.jbi.component.Bootstrap

The installer thread.

This thread is used by the Installer component to have each component in a separate bootstrap environment.

Author:
Adrien Louis - EBM WebSourcing, Christophe Hamerling - EBM WebSourcing

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
static String CLEANUP
           
static String EXTMBEAN
           
static String INIT
           
static String INSTALL
           
static String UNINSTALL
           
 
Fields inherited from class org.ow2.petals.microkernel.api.container.thread.AbstractThread
jbiException, logger, requestQueue, responseQueue, SHUTDOWNTHREAD, timeout
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
BootstrapThread(String installerName, javax.jbi.component.Bootstrap jbiBootstrap, long taskTimeout, LoggingUtil logger)
          Creates a new instance of BootstrapThread
 
Method Summary
 void cleanUp()
           
protected  boolean doTask(String action)
          Process the requested task in the dedicated thread.
 ObjectName getExtensionMBeanName()
           
 void init(javax.jbi.component.InstallationContext installContext)
           
 void onInstall()
           
 void onUninstall()
           
 
Methods inherited from class org.ow2.petals.microkernel.api.container.thread.AbstractThread
execute, run, shutdownThread
 
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
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INSTALL

public static final String INSTALL
See Also:
Constant Field Values

UNINSTALL

public static final String UNINSTALL
See Also:
Constant Field Values

INIT

public static final String INIT
See Also:
Constant Field Values

CLEANUP

public static final String CLEANUP
See Also:
Constant Field Values

EXTMBEAN

public static final String EXTMBEAN
See Also:
Constant Field Values
Constructor Detail

BootstrapThread

public BootstrapThread(String installerName,
                       javax.jbi.component.Bootstrap jbiBootstrap,
                       long taskTimeout,
                       LoggingUtil logger)
Creates a new instance of BootstrapThread

Parameters:
installer -
jbiBootstrap -
Method Detail

doTask

protected boolean doTask(String action)
Process the requested task in the dedicated thread.

Specified by:
doTask in class AbstractThread
Parameters:
action - the task to execute
Returns:
true if the thread needs to continue, false if shutdown is required

cleanUp

public void cleanUp()
             throws javax.jbi.JBIException
Specified by:
cleanUp in interface javax.jbi.component.Bootstrap
Throws:
javax.jbi.JBIException

getExtensionMBeanName

public ObjectName getExtensionMBeanName()
Specified by:
getExtensionMBeanName in interface javax.jbi.component.Bootstrap

init

public void init(javax.jbi.component.InstallationContext installContext)
          throws javax.jbi.JBIException
Specified by:
init in interface javax.jbi.component.Bootstrap
Throws:
javax.jbi.JBIException

onInstall

public void onInstall()
               throws javax.jbi.JBIException
Specified by:
onInstall in interface javax.jbi.component.Bootstrap
Throws:
javax.jbi.JBIException

onUninstall

public void onUninstall()
                 throws javax.jbi.JBIException
Specified by:
onUninstall in interface javax.jbi.component.Bootstrap
Throws:
javax.jbi.JBIException


Copyright © 2005-2015 Linagora. All Rights Reserved.