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

## Interface ProtocolManager<P extends BaseInterceptor>

- All Known Implementing Classes:
    AbstractProtocolManager

      public interface ProtocolManager<P extends BaseInterceptor>

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

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and 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()`
    `Map<SimpleString,RoutingType>` | `getPrefixes()`
    `void` | `handleBuffer(RemotingConnection connection, ActiveMQBuffer buffer)`
    `void` | `handshake(org.apache.activemq.artemis.core.remoting.impl.netty.NettyServerConnection connection, ActiveMQBuffer buffer)`
    `boolean` | `isProtocol(byte[] array)`
    `void` | `removeHandler(String name)`
    `void` | `setAnycastPrefix(String anycastPrefix)`
    `void` | `setMulticastPrefix(String multicastPrefix)`
    `void` | `updateInterceptors(List<BaseInterceptor> incomingInterceptors, List<BaseInterceptor> outgoingInterceptors)` 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 supported by this protocol manager.

- - ### Method Detail

    - #### getFactory

          ProtocolManagerFactory<P> getFactory()

    - #### updateInterceptors

          void updateInterceptors(List<BaseInterceptor> incomingInterceptors,
                                  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

          void removeHandler(String name)

    - #### handleBuffer

          void handleBuffer(RemotingConnection connection,
                            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,
                         ActiveMQBuffer buffer)

    - #### websocketSubprotocolIdentifiers

          List<String> websocketSubprotocolIdentifiers()

      A list of the IANA websocket subprotocol identifiers supported by this protocol manager. These are used during the websocket subprotocol handshake.
      Returns:
        A list of subprotocol ids

    - #### setAnycastPrefix

          void setAnycastPrefix(String anycastPrefix)

    - #### setMulticastPrefix

          void setMulticastPrefix(String multicastPrefix)

    - #### getPrefixes

          Map<SimpleString,RoutingType> getPrefixes()

Copyright © 2018 The Apache Software Foundation. All rights reserved.