Class ApplicationBoot<Config extends ApplicationConfiguration,Context extends ApplicationContext<Config,Context>>
- java.lang.Object
-
- org.nuiton.jaxx.runtime.application.ApplicationBoot<Config,Context>
-
public final class ApplicationBoot<Config extends ApplicationConfiguration,Context extends ApplicationContext<Config,Context>> extends Object
This class is entry point of an application.It contains a shared instance which is automatically initialized when the first instance of class in created.
Nobody is allowed to modify this instance.
Created by tchemit on 26/01/2018.
- Author:
- Tony Chemit - dev@tchemit.fr
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classApplicationBoot.ApplicationThreadFactory
-
Field Summary
Fields Modifier and Type Field Description static StringBOOT_LOG_PREFIX
-
Method Summary
-
-
-
Field Detail
-
BOOT_LOG_PREFIX
public static String BOOT_LOG_PREFIX
-
-
Method Detail
-
create
public static <Config extends ApplicationConfiguration,Context extends ApplicationContext<Config,Context>> ApplicationBoot<Config,Context> create(ApplicationBootInitializer<Config,Context> initializer)
Method to create a new boot.- Type Parameters:
Config- config typeContext- context type- Parameters:
initializer- application initializer- Returns:
- new boot
- Throws:
IllegalStateException- if boot was already instantiate
-
unlockBoot
public static void unlockBoot()
-
handlingError
public static void handlingError(Exception e)
-
initializer
public static ApplicationBootInitializer initializer()
-
initializer
public static <C extends ApplicationBootInitializer> C initializer(Class<C> contextType)
-
boot
public static ApplicationBoot<?,?> boot()
-
cleanMemory
public static void cleanMemory()
-
newInstanceWithParams
public static <O> O newInstanceWithParams(Class<O> type, Object... constructorParams)
-
startInThread
public void startInThread()
-
start
public void start()
-
restart
public void restart()
-
shutdown
public void shutdown()
-
getThreadFactory
public ApplicationBoot.ApplicationThreadFactory getThreadFactory()
-
getContext
public Context getContext()
-
getConfiguration
public Config getConfiguration()
-
isClosed
public boolean isClosed()
-
checkNotClosed
public void checkNotClosed(String stateName)
-
finalize
protected final void finalize() throws Throwable
-
isClosing
public boolean isClosing()
-
close
public void close()
-
getThreadPoolExecutor
public ThreadPoolExecutor getThreadPoolExecutor()
-
-