Class ProtonProtocolManager
java.lang.Object
org.apache.activemq.artemis.spi.core.protocol.AbstractProtocolManager<AMQPMessage, AmqpInterceptor, ActiveMQProtonRemotingConnection, AMQPRoutingHandler>
org.apache.activemq.artemis.protocol.amqp.broker.ProtonProtocolManager
- All Implemented Interfaces:
org.apache.activemq.artemis.core.server.management.NotificationListener, ProtocolManager<AmqpInterceptor, AMQPRoutingHandler>
- Direct Known Subclasses:
ProtonClientProtocolManager
public class ProtonProtocolManager
extends AbstractProtocolManager<AMQPMessage, AmqpInterceptor, ActiveMQProtonRemotingConnection, AMQPRoutingHandler>
implements org.apache.activemq.artemis.core.server.management.NotificationListener
A proton protocol manager, basically reads the Proton Input and maps proton resources to ActiveMQ Artemis resources
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionProtonProtocolManager(ProtonProtocolManagerFactory factory, org.apache.activemq.artemis.core.server.ActiveMQServer server, List<BaseInterceptor> incomingInterceptors, List<BaseInterceptor> outgoingInterceptors) -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidaddChannelHandlers(io.netty.channel.ChannelPipeline pipeline) for outgoingcreateConnectionEntry(Acceptor acceptorUsed, Connection remotingConnection) createOutgoingConnectionEntry(Connection remotingConnection) This method is not part of the ProtocolManager interface because it only makes sense on AMQP.createOutgoingConnectionEntry(Connection remotingConnection, ClientSASLFactory saslFactory) createOutgoingConnectionEntry(Connection remotingConnection, ClientSASLFactory saslFactory, Map<org.apache.qpid.proton.amqp.Symbol, Object> connectionProperties) createOutgoingConnectionEntry(Connection remotingConnection, ClientSASLFactory saslFactory, Map<org.apache.qpid.proton.amqp.Symbol, Object> connectionProperties, org.apache.qpid.proton.amqp.Symbol[] offeredCapabilities, org.apache.qpid.proton.amqp.Symbol[] desiredCapabilities) longBefore the ackManager retries acks, it must flush the OperationContext on the MirrorTargets.intintintintintReturns the time in milliseconds to wait for remote sender once a link quiesce is initiated by this peer.intstatic StringgetMirrorAddress(String connectionName) intString[]org.apache.activemq.artemis.core.server.ActiveMQServervoidhandleBuffer(RemotingConnection connection, ActiveMQBuffer buffer) voidhandshake(org.apache.activemq.artemis.core.remoting.impl.netty.NettyServerConnection connection, ActiveMQBuffer buffer) invokeIncoming(Message message, ActiveMQProtonRemotingConnection connection) invokeOutgoing(Message message, ActiveMQProtonRemotingConnection connection) booleanbooleanbooleanbooleanReturns true if transient delivery errors should be handled by draining link credit from the remote sender.booleanisProtocol(byte[] array) booleanReturns true if transient delivery errors should be handled with a Modified disposition (if permitted by link).voidonNotification(org.apache.activemq.artemis.core.server.management.Notification notification) setAckManagerFlushTimeout(long ackManagerFlushTimeout) setAmqpCredits(int amqpCredits) setAmqpDrainOnTransientDeliveryErrors(boolean amqpDrainOnTransientDeliveryErrors) Sets if transient delivery errors should be handled by draining link credit from the remote sendersetAmqpDuplicateDetection(boolean duplicateDetection) setAmqpIdleTimeout(Long ttl) setAmqpLinkQuiesceTimeout(int amqpLinkQuiesceTimeout) Sets the time in milliseconds to wait before closing a remote sender link if the server has requested that the link drain all outstanding credit an complete pending settlements.setAmqpLowCredits(int amqpLowCredits) setAmqpMinLargeMessageSize(int amqpMinLargeMessageSize) voidsetAmqpTreatRejectAsUnmodifiedDeliveryFailed(boolean amqpTreatRejectAsUnmodifiedDeliveryFailed) setAmqpUseModifiedForTransientDeliveryErrors(boolean amqpUseModifiedForTransientDeliveryErrors) Sets if transient delivery errors should be handled with a Modified disposition (if permitted by link)voidsetAnycastPrefix(String anycastPrefix) setDirectDeliver(boolean directDeliver) voidsetInitialRemoteMaxFrameSize(int initialRemoteMaxFrameSize) voidsetMaxFrameSize(int maxFrameSize) setMirrorMaxPendingAcks(int maxPendingAcks) voidsetMulticastPrefix(String multicastPrefix) voidsetPubSubPrefix(String pubSubPrefix) voidsetSaslLoginConfigScope(String saslLoginConfigScope) voidsetSaslMechanisms(String[] saslMechanisms) voidupdateInterceptors(List incoming, List outgoing) Methods inherited from class AbstractProtocolManager
getSecurityDomain, invokeInterceptors, setSecurityDomainMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ProtocolManager
removeHandler
-
Field Details
-
MIRROR_ADDRESS
- See Also:
-
-
Constructor Details
-
ProtonProtocolManager
public ProtonProtocolManager(ProtonProtocolManagerFactory factory, org.apache.activemq.artemis.core.server.ActiveMQServer server, List<BaseInterceptor> incomingInterceptors, List<BaseInterceptor> outgoingInterceptors)
-
-
Method Details
-
getMirrorAddress
-
getReferenceIDSupplier
-
getServer
public org.apache.activemq.artemis.core.server.ActiveMQServer getServer() -
onNotification
public void onNotification(org.apache.activemq.artemis.core.server.management.Notification notification) - Specified by:
onNotificationin interfaceorg.apache.activemq.artemis.core.server.management.NotificationListener
-
getAckManagerFlushTimeout
public long getAckManagerFlushTimeout()Before the ackManager retries acks, it must flush the OperationContext on the MirrorTargets. This is the timeout is in milliseconds -
setAckManagerFlushTimeout
-
getAmqpMinLargeMessageSize
public int getAmqpMinLargeMessageSize() -
getMirrorMaxPendingAcks
public int getMirrorMaxPendingAcks() -
setMirrorMaxPendingAcks
-
setAmqpMinLargeMessageSize
-
isAmqpDuplicateDetection
public boolean isAmqpDuplicateDetection() -
setAmqpDuplicateDetection
-
getFactory
- Specified by:
getFactoryin interfaceProtocolManager<AmqpInterceptor, AMQPRoutingHandler>
-
updateInterceptors
- Specified by:
updateInterceptorsin interfaceProtocolManager<AmqpInterceptor, AMQPRoutingHandler>
-
acceptsNoHandshake
public boolean acceptsNoHandshake()- Specified by:
acceptsNoHandshakein interfaceProtocolManager<AmqpInterceptor, AMQPRoutingHandler>
-
getAmqpIdleTimeout
-
setAmqpIdleTimeout
-
isDirectDeliver
public boolean isDirectDeliver() -
setDirectDeliver
-
createClientManager
for outgoing -
createConnectionEntry
- Specified by:
createConnectionEntryin interfaceProtocolManager<AmqpInterceptor, AMQPRoutingHandler>
-
createOutgoingConnectionEntry
This method is not part of the ProtocolManager interface because it only makes sense on AMQP. More specifically on AMQP Bridges -
createOutgoingConnectionEntry
public ConnectionEntry createOutgoingConnectionEntry(Connection remotingConnection, ClientSASLFactory saslFactory) -
createOutgoingConnectionEntry
public ConnectionEntry createOutgoingConnectionEntry(Connection remotingConnection, ClientSASLFactory saslFactory, Map<org.apache.qpid.proton.amqp.Symbol, Object> connectionProperties) -
createOutgoingConnectionEntry
public ConnectionEntry createOutgoingConnectionEntry(Connection remotingConnection, ClientSASLFactory saslFactory, Map<org.apache.qpid.proton.amqp.Symbol, Object> connectionProperties, org.apache.qpid.proton.amqp.Symbol[] offeredCapabilities, org.apache.qpid.proton.amqp.Symbol[] desiredCapabilities) -
handleBuffer
- Specified by:
handleBufferin interfaceProtocolManager<AmqpInterceptor, AMQPRoutingHandler>
-
addChannelHandlers
public void addChannelHandlers(io.netty.channel.ChannelPipeline pipeline) - Specified by:
addChannelHandlersin interfaceProtocolManager<AmqpInterceptor, AMQPRoutingHandler>
-
getAmqpCredits
public int getAmqpCredits() -
setAmqpCredits
-
getAmqpLowCredits
public int getAmqpLowCredits() -
setAmqpLowCredits
-
isProtocol
public boolean isProtocol(byte[] array) - Specified by:
isProtocolin interfaceProtocolManager<AmqpInterceptor, AMQPRoutingHandler>
-
handshake
public void handshake(org.apache.activemq.artemis.core.remoting.impl.netty.NettyServerConnection connection, ActiveMQBuffer buffer) - Specified by:
handshakein interfaceProtocolManager<AmqpInterceptor, AMQPRoutingHandler>
-
websocketSubprotocolIdentifiers
- Specified by:
websocketSubprotocolIdentifiersin interfaceProtocolManager<AmqpInterceptor, AMQPRoutingHandler>
-
getPubSubPrefix
-
setPubSubPrefix
-
getMaxFrameSize
public int getMaxFrameSize() -
setMaxFrameSize
public void setMaxFrameSize(int maxFrameSize) -
getSaslMechanisms
-
setSaslMechanisms
-
getSaslLoginConfigScope
-
setSaslLoginConfigScope
-
setAnycastPrefix
- Specified by:
setAnycastPrefixin interfaceProtocolManager<AmqpInterceptor, AMQPRoutingHandler>- Overrides:
setAnycastPrefixin classAbstractProtocolManager<AMQPMessage, AmqpInterceptor, ActiveMQProtonRemotingConnection, AMQPRoutingHandler>
-
setMulticastPrefix
- Specified by:
setMulticastPrefixin interfaceProtocolManager<AmqpInterceptor, AMQPRoutingHandler>- Overrides:
setMulticastPrefixin classAbstractProtocolManager<AMQPMessage, AmqpInterceptor, ActiveMQProtonRemotingConnection, AMQPRoutingHandler>
-
getPrefixes
- Specified by:
getPrefixesin interfaceProtocolManager<AmqpInterceptor, AMQPRoutingHandler>- Overrides:
getPrefixesin classAbstractProtocolManager<AMQPMessage, AmqpInterceptor, ActiveMQProtonRemotingConnection, AMQPRoutingHandler>
-
getRoutingHandler
- Specified by:
getRoutingHandlerin interfaceProtocolManager<AmqpInterceptor, AMQPRoutingHandler>
-
invokeIncoming
-
invokeOutgoing
-
getInitialRemoteMaxFrameSize
public int getInitialRemoteMaxFrameSize() -
setInitialRemoteMaxFrameSize
public void setInitialRemoteMaxFrameSize(int initialRemoteMaxFrameSize) -
isUseModifiedForTransientDeliveryErrors
public boolean isUseModifiedForTransientDeliveryErrors()Returns true if transient delivery errors should be handled with a Modified disposition (if permitted by link).- Returns:
- true if transient delivery errors should be handled with a Modified disposition (if permitted by link)
-
setAmqpUseModifiedForTransientDeliveryErrors
public ProtonProtocolManager setAmqpUseModifiedForTransientDeliveryErrors(boolean amqpUseModifiedForTransientDeliveryErrors) Sets if transient delivery errors should be handled with a Modified disposition (if permitted by link) -
setAmqpTreatRejectAsUnmodifiedDeliveryFailed
public void setAmqpTreatRejectAsUnmodifiedDeliveryFailed(boolean amqpTreatRejectAsUnmodifiedDeliveryFailed) -
isAmqpTreatRejectAsUnmodifiedDeliveryFailed
public boolean isAmqpTreatRejectAsUnmodifiedDeliveryFailed() -
isDrainOnTransientDeliveryErrors
public boolean isDrainOnTransientDeliveryErrors()Returns true if transient delivery errors should be handled by draining link credit from the remote sender.- Returns:
- true if transient delivery errors should be handled by draining link credit from the remote sender
-
setAmqpDrainOnTransientDeliveryErrors
public ProtonProtocolManager setAmqpDrainOnTransientDeliveryErrors(boolean amqpDrainOnTransientDeliveryErrors) Sets if transient delivery errors should be handled by draining link credit from the remote sender- Parameters:
amqpDrainOnTransientDeliveryErrors- Set totrueif senders should be drained on transient delivery errors.- Returns:
- this protocol manager instance.
-
getLinkQuiesceTimeout
public int getLinkQuiesceTimeout()Returns the time in milliseconds to wait for remote sender once a link quiesce is initiated by this peer.- Returns:
- the time in milliseconds to wait for remote sender once a link quiesce is initiated by this peer
-
setAmqpLinkQuiesceTimeout
Sets the time in milliseconds to wait before closing a remote sender link if the server has requested that the link drain all outstanding credit an complete pending settlements. A value less than or equal to zero disables drain timeouts.- Parameters:
amqpLinkQuiesceTimeout- The time in milliseconds to wait for quiesce to complete.- Returns:
- this protocol manager instance.
-