Class AMQPFederationGenericConsumerInfo

java.lang.Object
org.apache.activemq.artemis.protocol.amqp.connect.federation.AMQPFederationGenericConsumerInfo
All Implemented Interfaces:
FederationConsumerInfo

public class AMQPFederationGenericConsumerInfo extends Object implements FederationConsumerInfo
Information and identification class for Federation consumers created to federate queues and addresses. Instances of this class should be usable in Collections classes where equality and hashing support is needed.
  • Field Details

  • Constructor Details

  • Method Details

    • build

      public static AMQPFederationGenericConsumerInfo build(String address, String queueName, RoutingType routingType, String filterString, Federation federation, FederationReceiveFromAddressPolicy policy)
      Factory for creating federation address consumer information objects from server resources.
      Parameters:
      address - The address being federated, the remote consumer will be created under this address.
      queueName - The name of the remote queue that will be created in order to route messages here.
      routingType - The routing type to assign the remote consumer.
      filterString - A filter string used by the federation instance to limit what enters the remote queue.
      federation - The parent Federation that this federation consumer is created for
      policy - The FederationReceiveFromAddressPolicy that triggered this information object to be created.
      Returns:
      a newly created and configured FederationConsumerInfo instance
    • getId

      public String getId()
      Description copied from interface: FederationConsumerInfo
      Returns a unique Id for the consumer being represented.
      Specified by:
      getId in interface FederationConsumerInfo
      Returns:
      a unique Id for the consumer being represented
    • getRole

      public FederationConsumerInfo.Role getRole()
      Description copied from interface: FederationConsumerInfo
      Returns the type of federation consumer being represented.
      Specified by:
      getRole in interface FederationConsumerInfo
      Returns:
      the type of federation consumer being represented
    • getQueueName

      public String getQueueName()
      Description copied from interface: FederationConsumerInfo
      Gets the queue name that will be used for this federation consumer instance.

      For Queue federation this will be the name of the queue whose messages are being federated to this server instance. For an Address federation this will be an automatically generated name that should be unique to a given federation instance

      Specified by:
      getQueueName in interface FederationConsumerInfo
      Returns:
      the queue name associated with the federation consumer
    • getAddress

      public String getAddress()
      Description copied from interface: FederationConsumerInfo
      Gets the address that will be used for this federation consumer instance.

      For Queue federation this is the address under which the matching queue must reside. For Address federation this is the actual address whose messages are being federated.

      Specified by:
      getAddress in interface FederationConsumerInfo
      Returns:
      the address associated with this federation consumer
    • getFqqn

      public String getFqqn()
      Description copied from interface: FederationConsumerInfo
      Gets the FQQN that comprises the address and queue where the remote consumer will be attached.
      Specified by:
      getFqqn in interface FederationConsumerInfo
      Returns:
      provides the FQQN that can be used to address the consumer queue directly
    • getRoutingType

      public RoutingType getRoutingType()
      Description copied from interface: FederationConsumerInfo
      Gets the routing type that will be requested when creating a consumer on the remote server.
      Specified by:
      getRoutingType in interface FederationConsumerInfo
      Returns:
      the routing type of the remote consumer
    • getFilterString

      public String getFilterString()
      Description copied from interface: FederationConsumerInfo
      Gets the filter string that will be used when creating the remote consumer.

      For Queue federation this will be the filter that exists on the local queue that is requesting federation of messages from the remote. For address federation this filter will be used to restrict some movement of messages amongst federated server addresses.

      Specified by:
      getFilterString in interface FederationConsumerInfo
      Returns:
      the filter string in use for the federation consumer
    • getPriority

      public int getPriority()
      Description copied from interface: FederationConsumerInfo
      Gets the priority value that will be requested for the remote consumer that is created.
      Specified by:
      getPriority in interface FederationConsumerInfo
      Returns:
      the assigned consumer priority for the federation consumer
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object