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

## Interface ClientProtocolManager

-     public interface ClientProtocolManager

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addChannelHandlers​(io.netty.channel.ChannelPipeline pipeline)` |
    `boolean` | `checkForFailover​(java.lang.String liveNodeID)` |
    `boolean` | `cleanupBeforeFailover​(org.apache.activemq.artemis.api.core.ActiveMQException cause)` |
    `RemotingConnection` | `connect​(Connection transportConnection, long callTimeout, long callFailoverTimeout, java.util.List<Interceptor> incomingInterceptors, java.util.List<Interceptor> outgoingInterceptors, TopologyResponseHandler topologyResponseHandler)` |
    `SessionContext` | `createSessionContext​(java.lang.String name, java.lang.String username, java.lang.String password, boolean xa, boolean autoCommitSends, boolean autoCommitAcks, boolean preAcknowledge, int minLargeMessageSize, int confirmationWindowSize, java.lang.String clientID)` |
    `RemotingConnection` | `getCurrentConnection()` |
    `java.lang.String` | `getName()` |
    `ClientSessionFactory` | `getSessionFactory()` |
    `boolean` | `isAlive()` |
    `java.util.concurrent.locks.Lock` | `lockSessionCreation()` |
    `void` | `ping​(long connectionTTL)` |
    `void` | `sendSubscribeTopology​(boolean isServer)` |
    `ClientProtocolManager` | `setExecutor​(java.util.concurrent.Executor executor)` |
    `void` | `setSessionFactory​(ClientSessionFactory factory)` |
    `void` | `stop()` | This is to be called when a connection failed and we want to interrupt any communication.
    `boolean` | `waitOnLatch​(long milliseconds)` |

- - ### Method Detail

    - #### setExecutor

          ClientProtocolManager setExecutor​(java.util.concurrent.Executor executor)

    - #### connect

          RemotingConnection connect​(Connection transportConnection,
                                     long callTimeout,
                                     long callFailoverTimeout,
                                     java.util.List<Interceptor> incomingInterceptors,
                                     java.util.List<Interceptor> outgoingInterceptors,
                                     TopologyResponseHandler topologyResponseHandler)

    - #### getCurrentConnection

          RemotingConnection getCurrentConnection()

    - #### lockSessionCreation

          java.util.concurrent.locks.Lock lockSessionCreation()

    - #### waitOnLatch

          boolean waitOnLatch​(long milliseconds)
                       throws java.lang.InterruptedException

      Throws:
        `java.lang.InterruptedException`

    - #### stop

          void stop()

      This is to be called when a connection failed and we want to interrupt any communication. This used to be called exitLoop at some point o the code.. with a method named causeExit from ClientSessionFactoryImpl

    - #### isAlive

          boolean isAlive()

    - #### addChannelHandlers

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

    - #### sendSubscribeTopology

          void sendSubscribeTopology​(boolean isServer)

    - #### ping

          void ping​(long connectionTTL)

    - #### createSessionContext

          SessionContext createSessionContext​(java.lang.String name,
                                              java.lang.String username,
                                              java.lang.String password,
                                              boolean xa,
                                              boolean autoCommitSends,
                                              boolean autoCommitAcks,
                                              boolean preAcknowledge,
                                              int minLargeMessageSize,
                                              int confirmationWindowSize,
                                              java.lang.String clientID)
                                       throws org.apache.activemq.artemis.api.core.ActiveMQException

      Throws:
        `org.apache.activemq.artemis.api.core.ActiveMQException`

    - #### cleanupBeforeFailover

          boolean cleanupBeforeFailover​(org.apache.activemq.artemis.api.core.ActiveMQException cause)

    - #### checkForFailover

          boolean checkForFailover​(java.lang.String liveNodeID)
                            throws org.apache.activemq.artemis.api.core.ActiveMQException

      Throws:
        `org.apache.activemq.artemis.api.core.ActiveMQException`

    - #### setSessionFactory

          void setSessionFactory​(ClientSessionFactory factory)

    - #### getSessionFactory

          ClientSessionFactory getSessionFactory()

    - #### getName

          java.lang.String getName()