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 Classes Modifier and Type Class Description static interfaceFederatedQueueConsumerImpl.ClientSessionCallback
-
Field Summary
-
Fields inherited from interface org.apache.activemq.artemis.core.server.federation.FederatedQueueConsumer
FEDERATION_NAME, FEDERATION_UPSTREAM_NAME
-
-
Constructor Summary
Constructors Constructor Description FederatedQueueConsumerImpl(Federation federation, ActiveMQServer server, Transformer transformer, FederatedConsumerKey key, FederationUpstream upstream, FederatedQueueConsumerImpl.ClientSessionCallback clientSessionCallback)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbeforeReconnect(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.intdecrementCount()ClientSessiongetClientSession()FederationgetFederation()FederationUpstreamgetFederationUpstream()FederatedConsumerKeygetKey()intincrementCount()voidonMessage(ClientMessage clientMessage)Notifies the MessageHandler that a message has been received.voidstart()
-
-
-
Constructor Detail
-
FederatedQueueConsumerImpl
public FederatedQueueConsumerImpl(Federation federation, ActiveMQServer server, Transformer transformer, FederatedConsumerKey key, FederationUpstream upstream, FederatedQueueConsumerImpl.ClientSessionCallback clientSessionCallback)
-
-
Method Detail
-
getFederationUpstream
public FederationUpstream getFederationUpstream()
- Specified by:
getFederationUpstreamin interfaceFederatedQueueConsumer
-
getFederation
public Federation getFederation()
- Specified by:
getFederationin interfaceFederatedQueueConsumer
-
getKey
public FederatedConsumerKey getKey()
- Specified by:
getKeyin interfaceFederatedQueueConsumer
-
getClientSession
public ClientSession 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
public void onMessage(ClientMessage clientMessage)
Description copied from interface:MessageHandlerNotifies the MessageHandler that a message has been received.- Specified by:
onMessagein interfaceMessageHandler- Parameters:
clientMessage- a message
-
connectionFailed
public void connectionFailed(ActiveMQException exception, boolean failedOver)
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
public void beforeReconnect(ActiveMQException exception)
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
-
-