Class AMQPFederationAddressConsumer
- java.lang.Object
-
- org.apache.activemq.artemis.protocol.amqp.connect.federation.AMQPFederationAddressConsumer
-
- All Implemented Interfaces:
FederationConsumer,FederationConsumerInternal
public class AMQPFederationAddressConsumer extends Object implements FederationConsumerInternal
Consumer implementation for Federated Addresses that receives from a remote AMQP peer and forwards those messages onto the internal broker Address for consumption by an attached consumers.
-
-
Constructor Summary
Constructors Constructor Description AMQPFederationAddressConsumer(AMQPFederation federation, AMQPFederationConsumerConfiguration configuration, AMQPSessionContext session, FederationConsumerInfo consumerInfo, FederationReceiveFromAddressPolicy policy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close the federation consumer instance and cleans up its resources.FederationConsumerInfogetConsumerInfo()FederationgetFederation()FederationReceiveFromAddressPolicygetPolicy()protected booleanremoteLinkClosedInterceptor(org.apache.qpid.proton.engine.Link link)AMQPFederationAddressConsumersetRemoteClosedHandler(Consumer<FederationConsumerInternal> handler)Provides and event point for notification of the consumer having been closed by the remote.voidstart()Starts the consumer instance which includes creating the remote resources and performing any internal initialization needed to fully establish the consumer instance.
-
-
-
Constructor Detail
-
AMQPFederationAddressConsumer
public AMQPFederationAddressConsumer(AMQPFederation federation, AMQPFederationConsumerConfiguration configuration, AMQPSessionContext session, FederationConsumerInfo consumerInfo, FederationReceiveFromAddressPolicy policy)
-
-
Method Detail
-
getFederation
public Federation getFederation()
- Specified by:
getFederationin interfaceFederationConsumer- Returns:
- the
Federationthat this consumer operates under.
-
getConsumerInfo
public FederationConsumerInfo getConsumerInfo()
- Specified by:
getConsumerInfoin interfaceFederationConsumer- Returns:
- an information object that defines the characteristics of the
FederationConsumer
-
getPolicy
public FederationReceiveFromAddressPolicy getPolicy()
- Returns:
- the
FederationReceiveFromAddressPolicythat initiated this consumer.
-
start
public void start()
Description copied from interface:FederationConsumerInternalStarts the consumer instance which includes creating the remote resources and performing any internal initialization needed to fully establish the consumer instance. This call should not block and any errors encountered on creation of the backing consumer resources should utilize the error handling mechanisms of thisFederationinstance.- Specified by:
startin interfaceFederationConsumerInternal
-
close
public void close()
Description copied from interface:FederationConsumerInternalClose the federation consumer instance and cleans up its resources. This method should not block and the actual resource shutdown work should occur asynchronously.- Specified by:
closein interfaceFederationConsumerInternal
-
setRemoteClosedHandler
public AMQPFederationAddressConsumer setRemoteClosedHandler(Consumer<FederationConsumerInternal> handler)
Description copied from interface:FederationConsumerInternalProvides and event point for notification of the consumer having been closed by the remote.- Specified by:
setRemoteClosedHandlerin interfaceFederationConsumerInternal- Parameters:
handler- The handler that will be invoked when the remote closes this consumer.- Returns:
- this consumer instance.
-
remoteLinkClosedInterceptor
protected boolean remoteLinkClosedInterceptor(org.apache.qpid.proton.engine.Link link)
-
-