Class AMQPConnectionContext
java.lang.Object
org.apache.activemq.artemis.protocol.amqp.proton.ProtonInitializable
org.apache.activemq.artemis.protocol.amqp.proton.AMQPConnectionContext
- All Implemented Interfaces:
EventHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final org.apache.qpid.proton.amqp.Symbolprotected final ProtonHandlerFields inherited from class ProtonInitializable
initialized -
Constructor Summary
ConstructorsConstructorDescriptionAMQPConnectionContext(ProtonProtocolManager protocolManager, AMQPConnectionCallback connectionSP, String containerId, int idleTimeout, int maxFrameSize, int channelMax, boolean useCoreSubscriptionNaming, ScheduledExecutorService scheduledPool, boolean isIncomingConnection, ClientSASLFactory saslClientFactory, Map<org.apache.qpid.proton.amqp.Symbol, Object> connectionProperties, org.apache.qpid.proton.amqp.Symbol[] offeredCapabilities, org.apache.qpid.proton.amqp.Symbol[] desiredCapabilities) AMQPConnectionContext(ProtonProtocolManager protocolManager, AMQPConnectionCallback connectionSP, String containerId, int idleTimeout, int maxFrameSize, int channelMax, boolean useCoreSubscriptionNaming, ScheduledExecutorService scheduledPool, boolean isIncomingConnection, ClientSASLFactory saslClientFactory, Map<org.apache.qpid.proton.amqp.Symbol, Object> connectionProperties, org.apache.qpid.proton.amqp.Symbol[] offeredCapabilities, org.apache.qpid.proton.amqp.Symbol[] desiredCapabilities, boolean brokerConnection) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEventHandler(EventHandler eventHandler) addLinkRemoteCloseListener(String id, LinkCloseListener linkCloseListener) Adds a listener that will be invoked any time an AMQP link is remotely closed before having been closed on this end of the connection.addRemoteOpenedListener(Consumer<AMQPConnectionContext> listener) voidafterFlush(Runnable runnable) booleanvoidClear all link remote close listeners, usually done before connection termination to avoid any remote close events triggering processing after the connection shutdown has already started.voidclose(org.apache.qpid.proton.amqp.transport.ErrorCondition errorCondition) voiddestroy()voidvoidbooleanflowControl(ReadyListener readyListener) voidflush()intintlongorg.apache.activemq.artemis.core.security.SecurityAuthgetSessionExtension(org.apache.qpid.proton.engine.Session realSession) Map<org.apache.qpid.proton.engine.Session, AMQPSessionContext> getUser()voidprotected voidvoidinputBuffer(io.netty.buffer.ByteBuf buffer) voidbooleanbooleanbooleanbooleanbooleanbooleanprotected AMQPSessionContextnewSessionExtension(org.apache.qpid.proton.engine.Session realSession) voidonAuthFailed(ProtonHandler protonHandler, org.apache.qpid.proton.engine.Connection connection) voidonAuthInit(ProtonHandler handler, org.apache.qpid.proton.engine.Connection connection, boolean sasl) voidonAuthSuccess(ProtonHandler protonHandler, org.apache.qpid.proton.engine.Connection connection) voidonDelivery(org.apache.qpid.proton.engine.Delivery delivery) voidonFlow(org.apache.qpid.proton.engine.Link link) voidonLocalClose(org.apache.qpid.proton.engine.Connection connection) voidonLocalDetach(org.apache.qpid.proton.engine.Link link) voidonLocalOpen(org.apache.qpid.proton.engine.Session session) voidonRemoteClose(org.apache.qpid.proton.engine.Connection connection) voidonRemoteClose(org.apache.qpid.proton.engine.Link link) voidonRemoteClose(org.apache.qpid.proton.engine.Session session) voidonRemoteDetach(org.apache.qpid.proton.engine.Link link) voidonRemoteOpen(org.apache.qpid.proton.engine.Connection connection) voidonRemoteOpen(org.apache.qpid.proton.engine.Link link) voidonRemoteOpen(org.apache.qpid.proton.engine.Session session) voidonSaslMechanismsOffered(ProtonHandler handler, String[] mechanisms) voidonSaslRemoteMechanismChosen(ProtonHandler handler, String mech) voidonTransport(org.apache.qpid.proton.engine.Transport transport) voidonTransportError(org.apache.qpid.proton.engine.Transport transport) voidopen()voidpushBytes(io.netty.buffer.ByteBuf bytes) protected voidremoteLinkOpened(org.apache.qpid.proton.engine.Link link) voidRemove the link remote close listener that is identified by the given ID.voidvoidvoidvoidvoidprotected booleanvalidateConnection(org.apache.qpid.proton.engine.Connection connection) Methods inherited from class ProtonInitializable
isInitializedMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface EventHandler
onFinal, onFinal, onFinal, onInit, onInit, onInit, onLocalClose, onLocalClose, onLocalOpen, onLocalOpen
-
Field Details
-
CONNECTION_OPEN_FAILED
public static final org.apache.qpid.proton.amqp.Symbol CONNECTION_OPEN_FAILED -
AMQP_CONTAINER_ID
- See Also:
-
handler
-
-
Constructor Details
-
AMQPConnectionContext
public AMQPConnectionContext(ProtonProtocolManager protocolManager, AMQPConnectionCallback connectionSP, String containerId, int idleTimeout, int maxFrameSize, int channelMax, boolean useCoreSubscriptionNaming, ScheduledExecutorService scheduledPool, boolean isIncomingConnection, ClientSASLFactory saslClientFactory, Map<org.apache.qpid.proton.amqp.Symbol, Object> connectionProperties, org.apache.qpid.proton.amqp.Symbol[] offeredCapabilities, org.apache.qpid.proton.amqp.Symbol[] desiredCapabilities) -
AMQPConnectionContext
public AMQPConnectionContext(ProtonProtocolManager protocolManager, AMQPConnectionCallback connectionSP, String containerId, int idleTimeout, int maxFrameSize, int channelMax, boolean useCoreSubscriptionNaming, ScheduledExecutorService scheduledPool, boolean isIncomingConnection, ClientSASLFactory saslClientFactory, Map<org.apache.qpid.proton.amqp.Symbol, Object> connectionProperties, org.apache.qpid.proton.amqp.Symbol[] offeredCapabilities, org.apache.qpid.proton.amqp.Symbol[] desiredCapabilities, boolean brokerConnection)
-
-
Method Details
-
disableAutoRead
public void disableAutoRead() -
enableAutoRead
public void enableAutoRead() -
isLargeMessageSync
public boolean isLargeMessageSync() -
initialize
- Specified by:
initializein classProtonInitializable- Throws:
Exception
-
addLinkRemoteCloseListener
public AMQPConnectionContext addLinkRemoteCloseListener(String id, LinkCloseListener linkCloseListener) Adds a listener that will be invoked any time an AMQP link is remotely closed before having been closed on this end of the connection.- Parameters:
id- A unique ID assigned to the listener used to later remove it if needed.linkCloseListener- The instance of a closed listener.- Returns:
- this connection context instance
-
removeLinkRemoteCloseListener
Remove the link remote close listener that is identified by the given ID.- Parameters:
id- The unique ID assigned to the listener when it was added.
-
clearLinkRemoteCloseListeners
public void clearLinkRemoteCloseListeners()Clear all link remote close listeners, usually done before connection termination to avoid any remote close events triggering processing after the connection shutdown has already started. -
isBrokerConnection
public boolean isBrokerConnection() -
requireInHandler
public void requireInHandler() -
isHandler
public boolean isHandler() -
scheduledFlush
public void scheduledFlush() -
isIncomingConnection
public boolean isIncomingConnection() -
getSaslClientFactory
-
newSessionExtension
protected AMQPSessionContext newSessionExtension(org.apache.qpid.proton.engine.Session realSession) throws ActiveMQAMQPException - Throws:
ActiveMQAMQPException
-
getSessions
-
getSecurityAuth
public org.apache.activemq.artemis.core.security.SecurityAuth getSecurityAuth() -
getSASLResult
-
inputBuffer
public void inputBuffer(io.netty.buffer.ByteBuf buffer) -
getHandler
-
getUser
-
getPassword
-
getValidatedUser
-
destroy
public void destroy() -
isSyncOnFlush
public boolean isSyncOnFlush() -
instantFlush
public void instantFlush() -
flush
public void flush() -
afterFlush
-
close
public void close(org.apache.qpid.proton.amqp.transport.ErrorCondition errorCondition) -
getSessionExtension
public AMQPSessionContext getSessionExtension(org.apache.qpid.proton.engine.Session realSession) throws ActiveMQAMQPException - Throws:
ActiveMQAMQPException
-
runOnPool
-
runNow
-
runLater
-
validateConnection
protected boolean validateConnection(org.apache.qpid.proton.engine.Connection connection) -
checkDataReceived
public boolean checkDataReceived() -
getCreationTime
public long getCreationTime() -
getRemoteContainer
-
getPubSubPrefix
-
initInternal
-
getConnectionCallback
-
remoteLinkOpened
-
open
public void open() -
getContainer
-
addEventHandler
-
getProtocolManager
-
getAmqpLowCredits
public int getAmqpLowCredits() -
getAmqpCredits
public int getAmqpCredits() -
isUseCoreSubscriptionNaming
public boolean isUseCoreSubscriptionNaming() -
onAuthInit
public void onAuthInit(ProtonHandler handler, org.apache.qpid.proton.engine.Connection connection, boolean sasl) - Specified by:
onAuthInitin interfaceEventHandler
-
onSaslRemoteMechanismChosen
- Specified by:
onSaslRemoteMechanismChosenin interfaceEventHandler
-
onSaslMechanismsOffered
- Specified by:
onSaslMechanismsOfferedin interfaceEventHandler
-
onAuthFailed
public void onAuthFailed(ProtonHandler protonHandler, org.apache.qpid.proton.engine.Connection connection) - Specified by:
onAuthFailedin interfaceEventHandler
-
onAuthSuccess
public void onAuthSuccess(ProtonHandler protonHandler, org.apache.qpid.proton.engine.Connection connection) - Specified by:
onAuthSuccessin interfaceEventHandler
-
onTransport
public void onTransport(org.apache.qpid.proton.engine.Transport transport) - Specified by:
onTransportin interfaceEventHandler
-
pushBytes
public void pushBytes(io.netty.buffer.ByteBuf bytes) - Specified by:
pushBytesin interfaceEventHandler
-
flowControl
- Specified by:
flowControlin interfaceEventHandler
-
getRemoteAddress
- Specified by:
getRemoteAddressin interfaceEventHandler
-
addRemoteOpenedListener
-
onRemoteOpen
- Specified by:
onRemoteOpenin interfaceEventHandler- Throws:
Exception
-
onTransportError
- Specified by:
onTransportErrorin interfaceEventHandler- Throws:
Exception
-
onLocalClose
public void onLocalClose(org.apache.qpid.proton.engine.Connection connection) - Specified by:
onLocalClosein interfaceEventHandler
-
onRemoteClose
public void onRemoteClose(org.apache.qpid.proton.engine.Connection connection) - Specified by:
onRemoteClosein interfaceEventHandler
-
onLocalOpen
- Specified by:
onLocalOpenin interfaceEventHandler- Throws:
Exception
-
onRemoteOpen
- Specified by:
onRemoteOpenin interfaceEventHandler- Throws:
Exception
-
onRemoteClose
- Specified by:
onRemoteClosein interfaceEventHandler- Throws:
Exception
-
onRemoteOpen
- Specified by:
onRemoteOpenin interfaceEventHandler- Throws:
Exception
-
onFlow
- Specified by:
onFlowin interfaceEventHandler- Throws:
Exception
-
onRemoteClose
- Specified by:
onRemoteClosein interfaceEventHandler- Throws:
Exception
-
onRemoteDetach
- Specified by:
onRemoteDetachin interfaceEventHandler- Throws:
Exception
-
onLocalDetach
- Specified by:
onLocalDetachin interfaceEventHandler- Throws:
Exception
-
onDelivery
- Specified by:
onDeliveryin interfaceEventHandler- Throws:
Exception
-