Class OpenWireProtocolManager

  • All Implemented Interfaces:
    org.apache.activemq.artemis.api.core.client.ClusterTopologyListener, org.apache.activemq.artemis.spi.core.protocol.ProtocolManager<OpenWireInterceptor,​OpenWireRoutingHandler>

    public class OpenWireProtocolManager
    extends org.apache.activemq.artemis.spi.core.protocol.AbstractProtocolManager<org.apache.activemq.command.Command,​OpenWireInterceptor,​OpenWireConnection,​OpenWireRoutingHandler>
    implements org.apache.activemq.artemis.api.core.client.ClusterTopologyListener
    • Field Detail

      • advisoryProducerId

        protected final org.apache.activemq.command.ProducerId advisoryProducerId
      • vtDestMapCache

        protected final org.apache.activemq.artemis.selector.impl.LRUCache<org.apache.activemq.command.ActiveMQDestination,​org.apache.activemq.command.ActiveMQDestination> vtDestMapCache
    • Constructor Detail

      • OpenWireProtocolManager

        public OpenWireProtocolManager​(OpenWireProtocolManagerFactory factory,
                                       org.apache.activemq.artemis.core.server.ActiveMQServer server,
                                       java.util.List<org.apache.activemq.artemis.api.core.BaseInterceptor> incomingInterceptors,
                                       java.util.List<org.apache.activemq.artemis.api.core.BaseInterceptor> outgoingInterceptors)
    • Method Detail

      • isOpenwireUseDuplicateDetectionOnFailover

        public boolean isOpenwireUseDuplicateDetectionOnFailover()
        Is Duplicate detection enabled when used with failover clients.
      • setOpenwireUseDuplicateDetectionOnFailover

        public OpenWireProtocolManager setOpenwireUseDuplicateDetectionOnFailover​(boolean openwireUseDuplicateDetectionOnFailover)
        should it use duplicate detection on failover clients.
      • nodeUP

        public void nodeUP​(org.apache.activemq.artemis.api.core.client.TopologyMember member,
                           boolean last)
        Specified by:
        nodeUP in interface org.apache.activemq.artemis.api.core.client.ClusterTopologyListener
      • nodeDown

        public void nodeDown​(long eventUID,
                             java.lang.String nodeID)
        Specified by:
        nodeDown in interface org.apache.activemq.artemis.api.core.client.ClusterTopologyListener
      • removeConnection

        public void removeConnection​(org.apache.activemq.command.ConnectionInfo info,
                                     java.lang.Throwable error)
                              throws javax.jms.InvalidClientIDException
        Throws:
        javax.jms.InvalidClientIDException
      • getActorThresholdBytes

        public int getActorThresholdBytes()
        if set, the OpenWire connection will bypass the tcpReadBuferSize and use this value instead. This is by default -1, and it should not be used unless in extreme situations like on a slow storage.
      • getScheduledPool

        public java.util.concurrent.ScheduledExecutorService getScheduledPool()
      • getServer

        public org.apache.activemq.artemis.core.server.ActiveMQServer getServer()
      • acceptsNoHandshake

        public boolean acceptsNoHandshake()
        Specified by:
        acceptsNoHandshake in interface org.apache.activemq.artemis.spi.core.protocol.ProtocolManager<OpenWireInterceptor,​OpenWireRoutingHandler>
      • getFactory

        public org.apache.activemq.artemis.spi.core.protocol.ProtocolManagerFactory getFactory()
        Specified by:
        getFactory in interface org.apache.activemq.artemis.spi.core.protocol.ProtocolManager<OpenWireInterceptor,​OpenWireRoutingHandler>
      • updateInterceptors

        public void updateInterceptors​(java.util.List incoming,
                                       java.util.List outgoing)
        Specified by:
        updateInterceptors in interface org.apache.activemq.artemis.spi.core.protocol.ProtocolManager<OpenWireInterceptor,​OpenWireRoutingHandler>
      • invokeIncoming

        public java.lang.String invokeIncoming​(org.apache.activemq.command.Command command,
                                               OpenWireConnection connection)
      • invokeOutgoing

        public java.lang.String invokeOutgoing​(org.apache.activemq.command.Command command,
                                               OpenWireConnection connection)
      • createConnectionEntry

        public org.apache.activemq.artemis.spi.core.protocol.ConnectionEntry createConnectionEntry​(org.apache.activemq.artemis.spi.core.remoting.Acceptor acceptorUsed,
                                                                                                   org.apache.activemq.artemis.spi.core.remoting.Connection connection)
        Specified by:
        createConnectionEntry in interface org.apache.activemq.artemis.spi.core.protocol.ProtocolManager<OpenWireInterceptor,​OpenWireRoutingHandler>
      • handleBuffer

        public void handleBuffer​(org.apache.activemq.artemis.spi.core.protocol.RemotingConnection connection,
                                 org.apache.activemq.artemis.api.core.ActiveMQBuffer buffer)
        Specified by:
        handleBuffer in interface org.apache.activemq.artemis.spi.core.protocol.ProtocolManager<OpenWireInterceptor,​OpenWireRoutingHandler>
      • addChannelHandlers

        public void addChannelHandlers​(io.netty.channel.ChannelPipeline pipeline)
        Specified by:
        addChannelHandlers in interface org.apache.activemq.artemis.spi.core.protocol.ProtocolManager<OpenWireInterceptor,​OpenWireRoutingHandler>
      • isProtocol

        public boolean isProtocol​(byte[] array)
        Specified by:
        isProtocol in interface org.apache.activemq.artemis.spi.core.protocol.ProtocolManager<OpenWireInterceptor,​OpenWireRoutingHandler>
      • handshake

        public void handshake​(org.apache.activemq.artemis.core.remoting.impl.netty.NettyServerConnection connection,
                              org.apache.activemq.artemis.api.core.ActiveMQBuffer buffer)
        Specified by:
        handshake in interface org.apache.activemq.artemis.spi.core.protocol.ProtocolManager<OpenWireInterceptor,​OpenWireRoutingHandler>
      • websocketSubprotocolIdentifiers

        public java.util.List<java.lang.String> websocketSubprotocolIdentifiers()
        Specified by:
        websocketSubprotocolIdentifiers in interface org.apache.activemq.artemis.spi.core.protocol.ProtocolManager<OpenWireInterceptor,​OpenWireRoutingHandler>
      • validateUser

        public void validateUser​(OpenWireConnection connection,
                                 org.apache.activemq.command.ConnectionInfo info)
                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • addConnection

        public void addConnection​(OpenWireConnection connection,
                                  org.apache.activemq.command.ConnectionInfo info)
                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • fireAdvisory

        public void fireAdvisory​(AMQConnectionContext context,
                                 org.apache.activemq.command.ActiveMQTopic topic,
                                 org.apache.activemq.command.Command copy)
                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getBrokerId

        public org.apache.activemq.command.BrokerId getBrokerId()
      • fireAdvisory

        public void fireAdvisory​(AMQConnectionContext context,
                                 org.apache.activemq.command.ActiveMQTopic topic,
                                 org.apache.activemq.command.Command command,
                                 org.apache.activemq.command.ConsumerId targetConsumerId,
                                 java.lang.String originalConnectionId)
                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getBrokerName

        public java.lang.String getBrokerName()
      • newConnectionControl

        protected org.apache.activemq.command.ConnectionControl newConnectionControl()
      • isFaultTolerantConfiguration

        public boolean isFaultTolerantConfiguration()
      • postProcessDispatch

        public void postProcessDispatch​(org.apache.activemq.command.MessageDispatch md)
      • isStopped

        public boolean isStopped()
      • preProcessDispatch

        public void preProcessDispatch​(org.apache.activemq.command.MessageDispatch messageDispatch)
      • isStopping

        public boolean isStopping()
      • validateUser

        public java.lang.String validateUser​(java.lang.String login,
                                             java.lang.String passcode,
                                             OpenWireConnection connection)
                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • sendBrokerInfo

        public void sendBrokerInfo​(OpenWireConnection connection)
                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • configureInactivityParams

        public void configureInactivityParams​(OpenWireConnection connection,
                                              org.apache.activemq.command.WireFormatInfo command)
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • setRebalanceClusterClients

        public void setRebalanceClusterClients​(boolean rebalance)
        URI property
      • isRebalanceClusterClients

        public boolean isRebalanceClusterClients()
        URI property
      • setUpdateClusterClients

        public void setUpdateClusterClients​(boolean updateClusterClients)
        URI property
      • isUpdateClusterClients

        public boolean isUpdateClusterClients()
      • setUpdateClusterClientsOnRemove

        public void setUpdateClusterClientsOnRemove​(boolean updateClusterClientsOnRemove)
        URI property
      • isUpdateClusterClientsOnRemove

        public boolean isUpdateClusterClientsOnRemove()
        URI property
      • setBrokerName

        public void setBrokerName​(java.lang.String name)
      • isUseKeepAlive

        public boolean isUseKeepAlive()
      • setUseKeepAlive

        public void setUseKeepAlive​(boolean useKeepAlive)
      • getMaxInactivityDuration

        public long getMaxInactivityDuration()
      • setMaxInactivityDuration

        public void setMaxInactivityDuration​(long maxInactivityDuration)
      • getMaxInactivityDurationInitalDelay

        public long getMaxInactivityDurationInitalDelay()
      • setMaxInactivityDurationInitalDelay

        public void setMaxInactivityDurationInitalDelay​(long maxInactivityDurationInitalDelay)
      • getPrefixes

        public java.util.Map<org.apache.activemq.artemis.api.core.SimpleString,​org.apache.activemq.artemis.api.core.RoutingType> getPrefixes()
        Specified by:
        getPrefixes in interface org.apache.activemq.artemis.spi.core.protocol.ProtocolManager<OpenWireInterceptor,​OpenWireRoutingHandler>
        Overrides:
        getPrefixes in class org.apache.activemq.artemis.spi.core.protocol.AbstractProtocolManager<org.apache.activemq.command.Command,​OpenWireInterceptor,​OpenWireConnection,​OpenWireRoutingHandler>
      • getTemporaryDestinations

        public java.util.List<org.apache.activemq.command.DestinationInfo> getTemporaryDestinations()
      • wireFormat

        public org.apache.activemq.openwire.OpenWireFormat wireFormat()
      • isSupportAdvisory

        public boolean isSupportAdvisory()
      • setSupportAdvisory

        public void setSupportAdvisory​(boolean supportAdvisory)
      • isSuppressInternalManagementObjects

        public boolean isSuppressInternalManagementObjects()
      • setSuppressInternalManagementObjects

        public void setSuppressInternalManagementObjects​(boolean suppressInternalManagementObjects)
      • getOpenWireDestinationCacheSize

        public int getOpenWireDestinationCacheSize()
      • setOpenWireDestinationCacheSize

        public void setOpenWireDestinationCacheSize​(int openWireDestinationCacheSize)
      • setVirtualTopicConsumerWildcards

        public void setVirtualTopicConsumerWildcards​(java.lang.String virtualTopicConsumerWildcards)
      • setVirtualTopicConsumerLruCacheMax

        public void setVirtualTopicConsumerLruCacheMax​(int max)
      • virtualTopicConsumerToFQQN

        public org.apache.activemq.command.ActiveMQDestination virtualTopicConsumerToFQQN​(org.apache.activemq.command.ActiveMQDestination destination)