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 Summary
Fields Modifier and Type Field Description protected java.util.Set<java.lang.Runnable>afterFlushSetprotected booleandataReceivedprotected org.apache.activemq.artemis.spi.core.remoting.ReadyListenerreadyListenerprotected booleanreceivedFirstPacket
-
Constructor Summary
Constructors Constructor Description ProtonHandler(io.netty.channel.EventLoop workerExecutor, org.apache.activemq.artemis.utils.actors.ArtemisExecutor poolExecutor, boolean isServer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProtonHandleraddEventHandler(EventHandler handler)voidafterFlush(java.lang.Runnable runnable)intcapacity()booleancheckDataReceived()voidclose(org.apache.qpid.proton.amqp.transport.ErrorCondition errorCondition, AMQPConnectionContext connectionContext)voidcreateClientSASL()voidcreateServerSASL(java.lang.String[] mechanisms)voidflush()voidflushBytes()org.apache.qpid.proton.engine.ConnectiongetConnection()longgetCreationTime()SASLResultgetSASLResult()org.apache.qpid.proton.engine.TransportgetTransport()voidhandleError(java.lang.Exception e)voidinputBuffer(io.netty.buffer.ByteBuf buffer)voidinstantFlush()booleanisHandler()voidonSaslChallenge(org.apache.qpid.proton.engine.Sasl sasl, org.apache.qpid.proton.engine.Transport transport)voidonSaslInit(org.apache.qpid.proton.engine.Sasl sasl, org.apache.qpid.proton.engine.Transport transport)voidonSaslMechanisms(org.apache.qpid.proton.engine.Sasl sasl, org.apache.qpid.proton.engine.Transport transport)voidonSaslOutcome(org.apache.qpid.proton.engine.Sasl sasl, org.apache.qpid.proton.engine.Transport transport)voidonSaslResponse(org.apache.qpid.proton.engine.Sasl sasl, org.apache.qpid.proton.engine.Transport transport)voidopen(java.lang.String containerId, java.util.Map<org.apache.qpid.proton.amqp.Symbol,java.lang.Object> connectionProperties)voidrequireHandler()voidrunAfterFlush()voidrunLater(java.lang.Runnable runnable)voidrunNow(java.lang.Runnable runnable)voidrunOnPool(java.lang.Runnable runnable)voidscheduledFlush()We cannot flush until the initial handshake was finished.voidsetChosenMechanism(ServerSASL chosenMechanism)voidsetClientMechanism(ClientSASL saslClientMech)java.lang.Longtick(boolean firstTick)-
Methods inherited from class org.apache.activemq.artemis.protocol.amqp.proton.ProtonInitializable
initialize, isInitialized
-
-
-
-
Method Detail
-
afterFlush
public void afterFlush(java.lang.Runnable runnable)
-
runAfterFlush
public void runAfterFlush()
-
tick
public java.lang.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(java.lang.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(java.lang.Runnable runnable)
-
runNow
public void runNow(java.lang.Runnable runnable)
-
runLater
public void runLater(java.lang.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:
onSaslInitin interfaceorg.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:
onSaslResponsein interfaceorg.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:
onSaslMechanismsin interfaceorg.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:
onSaslChallengein interfaceorg.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:
onSaslOutcomein interfaceorg.apache.qpid.proton.engine.SaslListener
-
handleError
public void handleError(java.lang.Exception e)
-
open
public void open(java.lang.String containerId, java.util.Map<org.apache.qpid.proton.amqp.Symbol,java.lang.Object> connectionProperties)
-
setChosenMechanism
public void setChosenMechanism(ServerSASL chosenMechanism)
-
setClientMechanism
public void setClientMechanism(ClientSASL saslClientMech)
-
createClientSASL
public void createClientSASL()
-
-