Package org.opentcs.access

# Interface SharedKernelServicePortalProvider

    public interface SharedKernelServicePortalProvider

Pools access to a `KernelServicePortal` instance for multiple clients.

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `java.lang.String` | `getPortalDescription()` | Returns a description for the portal currently being shared.
  `boolean` | `portalShared()` | Checks whether a kernel reference is currently being shared.
  `SharedKernelServicePortal` | `register()` | Creates and registers a new client with this access pool.

- ## Method Details

  - ### register

    SharedKernelServicePortal register() throws ServiceUnavailableException
    Creates and registers a new client with this access pool. This is a convenience method that supports try-with-ressources and does not require a preexisting client.
    Returns:
      The `SharedKernelServicePortal`.
    Throws:
      `ServiceUnavailableException` - in case of connection falure with the portal.

  - ### portalShared

    boolean portalShared()
    Checks whether a kernel reference is currently being shared.
    Returns:
      `true` if, and only if, a portal reference is currently being shared, meaning that at least one client is registered and a usable portal reference exists.

  - ### getPortalDescription

    java.lang.String getPortalDescription()
    Returns a description for the portal currently being shared.
    Returns:
      A description for the portal currently being shared, or the empty string, if none is currently being shared.