Class FederationGenericConsumerInfo
- java.lang.Object
-
- org.apache.activemq.artemis.protocol.amqp.federation.internal.FederationGenericConsumerInfo
-
- All Implemented Interfaces:
FederationConsumerInfo
public class FederationGenericConsumerInfo 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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.activemq.artemis.protocol.amqp.federation.FederationConsumerInfo
FederationConsumerInfo.Role
-
-
Field Summary
Fields Modifier and Type Field Description static StringFEDERATED_QUEUE_PREFIXstatic StringQUEUE_NAME_FORMAT_STRING
-
Constructor Summary
Constructors Constructor Description FederationGenericConsumerInfo(FederationConsumerInfo.Role role, String address, String queueName, RoutingType routingType, String filterString, String fqqn, int priority)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FederationGenericConsumerInfobuild(String address, String queueName, RoutingType routingType, String filterString, Federation federation, FederationReceiveFromAddressPolicy policy)Factory for creating federation address consumer information objects from server resources.booleanequals(Object o)StringgetAddress()Gets the address that will be used for this federation consumer instance.StringgetFilterString()Gets the filter string that will be used when creating the remote consumer.StringgetFqqn()Gets the FQQN that comprises the address and queue where the remote consumer will be attached.StringgetId()intgetPriority()Gets the priority value that will be requested for the remote consumer that is created.StringgetQueueName()Gets the queue name that will be used for this federation consumer instance.FederationConsumerInfo.RolegetRole()RoutingTypegetRoutingType()Gets the routing type that will be requested when creating a consumer on the remote server.inthashCode()StringtoString()
-
-
-
Field Detail
-
FEDERATED_QUEUE_PREFIX
public static final String FEDERATED_QUEUE_PREFIX
- See Also:
- Constant Field Values
-
QUEUE_NAME_FORMAT_STRING
public static final String QUEUE_NAME_FORMAT_STRING
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
FederationGenericConsumerInfo
public FederationGenericConsumerInfo(FederationConsumerInfo.Role role, String address, String queueName, RoutingType routingType, String filterString, String fqqn, int priority)
-
-
Method Detail
-
build
public static FederationGenericConsumerInfo 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 parentFederationthat this federation consumer is created forpolicy- TheFederationReceiveFromAddressPolicythat triggered this information object to be created.- Returns:
- a newly created and configured
FederationConsumerInfoinstance.
-
getId
public String getId()
- Specified by:
getIdin interfaceFederationConsumerInfo- Returns:
- a unique Id for the consumer being represented.
-
getRole
public FederationConsumerInfo.Role getRole()
- Specified by:
getRolein interfaceFederationConsumerInfo- Returns:
- the type of federation consumer being represented.
-
getQueueName
public String getQueueName()
Description copied from interface:FederationConsumerInfoGets 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:
getQueueNamein interfaceFederationConsumerInfo- Returns:
- the queue name associated with the federation consumer
-
getAddress
public String getAddress()
Description copied from interface:FederationConsumerInfoGets 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:
getAddressin interfaceFederationConsumerInfo- Returns:
- the address associated with this federation consumer.
-
getFqqn
public String getFqqn()
Description copied from interface:FederationConsumerInfoGets the FQQN that comprises the address and queue where the remote consumer will be attached.- Specified by:
getFqqnin interfaceFederationConsumerInfo- Returns:
- provides the FQQN that can be used to address the consumer queue directly.
-
getRoutingType
public RoutingType getRoutingType()
Description copied from interface:FederationConsumerInfoGets the routing type that will be requested when creating a consumer on the remote server.- Specified by:
getRoutingTypein interfaceFederationConsumerInfo- Returns:
- the routing type of the remote consumer.
-
getFilterString
public String getFilterString()
Description copied from interface:FederationConsumerInfoGets 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:
getFilterStringin interfaceFederationConsumerInfo- Returns:
- the filter string in use for the federation consumer.
-
getPriority
public int getPriority()
Description copied from interface:FederationConsumerInfoGets the priority value that will be requested for the remote consumer that is created.- Specified by:
getPriorityin interfaceFederationConsumerInfo- Returns:
- the assigned consumer priority for the federation consumer.
-
-