Interface PlatformManager


  • public interface PlatformManager
    • Method Detail

      • registerPlatform

        PlatformRegistration registerPlatform​(java.util.function.Consumer<Platform.Builder> consumer)
        Registers a platform in the system, and automatically connects to it. Registration may only occur if a system platform has not yet been assigned.
        Parameters:
        consumer - Platform building function connection to call for registration.
        Returns:
        Platform instance.
      • unregisterPlatform

        void unregisterPlatform​(PlatformRegistration registration)
        Unregisters a platform registration from the system.
        Parameters:
        registration - Platform registration instance to unregister.
      • getPlatforms

        java.util.Collection<Platform> getPlatforms()
        Gets a list of system platforms in the system.
        Returns:
        Immutable list of system platforms.
      • getPlatformById

        default Platform getPlatformById​(java.lang.String id)
        Gets a platform by its ID.
        Parameters:
        id - Platform ID.
        Returns:
        Platform instance if found, null otherwise.
      • getPlatformByName

        default Platform getPlatformByName​(java.lang.String name)
        Gets a platform by its name.
        Parameters:
        name - Platform name.
        Returns:
        Platform instance if found, null otherwise.
      • getPlatformsByPlugin

        default java.util.Collection<Platform> getPlatformsByPlugin​(Plugin plugin)
        Gets all platforms assigned to a specific Plugin instance.
        Parameters:
        plugin - Plugin instance to search for.
        Returns:
        Platform instances assigned ot the specified Plugin instance.