Class EsbInstanceMetaData

java.lang.Object
com.kingsrook.qqq.esb.model.EsbInstanceMetaData
All Implemented Interfaces:
MetaDataProducerOutput, QMetaDataObject, QSupplementalInstanceMetaData, TopLevelMetaDataInterface, Serializable

public class EsbInstanceMetaData extends Object implements QSupplementalInstanceMetaData
Instance-level ESB meta-data: the providers (brokers) and destinations (queues and topics) that tables and processes publish to and trigger from, and the instance name that identifies this application in the source of the events it publishes. Supplemental instance meta-data is included in the frontend meta-data output, so the providers and destinations (with urls and credentials), and the instance name, are excluded from JSON serialization. The UI reads ESB details through the permission-checked ESB endpoints instead.
See Also:
  • Field Details

  • Constructor Details

    • EsbInstanceMetaData

      public EsbInstanceMetaData()
  • Method Details

    • of

      public static EsbInstanceMetaData of(QInstance qInstance)
      Get the ESB meta-data on an instance - creating (and adding) it if the instance doesn't have any yet.
    • getName

      public String getName()
      Specified by:
      getName in interface TopLevelMetaDataInterface
    • enrich

      public void enrich(QInstance qInstance)
      Interpret ${env.*} (etc.) variables in each provider's connection fields, and register the table and process publishing listeners and trigger runtime service once, however many times the instance is enriched.
      Specified by:
      enrich in interface QSupplementalInstanceMetaData
    • validate

      public void validate(QInstance qInstance, QInstanceValidator validator)
      Validate providers and destinations, and that topic triggers' subscription names are unique per provider. (Publications and each trigger's own fields are validated by EsbTableMetaData and EsbProcessMetaData.)
      Specified by:
      validate in interface QSupplementalInstanceMetaData
    • getProvider

      public QEsbProviderMetaData getProvider(String name)
      Get a provider by name - or null if not found.
    • withProvider

      public EsbInstanceMetaData withProvider(QEsbProviderMetaData provider)
      Fluent setter to add a provider (keyed by its name). Throws IllegalArgumentException if a provider with that name was already added (as QInstance does for a second table, process, etc).
    • getDestination

      public QEsbDestinationMetaData getDestination(String name)
      Get a destination by name - or null if not found.
    • withDestination

      public EsbInstanceMetaData withDestination(QEsbDestinationMetaData destination)
      Fluent setter to add a destination (keyed by its name). Throws IllegalArgumentException if a destination with that name was already added (as QInstance does for a second table, process, etc).
    • getInstanceName

      public String getInstanceName()
      Getter for instanceName: the name that identifies this application in the source of the events it publishes (qqq://instanceName/table/order). When null, sources have an empty authority (qqq:///table/order). Not serialized (see class comment).
    • setInstanceName

      public void setInstanceName(String instanceName)
      Setter for instanceName
    • withInstanceName

      public EsbInstanceMetaData withInstanceName(String instanceName)
      Fluent setter for instanceName
    • getProviders

      public Map<String,QEsbProviderMetaData> getProviders()
      Getter for providers - not serialized (they hold urls and credentials).
    • setProviders

      public void setProviders(Map<String,QEsbProviderMetaData> providers)
      Setter for providers
    • getDestinations

      public Map<String,QEsbDestinationMetaData> getDestinations()
      Getter for destinations - not serialized (see class comment).
    • setDestinations

      public void setDestinations(Map<String,QEsbDestinationMetaData> destinations)
      Setter for destinations
    • getRealtimeDestinationName

      public String getRealtimeDestinationName()
      Getter for realtimeDestinationName
    • setRealtimeDestinationName

      public void setRealtimeDestinationName(String realtimeDestinationName)
      Setter for realtimeDestinationName
    • withRealtimeDestinationName

      public EsbInstanceMetaData withRealtimeDestinationName(String realtimeDestinationName)
      Fluent setter for realtimeDestinationName