Class AMQPFederationGenericConsumerInfo
java.lang.Object
org.apache.activemq.artemis.protocol.amqp.connect.federation.AMQPFederationGenericConsumerInfo
- All Implemented Interfaces:
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 FederationConsumerInfo
FederationConsumerInfo.Role -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAMQPFederationGenericConsumerInfo(FederationConsumerInfo.Role role, String address, String queueName, RoutingType routingType, String filterString, String fqqn, int priority) -
Method Summary
Modifier and TypeMethodDescriptionbuild(String address, String queueName, RoutingType routingType, String filterString, Federation federation, FederationReceiveFromAddressPolicy policy) Factory for creating federation address consumer information objects from server resources.booleanGets the address that will be used for this federation consumer instance.Gets the filter string that will be used when creating the remote consumer.getFqqn()Gets the FQQN that comprises the address and queue where the remote consumer will be attached.getId()Returns a unique Id for the consumer being represented.intGets the priority value that will be requested for the remote consumer that is created.Gets the queue name that will be used for this federation consumer instance.getRole()Returns the type of federation consumer being represented.Gets the routing type that will be requested when creating a consumer on the remote server.inthashCode()toString()
-
Field Details
-
FEDERATED_QUEUE_PREFIX
- See Also:
-
QUEUE_NAME_FORMAT_STRING
- See Also:
-
-
Constructor Details
-
AMQPFederationGenericConsumerInfo
public AMQPFederationGenericConsumerInfo(FederationConsumerInfo.Role role, String address, String queueName, RoutingType routingType, String filterString, String fqqn, int priority)
-
-
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 parentFederationthat this federation consumer is created forpolicy- TheFederationReceiveFromAddressPolicythat triggered this information object to be created.- Returns:
- a newly created and configured
FederationConsumerInfoinstance
-
getId
Description copied from interface:FederationConsumerInfoReturns a unique Id for the consumer being represented.- Specified by:
getIdin interfaceFederationConsumerInfo- Returns:
- a unique Id for the consumer being represented
-
getRole
Description copied from interface:FederationConsumerInfoReturns the type of federation consumer being represented.- Specified by:
getRolein interfaceFederationConsumerInfo- Returns:
- the type of federation consumer being represented
-
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
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
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
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
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
-
equals
-
hashCode
-
toString
-