Class ProtonHandler

java.lang.Object
org.apache.activemq.artemis.protocol.amqp.proton.ProtonInitializable
org.apache.activemq.artemis.protocol.amqp.proton.handler.ProtonHandler
All Implemented Interfaces:
org.apache.qpid.proton.engine.SaslListener

public class ProtonHandler extends ProtonInitializable implements org.apache.qpid.proton.engine.SaslListener
  • Field Details

    • dataReceived

      protected volatile boolean dataReceived
    • receivedFirstPacket

      protected boolean receivedFirstPacket
    • readyListener

      protected final ReadyListener readyListener
    • afterFlushSet

      protected Set<Runnable> afterFlushSet
  • Constructor Details

    • ProtonHandler

      public ProtonHandler(io.netty.channel.EventLoop workerExecutor, org.apache.activemq.artemis.utils.actors.ArtemisExecutor poolExecutor, boolean isServer)
  • Method Details

    • isReadable

      public boolean isReadable()
    • setReadable

      public ProtonHandler setReadable(boolean readable)
    • initialize

      public void initialize() throws Exception
      Specified by:
      initialize in class ProtonInitializable
      Throws:
      Exception
    • afterFlush

      public void afterFlush(Runnable runnable)
    • runAfterFlush

      public void runAfterFlush()
    • tick

      public Long tick(boolean firstTick)
    • scheduledFlush

      public void scheduledFlush()
      We cannot flush until the initial handshake was finished. If this happens before the handshake, the connection response will happen without SASL and the client will respond and fail with an invalid code.
    • capacity

      public int capacity()
    • isHandler

      public boolean isHandler()
    • requireHandler

      public void requireHandler()
    • getTransport

      public org.apache.qpid.proton.engine.Transport getTransport()
    • getConnection

      public org.apache.qpid.proton.engine.Connection getConnection()
    • addEventHandler

      public ProtonHandler addEventHandler(EventHandler handler)
    • createServerSASL

      public void createServerSASL(String[] mechanisms)
    • instantFlush

      public void instantFlush()
    • flushBytes

      public void flushBytes()
    • getSASLResult

      public SASLResult getSASLResult()
    • inputBuffer

      public void inputBuffer(io.netty.buffer.ByteBuf buffer)
    • checkDataReceived

      public boolean checkDataReceived()
    • getCreationTime

      public long getCreationTime()
    • runOnPool

      public void runOnPool(Runnable runnable)
    • runNow

      public void runNow(Runnable runnable)
    • runLater

      public void runLater(Runnable runnable)
    • flush

      public void flush()
    • close

      public void close(org.apache.qpid.proton.amqp.transport.ErrorCondition errorCondition, AMQPConnectionContext connectionContext)
    • onSaslInit

      public void onSaslInit(org.apache.qpid.proton.engine.Sasl sasl, org.apache.qpid.proton.engine.Transport transport)
      Specified by:
      onSaslInit in interface org.apache.qpid.proton.engine.SaslListener
    • onSaslResponse

      public void onSaslResponse(org.apache.qpid.proton.engine.Sasl sasl, org.apache.qpid.proton.engine.Transport transport)
      Specified by:
      onSaslResponse in interface org.apache.qpid.proton.engine.SaslListener
    • onSaslMechanisms

      public void onSaslMechanisms(org.apache.qpid.proton.engine.Sasl sasl, org.apache.qpid.proton.engine.Transport transport)
      Specified by:
      onSaslMechanisms in interface org.apache.qpid.proton.engine.SaslListener
    • onSaslChallenge

      public void onSaslChallenge(org.apache.qpid.proton.engine.Sasl sasl, org.apache.qpid.proton.engine.Transport transport)
      Specified by:
      onSaslChallenge in interface org.apache.qpid.proton.engine.SaslListener
    • onSaslOutcome

      public void onSaslOutcome(org.apache.qpid.proton.engine.Sasl sasl, org.apache.qpid.proton.engine.Transport transport)
      Specified by:
      onSaslOutcome in interface org.apache.qpid.proton.engine.SaslListener
    • handleError

      public void handleError(Exception e)
    • open

      public void open(String containerId, Map<org.apache.qpid.proton.amqp.Symbol, Object> connectionProperties, org.apache.qpid.proton.amqp.Symbol[] offeredCapabilities, org.apache.qpid.proton.amqp.Symbol[] desiredCapabilities)
    • setChosenMechanism

      public void setChosenMechanism(ServerSASL chosenMechanism)
    • setClientMechanism

      public void setClientMechanism(ClientSASL saslClientMech)
    • createClientSASL

      public void createClientSASL()