Class ManagedHostBindings

java.lang.Object
org.j7m.middleware.application.components.ManagedHostBindings

public final class ManagedHostBindings extends Object
Immutable bounded capabilities registered by trusted host setup, never by application metadata. A dependency selects exactly one registered primary attribute. Factories validate all metadata before any component constructor runs. Returned application values remain borrowed; the container owns each BoundValue and closes it once on failed activation or shutdown.
  • Constructor Details

    • ManagedHostBindings

      public ManagedHostBindings(Map<String, ? extends ManagedHostBindings.Factory> factories)
      Registers at most32 explicit primary attributes such as context.kind or service.name.
      Parameters:
      factories - nonnull immutable snapshot of trusted integration capabilities
      Throws:
      IllegalArgumentException - for invalid or excessive attributes
      NullPointerException - for null map, keys or factories
  • Method Details

    • empty

      public static ManagedHostBindings empty()
      Returns a registry granting no host integrations.
      Returns:
      immutable empty registry
    • with

      public ManagedHostBindings with(String primaryAttribute, ManagedHostBindings.Factory factory)
      Adds one explicit capability to a new registry, rejecting replacement of an existing capability.
      Parameters:
      primaryAttribute - exact primary attribute
      factory - trusted host integration
      Returns:
      new bounded immutable registry
      Throws:
      IllegalArgumentException - for duplicate or invalid attributes
    • supports

      public boolean supports(String primaryAttribute)
      Reports whether trusted host setup installed one primary integration capability. This observation grants no authority and does not validate application metadata.
      Parameters:
      primaryAttribute - exact integration attribute
      Returns:
      whether a factory was explicitly registered