T - The concrete console implementationpublic abstract class AbstractConsole<T extends AbstractConsole> extends Object implements Console<T>
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
configured |
protected String |
externalConfigurationPath |
protected org.slf4j.Logger |
logger |
protected String |
name |
protected NinjaMode |
ninjaMode |
protected NinjaPropertiesImpl |
ninjaProperties |
protected OverlayedNinjaProperties |
overlayedNinjaProperties |
protected boolean |
started |
| Constructor and Description |
|---|
AbstractConsole(String name) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkConfigured() |
protected void |
checkNotConfigured() |
protected void |
checkStarted() |
T |
configure()
Configures the standalone to prepare for being started.
|
protected abstract void |
doConfigure() |
protected void |
doPostConfigure() |
protected void |
doPreConfigure() |
protected abstract void |
doShutdown() |
protected abstract void |
doStart() |
T |
externalConfigurationPath(String externalConfigurationPath) |
String |
getExternalConfigurationPath() |
String |
getName() |
NinjaMode |
getNinjaMode() |
NinjaPropertiesImpl |
getNinjaProperties()
Gets the NinjaProperties that were used to configure Ninja.
|
protected void |
logStarted() |
T |
name(String name) |
T |
ninjaMode(NinjaMode ninjaMode) |
T |
shutdown()
Shutdown Ninja and underlying server as safely as possible (tries not
to cause exceptions to be thrown).
|
T |
start()
Configures (if not yet done), boots Ninja application and starts the
underlying server.
|
protected Exception |
tryToUnwrapInjectorException(Exception exception) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetInjectorprotected final org.slf4j.Logger logger
protected NinjaMode ninjaMode
protected String externalConfigurationPath
protected String name
protected boolean configured
protected boolean started
protected NinjaPropertiesImpl ninjaProperties
protected OverlayedNinjaProperties overlayedNinjaProperties
public AbstractConsole(String name)
public final T configure() throws Exception
Consoleconfigure in interface Console<T extends AbstractConsole>Exception - Thrown if an exception occurs during configurationpublic final T start() throws Exception
Consolestart in interface Console<T extends AbstractConsole>Exception - Thrown if an exception occurs during Ninja boot or
server startpublic final T shutdown()
Consoleshutdown in interface Console<T extends AbstractConsole>protected abstract void doShutdown()
protected void logStarted()
protected void checkNotConfigured()
protected void checkConfigured()
protected void checkStarted()
public NinjaMode getNinjaMode()
getNinjaMode in interface Console<T extends AbstractConsole>public T ninjaMode(NinjaMode ninjaMode)
ninjaMode in interface Console<T extends AbstractConsole>public String getExternalConfigurationPath()
getExternalConfigurationPath in interface Console<T extends AbstractConsole>public T externalConfigurationPath(String externalConfigurationPath)
externalConfigurationPath in interface Console<T extends AbstractConsole>public String getName()
getName in interface Console<T extends AbstractConsole>public NinjaPropertiesImpl getNinjaProperties()
ConsolegetNinjaProperties in interface Console<T extends AbstractConsole>Copyright © 2019 ninjaframework. All rights reserved.