Package org.apache.activemq.artemis.spi.core.protocol

## Interface ProtocolManager<P extends BaseInterceptor,​R extends org.apache.activemq.artemis.core.server.routing.RoutingHandler>

- All Known Implementing Classes:
    `AbstractProtocolManager`

      public interface ProtocolManager<P extends BaseInterceptor,​R extends org.apache.activemq.artemis.core.server.routing.RoutingHandler>

  Info: ProtocolManager is loaded by `RemotingServiceImpl.loadProtocolManagerFactories(Iterable)`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `acceptsNoHandshake()` | If this protocols accepts connectoins without an initial handshake.
    `void` | `addChannelHandlers​(io.netty.channel.ChannelPipeline pipeline)` |
    `ConnectionEntry` | `createConnectionEntry​(Acceptor acceptorUsed, Connection connection)` |
    `ProtocolManagerFactory<P>` | `getFactory()` |
    `java.util.Map<org.apache.activemq.artemis.api.core.SimpleString,​org.apache.activemq.artemis.api.core.RoutingType>` | `getPrefixes()` |
    `R` | `getRoutingHandler()` |
    `java.lang.String` | `getSecurityDomain()` |
    `void` | `handleBuffer​(RemotingConnection connection, org.apache.activemq.artemis.api.core.ActiveMQBuffer buffer)` |
    `void` | `handshake​(org.apache.activemq.artemis.core.remoting.impl.netty.NettyServerConnection connection, org.apache.activemq.artemis.api.core.ActiveMQBuffer buffer)` |
    `boolean` | `isProtocol​(byte[] array)` |
    `default void` | `removeHandler​(java.lang.String name)` |
    `void` | `setAnycastPrefix​(java.lang.String anycastPrefix)` |
    `void` | `setMulticastPrefix​(java.lang.String multicastPrefix)` |
    `void` | `setSecurityDomain​(java.lang.String securityDomain)` |
    `void` | `updateInterceptors​(java.util.List<BaseInterceptor> incomingInterceptors, java.util.List<BaseInterceptor> outgoingInterceptors)` | This method will receive all the interceptors on the system and you should filter them out *
    `java.util.List<java.lang.String>` | `websocketSubprotocolIdentifiers()` | A list of the IANA websocket subprotocol identifiers (https://www.iana.org/assignments/websocket/websocket.xhtml) supported by this protocol manager.

- - ### Method Detail

    - #### getFactory

          ProtocolManagerFactory<P> getFactory()

    - #### updateInterceptors

          void updateInterceptors​(java.util.List<BaseInterceptor> incomingInterceptors,
                                  java.util.List<BaseInterceptor> outgoingInterceptors)

      This method will receive all the interceptors on the system and you should filter them out *
      Parameters:
        `incomingInterceptors` -
        `outgoingInterceptors` -

    - #### createConnectionEntry

          ConnectionEntry createConnectionEntry​(Acceptor acceptorUsed,
                                                Connection connection)

    - #### removeHandler

          default void removeHandler​(java.lang.String name)

    - #### handleBuffer

          void handleBuffer​(RemotingConnection connection,
                            org.apache.activemq.artemis.api.core.ActiveMQBuffer buffer)

    - #### addChannelHandlers

          void addChannelHandlers​(io.netty.channel.ChannelPipeline pipeline)

    - #### isProtocol

          boolean isProtocol​(byte[] array)

    - #### acceptsNoHandshake

          boolean acceptsNoHandshake()

      If 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.

    - #### handshake

          void handshake​(org.apache.activemq.artemis.core.remoting.impl.netty.NettyServerConnection connection,
                         org.apache.activemq.artemis.api.core.ActiveMQBuffer buffer)

    - #### websocketSubprotocolIdentifiers

          java.util.List<java.lang.String> websocketSubprotocolIdentifiers()

      A 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.
      Returns:
        A list of subprotocol ids

    - #### setAnycastPrefix

          void setAnycastPrefix​(java.lang.String anycastPrefix)

    - #### setMulticastPrefix

          void setMulticastPrefix​(java.lang.String multicastPrefix)

    - #### getPrefixes

          java.util.Map<org.apache.activemq.artemis.api.core.SimpleString,​org.apache.activemq.artemis.api.core.RoutingType> getPrefixes()

    - #### setSecurityDomain

          void setSecurityDomain​(java.lang.String securityDomain)

    - #### getSecurityDomain

          java.lang.String getSecurityDomain()

    - #### getRoutingHandler

          R getRoutingHandler()