Class AMQPFederationSource
java.lang.Object
org.apache.activemq.artemis.protocol.amqp.connect.federation.AMQPFederation
org.apache.activemq.artemis.protocol.amqp.connect.federation.AMQPFederationSource
- All Implemented Interfaces:
Federation
This is the initiating side of a broker federation that occurs over an AMQP broker connection.
This endpoint will create a control link to the remote peer that is a sender of federation commands which can be used to instruct the remote to initiate federation operations back to this peer over the same connection and without the need for local configuration.
-
Field Summary
Fields inherited from class AMQPFederation
connected, connection, eventDispatcher, eventProcessor, FEDERATION_INSTANCE_RECORD, linkClosedinterceptors, localAddressPolicyManagers, localQueuePolicyManagers, metrics, name, remoteAddressPolicyManagers, remoteQueuePolicyManagers, scheduler, server, session, state, wildcardConfiguration -
Constructor Summary
ConstructorsConstructorDescriptionAMQPFederationSource(String name, Map<String, Object> properties, AMQPBrokerConnection connection) Creates a new AMQP Federation instance that will manage the state of a single AMQP broker federation instance using an AMQP broker connection as the IO channel. -
Method Summary
Modifier and TypeMethodDescriptionaddRemoteAddressMatchPolicy(FederationReceiveFromAddressPolicy addressPolicy) Adds a newFederationReceiveFromAddressPolicyentry to the set of policies that the remote end of this federation will use to create demand on the this server when local demand is present.Adds a newFederationReceiveFromQueuePolicyentry to the set of policies that the remote end of this federation will use to create demand on the this server when local demand is present.final voidCalled by the parent broker connection when the connection has failed and this federation should tear down any active resources and await a reconnect if one is allowed.final voidconnectionRestored(AMQPConnectionContext connection, AMQPSessionContext session) Called by the parent broker connection when the connection has been established and this federation should build up its active state based on the configuration.Returns theAMQPBrokerConnectionthat this federation is attached to.Returns the federation capabilities that is in effect following negotiation.Returns the federation configuration that is in effect.Returns the session context assigned to this federation instance.Returns the session context assigned to this federation instance.protected voidsignalError(Exception cause) Error signaling API that must be implemented by the specific federation implementation to handle errors encountered during normal operations.protected voidError signaling API that must be implemented by the specific federation implementation to handle error when creating a federation resource such as an outgoing receiver link.Methods inherited from class AMQPFederation
addAddressMatchPolicy, addLinkClosedInterceptor, addQueueMatchPolicy, getMetrics, getName, getRemoteAddressPolicyManager, getRemoteQueuePolicyManager, getScheduler, getServer, getWildcardConfiguration, handleFederationInitialized, handleFederationShutdown, handleFederationStarted, handleFederationStopped, initialize, invokeLinkClosedInterceptors, isConnected, isStarted, removeLinkClosedInterceptor, shutdown, signalFederationStarted, signalFederationStopped, start, stop
-
Constructor Details
-
AMQPFederationSource
public AMQPFederationSource(String name, Map<String, Object> properties, AMQPBrokerConnection connection) Creates a new AMQP Federation instance that will manage the state of a single AMQP broker federation instance using an AMQP broker connection as the IO channel.- Parameters:
name- The name of this federation instance.properties- A set of optional properties that provide additional configuration.connection- The broker connection over which this federation will occur.
-
-
Method Details
-
getBrokerConnection
Returns theAMQPBrokerConnectionthat this federation is attached to.- Returns:
- the
AMQPBrokerConnectionthat this federation is attached to
-
getSessionContext
Description copied from class:AMQPFederationReturns the session context assigned to this federation instance.- Specified by:
getSessionContextin classAMQPFederation- Returns:
- the session context assigned to this federation instance
-
getConnectionContext
Description copied from class:AMQPFederationReturns the session context assigned to this federation instance.- Specified by:
getConnectionContextin classAMQPFederation- Returns:
- the session context assigned to this federation instance
-
getConfiguration
Description copied from class:AMQPFederationReturns the federation configuration that is in effect.- Specified by:
getConfigurationin classAMQPFederation- Returns:
- the federation configuration that is in effect
-
getCapabilities
Description copied from class:AMQPFederationReturns the federation capabilities that is in effect following negotiation.- Specified by:
getCapabilitiesin classAMQPFederation- Returns:
- the federation capabilities that is in effect following negotiation
-
addRemoteQueueMatchPolicy
Adds a newFederationReceiveFromQueuePolicyentry to the set of policies that the remote end of this federation will use to create demand on the this server when local demand is present.- Parameters:
queuePolicy- The policy to add to the set of configuredFederationReceiveFromQueuePolicyinstance.- Returns:
- this
AMQPFederationSourceinstance
-
addRemoteAddressMatchPolicy
public AMQPFederationSource addRemoteAddressMatchPolicy(FederationReceiveFromAddressPolicy addressPolicy) Adds a newFederationReceiveFromAddressPolicyentry to the set of policies that the remote end of this federation will use to create demand on the this server when local demand is present.- Parameters:
addressPolicy- The policy to add to the set of configuredFederationReceiveFromAddressPolicyinstance.- Returns:
- this
AMQPFederationSourceinstance
-
connectionInterrupted
Called by the parent broker connection when the connection has failed and this federation should tear down any active resources and await a reconnect if one is allowed.- Throws:
ActiveMQException- if an error occurs processing the connection interrupted event
-
connectionRestored
public final void connectionRestored(AMQPConnectionContext connection, AMQPSessionContext session) throws ActiveMQException Called by the parent broker connection when the connection has been established and this federation should build up its active state based on the configuration.- Parameters:
connection- The newConnectionthat represents the currently active connection.session- The newSessionthat was created for use by broker connection resources.- Throws:
ActiveMQException- if an error occurs processing the connection restored event
-
signalResourceCreateError
Description copied from class:AMQPFederationError signaling API that must be implemented by the specific federation implementation to handle error when creating a federation resource such as an outgoing receiver link.- Specified by:
signalResourceCreateErrorin classAMQPFederation- Parameters:
cause- The error that caused the resource creation to fail.
-
signalError
Description copied from class:AMQPFederationError signaling API that must be implemented by the specific federation implementation to handle errors encountered during normal operations.- Specified by:
signalErrorin classAMQPFederation- Parameters:
cause- The error that caused the operation to fail.
-