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
FieldsModifier and TypeFieldDescriptionprotected booleanprotected final ReadyListenerprotected booleanFields inherited from class ProtonInitializable
initialized -
Constructor Summary
ConstructorsConstructorDescriptionProtonHandler(io.netty.channel.EventLoop workerExecutor, org.apache.activemq.artemis.utils.actors.ArtemisExecutor poolExecutor, boolean isServer) -
Method Summary
Modifier and TypeMethodDescriptionaddEventHandler(EventHandler handler) voidafterFlush(Runnable runnable) intcapacity()booleanvoidclose(org.apache.qpid.proton.amqp.transport.ErrorCondition errorCondition, AMQPConnectionContext connectionContext) voidvoidcreateServerSASL(String[] mechanisms) voidflush()voidorg.apache.qpid.proton.engine.Connectionlongorg.apache.qpid.proton.engine.TransportvoidvoidvoidinputBuffer(io.netty.buffer.ByteBuf buffer) voidbooleanbooleanvoidonSaslChallenge(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(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) voidvoidvoidvoidvoidvoidWe cannot flush until the initial handshake was finished.voidsetChosenMechanism(ServerSASL chosenMechanism) voidsetClientMechanism(ClientSASL saslClientMech) setReadable(boolean readable) tick(boolean firstTick) Methods inherited from class ProtonInitializable
isInitialized
-
Field Details
-
dataReceived
protected volatile boolean dataReceived -
receivedFirstPacket
protected boolean receivedFirstPacket -
readyListener
-
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
-
initialize
- Specified by:
initializein classProtonInitializable- Throws:
Exception
-
afterFlush
-
runAfterFlush
public void runAfterFlush() -
tick
-
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
-
createServerSASL
-
instantFlush
public void instantFlush() -
flushBytes
public void flushBytes() -
getSASLResult
-
inputBuffer
public void inputBuffer(io.netty.buffer.ByteBuf buffer) -
checkDataReceived
public boolean checkDataReceived() -
getCreationTime
public long getCreationTime() -
runOnPool
-
runNow
-
runLater
-
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
-
open
-
setChosenMechanism
-
setClientMechanism
-
createClientSASL
public void createClientSASL()
-