Class CoreProtocolManager
- java.lang.Object
-
- org.apache.activemq.artemis.core.protocol.core.impl.CoreProtocolManager
-
- All Implemented Interfaces:
ProtocolManager<Interceptor,ActiveMQRoutingHandler>
public class CoreProtocolManager extends Object implements ProtocolManager<Interceptor,ActiveMQRoutingHandler>
-
-
Field Summary
Fields Modifier and Type Field Description protected ActiveMQServerserver
-
Constructor Summary
Constructors Constructor Description CoreProtocolManager(CoreProtocolManagerFactory factory, ActiveMQServer server, List<Interceptor> incomingInterceptors, List<Interceptor> outgoingInterceptors)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanacceptsNoHandshake()If this protocols accepts connectoins without an initial handshake.voidaddChannelHandlers(io.netty.channel.ChannelPipeline pipeline)ConnectionEntrycreateConnectionEntry(Acceptor acceptorUsed, Connection connection)ProtocolManagerFactory<Interceptor>getFactory()Map<SimpleString,RoutingType>getPrefixes()ActiveMQRoutingHandlergetRoutingHandler()StringgetSecurityDomain()voidhandleBuffer(RemotingConnection connection, ActiveMQBuffer buffer)voidhandshake(NettyServerConnection connection, ActiveMQBuffer buffer)booleanisProtocol(byte[] array)voidremoveHandler(String name)voidsetAnycastPrefix(String anycastPrefix)voidsetMulticastPrefix(String multicastPrefix)voidsetSecurityDomain(String securityDomain)StringtoString()voidupdateInterceptors(List<BaseInterceptor> incoming, List<BaseInterceptor> outgoing)This method will receive all the interceptors on the system and you should filter them out *List<String>websocketSubprotocolIdentifiers()A list of the IANA websocket subprotocol identifiers (https://www.iana.org/assignments/websocket/websocket.xhtml) supported by this protocol manager.
-
-
-
Field Detail
-
server
protected final ActiveMQServer server
-
-
Constructor Detail
-
CoreProtocolManager
public CoreProtocolManager(CoreProtocolManagerFactory factory, ActiveMQServer server, List<Interceptor> incomingInterceptors, List<Interceptor> outgoingInterceptors)
-
-
Method Detail
-
getFactory
public ProtocolManagerFactory<Interceptor> getFactory()
- Specified by:
getFactoryin interfaceProtocolManager<Interceptor,ActiveMQRoutingHandler>
-
updateInterceptors
public void updateInterceptors(List<BaseInterceptor> incoming, List<BaseInterceptor> outgoing)
Description copied from interface:ProtocolManagerThis method will receive all the interceptors on the system and you should filter them out *- Specified by:
updateInterceptorsin interfaceProtocolManager<Interceptor,ActiveMQRoutingHandler>
-
acceptsNoHandshake
public boolean acceptsNoHandshake()
Description copied from interface:ProtocolManagerIf this protocols accepts connectoins without an initial handshake. If true this protocol will be the failback case no other connections are made. New designed protocols should always require a handshake. This is only useful for legacy protocols.- Specified by:
acceptsNoHandshakein interfaceProtocolManager<Interceptor,ActiveMQRoutingHandler>
-
createConnectionEntry
public ConnectionEntry createConnectionEntry(Acceptor acceptorUsed, Connection connection)
- Specified by:
createConnectionEntryin interfaceProtocolManager<Interceptor,ActiveMQRoutingHandler>
-
removeHandler
public void removeHandler(String name)
- Specified by:
removeHandlerin interfaceProtocolManager<Interceptor,ActiveMQRoutingHandler>
-
handleBuffer
public void handleBuffer(RemotingConnection connection, ActiveMQBuffer buffer)
- Specified by:
handleBufferin interfaceProtocolManager<Interceptor,ActiveMQRoutingHandler>
-
addChannelHandlers
public void addChannelHandlers(io.netty.channel.ChannelPipeline pipeline)
- Specified by:
addChannelHandlersin interfaceProtocolManager<Interceptor,ActiveMQRoutingHandler>
-
isProtocol
public boolean isProtocol(byte[] array)
- Specified by:
isProtocolin interfaceProtocolManager<Interceptor,ActiveMQRoutingHandler>
-
handshake
public void handshake(NettyServerConnection connection, ActiveMQBuffer buffer)
- Specified by:
handshakein interfaceProtocolManager<Interceptor,ActiveMQRoutingHandler>
-
websocketSubprotocolIdentifiers
public List<String> websocketSubprotocolIdentifiers()
Description copied from interface:ProtocolManagerA list of the IANA websocket subprotocol identifiers (https://www.iana.org/assignments/websocket/websocket.xhtml) supported by this protocol manager. These are used during the websocket subprotocol handshake.- Specified by:
websocketSubprotocolIdentifiersin interfaceProtocolManager<Interceptor,ActiveMQRoutingHandler>- Returns:
- A list of subprotocol ids
-
setAnycastPrefix
public void setAnycastPrefix(String anycastPrefix)
- Specified by:
setAnycastPrefixin interfaceProtocolManager<Interceptor,ActiveMQRoutingHandler>
-
setMulticastPrefix
public void setMulticastPrefix(String multicastPrefix)
- Specified by:
setMulticastPrefixin interfaceProtocolManager<Interceptor,ActiveMQRoutingHandler>
-
getPrefixes
public Map<SimpleString,RoutingType> getPrefixes()
- Specified by:
getPrefixesin interfaceProtocolManager<Interceptor,ActiveMQRoutingHandler>
-
setSecurityDomain
public void setSecurityDomain(String securityDomain)
- Specified by:
setSecurityDomainin interfaceProtocolManager<Interceptor,ActiveMQRoutingHandler>
-
getSecurityDomain
public String getSecurityDomain()
- Specified by:
getSecurityDomainin interfaceProtocolManager<Interceptor,ActiveMQRoutingHandler>
-
getRoutingHandler
public ActiveMQRoutingHandler getRoutingHandler()
- Specified by:
getRoutingHandlerin interfaceProtocolManager<Interceptor,ActiveMQRoutingHandler>
-
-