Class OpenWireProtocolManager
- java.lang.Object
-
- org.apache.activemq.artemis.spi.core.protocol.AbstractProtocolManager<org.apache.activemq.command.Command,OpenWireInterceptor,OpenWireConnection,OpenWireRoutingHandler>
-
- org.apache.activemq.artemis.core.protocol.openwire.OpenWireProtocolManager
-
- All Implemented Interfaces:
ClusterTopologyListener,ProtocolManager<OpenWireInterceptor,OpenWireRoutingHandler>
public class OpenWireProtocolManager extends AbstractProtocolManager<org.apache.activemq.command.Command,OpenWireInterceptor,OpenWireConnection,OpenWireRoutingHandler> implements ClusterTopologyListener
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classOpenWireProtocolManager.VirtualTopicConfig
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.activemq.command.ProducerIdadvisoryProducerIdprotected org.apache.activemq.artemis.selector.impl.LRUCache<org.apache.activemq.command.ActiveMQDestination,org.apache.activemq.command.ActiveMQDestination>vtDestMapCache
-
Constructor Summary
Constructors Constructor Description OpenWireProtocolManager(OpenWireProtocolManagerFactory factory, ActiveMQServer server, List<BaseInterceptor> incomingInterceptors, List<BaseInterceptor> outgoingInterceptors)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanacceptsNoHandshake()voidaddChannelHandlers(io.netty.channel.ChannelPipeline pipeline)voidaddConnection(OpenWireConnection connection, org.apache.activemq.command.ConnectionInfo info)voidconfigureInactivityParams(OpenWireConnection connection, org.apache.activemq.command.WireFormatInfo command)ConnectionEntrycreateConnectionEntry(Acceptor acceptorUsed, Connection connection)voidfireAdvisory(AMQConnectionContext context, org.apache.activemq.command.ActiveMQTopic topic, org.apache.activemq.command.Command copy)voidfireAdvisory(AMQConnectionContext context, org.apache.activemq.command.ActiveMQTopic topic, org.apache.activemq.command.Command command, org.apache.activemq.command.ConsumerId targetConsumerId, String originalConnectionId)intgetActorThresholdBytes()if set, the OpenWire connection will bypass the tcpReadBuferSize and use this value instead.org.apache.activemq.command.BrokerIdgetBrokerId()StringgetBrokerName()List<OpenWireConnection>getConnections()ProtocolManagerFactorygetFactory()longgetMaxInactivityDuration()longgetMaxInactivityDurationInitalDelay()intgetOpenWireDestinationCacheSize()intgetOpenwireMaxPacketChunkSize()if defined, LargeMessages will be sent in chunks to the network.Map<SimpleString,RoutingType>getPrefixes()OpenWireRoutingHandlergetRoutingHandler()ScheduledExecutorServicegetScheduledPool()StringgetSecurityDomain()ActiveMQServergetServer()List<org.apache.activemq.command.DestinationInfo>getTemporaryDestinations()voidhandleBuffer(RemotingConnection connection, ActiveMQBuffer buffer)voidhandshake(NettyServerConnection connection, ActiveMQBuffer buffer)StringinvokeIncoming(org.apache.activemq.command.Command command, OpenWireConnection connection)StringinvokeOutgoing(org.apache.activemq.command.Command command, OpenWireConnection connection)booleanisFaultTolerantConfiguration()booleanisOpenwireUseDuplicateDetectionOnFailover()Is Duplicate detection enabled when used with failover clients.booleanisProtocol(byte[] array)booleanisRebalanceClusterClients()URI propertybooleanisStopped()booleanisStopping()booleanisSupportAdvisory()booleanisSuppressInternalManagementObjects()booleanisUpdateClusterClients()booleanisUpdateClusterClientsOnRemove()URI propertybooleanisUseKeepAlive()protected org.apache.activemq.command.ConnectionControlnewConnectionControl()voidnodeDown(long eventUID, String nodeID)voidnodeUP(TopologyMember member, boolean last)voidpostProcessDispatch(org.apache.activemq.command.MessageDispatch md)voidpreProcessDispatch(org.apache.activemq.command.MessageDispatch messageDispatch)voidremoveConnection(org.apache.activemq.command.ConnectionInfo info, Throwable error)voidsendBrokerInfo(OpenWireConnection connection)OpenWireProtocolManagersetActorThresholdBytes(int actorThresholdBytes)voidsetAnycastPrefix(String anycastPrefix)voidsetBrokerName(String name)voidsetMaxInactivityDuration(long maxInactivityDuration)voidsetMaxInactivityDurationInitalDelay(long maxInactivityDurationInitalDelay)voidsetMulticastPrefix(String multicastPrefix)voidsetOpenWireDestinationCacheSize(int openWireDestinationCacheSize)OpenWireProtocolManagersetOpenwireMaxPacketChunkSize(int openwireMaxPacketChunkSize)OpenWireProtocolManagersetOpenwireUseDuplicateDetectionOnFailover(boolean openwireUseDuplicateDetectionOnFailover)should it use duplicate detection on failover clients.voidsetRebalanceClusterClients(boolean rebalance)URI propertyvoidsetSecurityDomain(String securityDomain)voidsetSupportAdvisory(boolean supportAdvisory)voidsetSuppressInternalManagementObjects(boolean suppressInternalManagementObjects)voidsetUpdateClusterClients(boolean updateClusterClients)URI propertyvoidsetUpdateClusterClientsOnRemove(boolean updateClusterClientsOnRemove)URI propertyvoidsetUseKeepAlive(boolean useKeepAlive)voidsetVirtualTopicConsumerLruCacheMax(int max)voidsetVirtualTopicConsumerWildcards(String virtualTopicConsumerWildcards)voidupdateInterceptors(List incoming, List outgoing)StringvalidateUser(String login, String passcode, OpenWireConnection connection)voidvalidateUser(OpenWireConnection connection, org.apache.activemq.command.ConnectionInfo info)org.apache.activemq.command.ActiveMQDestinationvirtualTopicConsumerToFQQN(org.apache.activemq.command.ActiveMQDestination destination)List<String>websocketSubprotocolIdentifiers()org.apache.activemq.openwire.OpenWireFormatwireFormat()-
Methods inherited from class org.apache.activemq.artemis.spi.core.protocol.AbstractProtocolManager
invokeInterceptors
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.activemq.artemis.spi.core.protocol.ProtocolManager
removeHandler
-
-
-
-
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, ActiveMQServer server, List<BaseInterceptor> incomingInterceptors, List<BaseInterceptor> outgoingInterceptors)
-
-
Method Detail
-
getOpenwireMaxPacketChunkSize
public int getOpenwireMaxPacketChunkSize()
if defined, LargeMessages will be sent in chunks to the network. Notice that the system will still load the entire file in memory before sending on the stream. This should avoid just a big buffer allocated.
-
setOpenwireMaxPacketChunkSize
public OpenWireProtocolManager setOpenwireMaxPacketChunkSize(int openwireMaxPacketChunkSize)
-
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(TopologyMember member, boolean last)
- Specified by:
nodeUPin interfaceClusterTopologyListener
-
nodeDown
public void nodeDown(long eventUID, String nodeID)- Specified by:
nodeDownin interfaceClusterTopologyListener
-
removeConnection
public void removeConnection(org.apache.activemq.command.ConnectionInfo info, 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.
-
setActorThresholdBytes
public OpenWireProtocolManager setActorThresholdBytes(int actorThresholdBytes)
-
getScheduledPool
public ScheduledExecutorService getScheduledPool()
-
getServer
public ActiveMQServer getServer()
-
acceptsNoHandshake
public boolean acceptsNoHandshake()
- Specified by:
acceptsNoHandshakein interfaceProtocolManager<OpenWireInterceptor,OpenWireRoutingHandler>
-
getFactory
public ProtocolManagerFactory getFactory()
- Specified by:
getFactoryin interfaceProtocolManager<OpenWireInterceptor,OpenWireRoutingHandler>
-
updateInterceptors
public void updateInterceptors(List incoming, List outgoing)
- Specified by:
updateInterceptorsin interfaceProtocolManager<OpenWireInterceptor,OpenWireRoutingHandler>
-
invokeIncoming
public String invokeIncoming(org.apache.activemq.command.Command command, OpenWireConnection connection)
-
invokeOutgoing
public String invokeOutgoing(org.apache.activemq.command.Command command, OpenWireConnection connection)
-
createConnectionEntry
public ConnectionEntry createConnectionEntry(Acceptor acceptorUsed, Connection connection)
- Specified by:
createConnectionEntryin interfaceProtocolManager<OpenWireInterceptor,OpenWireRoutingHandler>
-
handleBuffer
public void handleBuffer(RemotingConnection connection, ActiveMQBuffer buffer)
- Specified by:
handleBufferin interfaceProtocolManager<OpenWireInterceptor,OpenWireRoutingHandler>
-
addChannelHandlers
public void addChannelHandlers(io.netty.channel.ChannelPipeline pipeline)
- Specified by:
addChannelHandlersin interfaceProtocolManager<OpenWireInterceptor,OpenWireRoutingHandler>
-
isProtocol
public boolean isProtocol(byte[] array)
- Specified by:
isProtocolin interfaceProtocolManager<OpenWireInterceptor,OpenWireRoutingHandler>
-
handshake
public void handshake(NettyServerConnection connection, ActiveMQBuffer buffer)
- Specified by:
handshakein interfaceProtocolManager<OpenWireInterceptor,OpenWireRoutingHandler>
-
websocketSubprotocolIdentifiers
public List<String> websocketSubprotocolIdentifiers()
- Specified by:
websocketSubprotocolIdentifiersin interfaceProtocolManager<OpenWireInterceptor,OpenWireRoutingHandler>
-
validateUser
public void validateUser(OpenWireConnection connection, org.apache.activemq.command.ConnectionInfo info) throws Exception
- Throws:
Exception
-
addConnection
public void addConnection(OpenWireConnection connection, org.apache.activemq.command.ConnectionInfo info) throws Exception
- Throws:
Exception
-
fireAdvisory
public void fireAdvisory(AMQConnectionContext context, org.apache.activemq.command.ActiveMQTopic topic, org.apache.activemq.command.Command copy) throws Exception
- Throws:
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, String originalConnectionId) throws Exception
- Throws:
Exception
-
getBrokerName
public 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 String validateUser(String login, String passcode, OpenWireConnection connection) throws Exception
- Throws:
Exception
-
sendBrokerInfo
public void sendBrokerInfo(OpenWireConnection connection) throws Exception
- Throws:
Exception
-
configureInactivityParams
public void configureInactivityParams(OpenWireConnection connection, org.apache.activemq.command.WireFormatInfo command) throws IOException
- Throws:
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(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)
-
setAnycastPrefix
public void setAnycastPrefix(String anycastPrefix)
- Specified by:
setAnycastPrefixin interfaceProtocolManager<OpenWireInterceptor,OpenWireRoutingHandler>- Overrides:
setAnycastPrefixin classAbstractProtocolManager<org.apache.activemq.command.Command,OpenWireInterceptor,OpenWireConnection,OpenWireRoutingHandler>
-
setMulticastPrefix
public void setMulticastPrefix(String multicastPrefix)
- Specified by:
setMulticastPrefixin interfaceProtocolManager<OpenWireInterceptor,OpenWireRoutingHandler>- Overrides:
setMulticastPrefixin classAbstractProtocolManager<org.apache.activemq.command.Command,OpenWireInterceptor,OpenWireConnection,OpenWireRoutingHandler>
-
getPrefixes
public Map<SimpleString,RoutingType> getPrefixes()
- Specified by:
getPrefixesin interfaceProtocolManager<OpenWireInterceptor,OpenWireRoutingHandler>- Overrides:
getPrefixesin classAbstractProtocolManager<org.apache.activemq.command.Command,OpenWireInterceptor,OpenWireConnection,OpenWireRoutingHandler>
-
setSecurityDomain
public void setSecurityDomain(String securityDomain)
- Specified by:
setSecurityDomainin interfaceProtocolManager<OpenWireInterceptor,OpenWireRoutingHandler>- Overrides:
setSecurityDomainin classAbstractProtocolManager<org.apache.activemq.command.Command,OpenWireInterceptor,OpenWireConnection,OpenWireRoutingHandler>
-
getRoutingHandler
public OpenWireRoutingHandler getRoutingHandler()
- Specified by:
getRoutingHandlerin interfaceProtocolManager<OpenWireInterceptor,OpenWireRoutingHandler>
-
getSecurityDomain
public String getSecurityDomain()
- Specified by:
getSecurityDomainin interfaceProtocolManager<OpenWireInterceptor,OpenWireRoutingHandler>- Overrides:
getSecurityDomainin classAbstractProtocolManager<org.apache.activemq.command.Command,OpenWireInterceptor,OpenWireConnection,OpenWireRoutingHandler>
-
getTemporaryDestinations
public 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(String virtualTopicConsumerWildcards)
-
setVirtualTopicConsumerLruCacheMax
public void setVirtualTopicConsumerLruCacheMax(int max)
-
virtualTopicConsumerToFQQN
public org.apache.activemq.command.ActiveMQDestination virtualTopicConsumerToFQQN(org.apache.activemq.command.ActiveMQDestination destination)
-
getConnections
public List<OpenWireConnection> getConnections()
-
-