Package com.tick42.glue.desktop.applications

# Interface ApplicationManager

    public interface ApplicationManager

Application Manager API. Used to manipulate Glue Desktop applications.

See Also:
  `Glue.appManager()`

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `Map<String,​Map<String,​Object>>` | `applications()` | Returns configurations for all available applications.
  `Collection<ApplicationInstance>` | `instances()` | This method shows all open application with their startup options.
  `CompletionStage<AsynchronousCloseable>` | `registerInstanceHandler​(String applicationName, ApplicationInstanceHandler handler)` | Registers a handler function to be executed when child application instance is started.
  `default CompletionStage<ApplicationInstance>` | `start​(String applicationName)` | Start an application by specified name.
  `CompletionStage<ApplicationInstance>` | `start​(String applicationName, Map<String,​Object> context)` | Start an application instance by specified name and context.

- ## Method Details

  - ### applications

    Map<String,​Map<String,​Object>> applications()
    Returns configurations for all available applications. They keyed by application name.
    Returns:
      a map with available application configurations keyed by application name, never `null`

  - ### instances

    Collection<ApplicationInstance> instances()
    This method shows all open application with their startup options. The map's keys are the names of the applications.
    Returns:
      collection with all running application instances, never `null`

  - ### start

    CompletionStage<ApplicationInstance> start​(String applicationName, Map<String,​Object> context)
    Start an application instance by specified name and context.
    Parameters:
      `applicationName` - identifying name for the application
      `context` - starting context specification
    Returns:
      a stage that completes when application instance is started, never `null`

  - ### start

    default CompletionStage<ApplicationInstance> start​(String applicationName)
    Start an application by specified name.
    Parameters:
      `applicationName` - identifying name for the application
    Returns:
      a stage that completes when the application instance is started, never `null`

  - ### registerInstanceHandler

    CompletionStage<AsynchronousCloseable> registerInstanceHandler​(String applicationName, ApplicationInstanceHandler handler)
    Registers a handler function to be executed when child application instance is started.
    Parameters:
      `applicationName` - The application name, must not be `null`
      `handler` - The application instance handler, must not be `null`
    Returns:
      A stage that completes when the handler is registered, never `null`
    Since:
      1.4.2