Interface Console<T extends Console>

    • Method Detail

      • configure

        T configure()
             throws Exception
        Configures the standalone to prepare for being started.
        Returns:
        This standalone
        Throws:
        Exception - Thrown if an exception occurs during configuration
      • externalConfigurationPath

        T externalConfigurationPath​(String externalConfigurationPath)
      • getExternalConfigurationPath

        Optional<String> getExternalConfigurationPath()
      • getInjector

        com.google.inject.Injector getInjector()
        Gets the Guice injector that booted the Ninja application. This value is only accessible after start() is successfully called.
        Returns:
        The guice injector
        Throws:
        IllegalStateException - Thrown if attempting to access this variable before start() is successfully called.
      • getNinjaProperties

        NinjaPropertiesImpl getNinjaProperties()
        Gets the NinjaProperties that were used to configure Ninja. This value is only accessible after configure() is successfully called.
        Returns:
        The NinjaProperties implementation
        Throws:
        IllegalStateException - Thrown if attempting to access this variable before configure() is successfully called.
      • overrideModule

        T overrideModule​(com.google.inject.Module module)
        Override Guice module bindings as described here: https://google.github.io/guice/api-docs/3.0/javadoc/com/google/inject/util/Modules.html
        Parameters:
        module - Any bindings in this bindings will override all other bindings. This is very useful in tests.
        Returns:
        this instance for chaining
      • overrideProperties

        T overrideProperties​(Map<String,​String> properties)
        Override specific properties programmatically.
        Parameters:
        properties - Any properties in this map will override properties in any configuration file. This is very useful in tests.
        Returns:
        this instance for chaining
      • shutdown

        T shutdown()
        Shutdown Ninja and underlying server as safely as possible (tries not to cause exceptions to be thrown).
        Returns:
        This standalone
      • start

        T start()
         throws Exception
        Configures (if not yet done), boots Ninja application and starts the underlying server.
        Returns:
        This standalone
        Throws:
        Exception - Thrown if an exception occurs during Ninja boot or server start