Class FederatedQueueConsumerImpl
java.lang.Object
org.apache.activemq.artemis.core.server.federation.FederatedQueueConsumerImpl
- All Implemented Interfaces:
MessageHandler,SessionFailureListener,FailureListener,FederatedQueueConsumer
public class FederatedQueueConsumerImpl
extends Object
implements FederatedQueueConsumer, SessionFailureListener
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface -
Field Summary
Fields inherited from interface org.apache.activemq.artemis.core.server.federation.FederatedQueueConsumer
FEDERATION_NAME, FEDERATION_UPSTREAM_NAME -
Constructor Summary
ConstructorsConstructorDescriptionFederatedQueueConsumerImpl(Federation federation, ActiveMQServer server, Transformer transformer, FederatedConsumerKey key, FederationUpstream upstream, FederatedQueueConsumerImpl.ClientSessionCallback clientSessionCallback) -
Method Summary
Modifier and TypeMethodDescriptionvoidbeforeReconnect(ActiveMQException exception) Notifies that a connection has failed due to the specified exception.voidclose()voidconnectionFailed(ActiveMQException exception, boolean failedOver) Notifies that a connection has failed due to the specified exception.voidconnectionFailed(ActiveMQException exception, boolean failedOver, String scaleDownTargetNodeID) Notifies that a connection has failed due to the specified exception.intgetKey()intvoidonMessage(ClientMessage clientMessage) Notifies the MessageHandler that a message has been received.voidstart()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.activemq.artemis.api.core.client.MessageHandler
onMessageExpired
-
Constructor Details
-
FederatedQueueConsumerImpl
public FederatedQueueConsumerImpl(Federation federation, ActiveMQServer server, Transformer transformer, FederatedConsumerKey key, FederationUpstream upstream, FederatedQueueConsumerImpl.ClientSessionCallback clientSessionCallback)
-
-
Method Details
-
getFederationUpstream
- Specified by:
getFederationUpstreamin interfaceFederatedQueueConsumer
-
getFederation
- Specified by:
getFederationin interfaceFederatedQueueConsumer
-
getKey
- Specified by:
getKeyin interfaceFederatedQueueConsumer
-
getClientSession
- Specified by:
getClientSessionin interfaceFederatedQueueConsumer
-
incrementCount
public int incrementCount()- Specified by:
incrementCountin interfaceFederatedQueueConsumer
-
decrementCount
public int decrementCount()- Specified by:
decrementCountin interfaceFederatedQueueConsumer
-
start
public void start()- Specified by:
startin interfaceFederatedQueueConsumer
-
close
public void close()- Specified by:
closein interfaceFederatedQueueConsumer
-
onMessage
Description copied from interface:MessageHandlerNotifies the MessageHandler that a message has been received.- Specified by:
onMessagein interfaceMessageHandler- Parameters:
clientMessage- a message
-
connectionFailed
Description copied from interface:FailureListenerNotifies that a connection has failed due to the specified exception.- Specified by:
connectionFailedin interfaceFailureListener- Parameters:
exception- exception which has caused the connection to fail
-
connectionFailed
public void connectionFailed(ActiveMQException exception, boolean failedOver, String scaleDownTargetNodeID) Description copied from interface:FailureListenerNotifies that a connection has failed due to the specified exception.- Specified by:
connectionFailedin interfaceFailureListener- Parameters:
exception- exception which has caused the connection to failscaleDownTargetNodeID- the ID of the node to which messages are scaling down
-
beforeReconnect
Description copied from interface:SessionFailureListenerNotifies that a connection has failed due to the specified exception.This method is called before the session attempts to reconnect/failover.
- Specified by:
beforeReconnectin interfaceSessionFailureListener- Parameters:
exception- exception which has caused the connection to fail
-
getCurrentConnectTask
-