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
public class AMQPConnectionContext extends ProtonInitializable implements EventHandler
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringAMQP_CONTAINER_IDstatic org.apache.qpid.proton.amqp.SymbolCONNECTION_OPEN_FAILEDprotected ProtonHandlerhandler
-
Constructor Summary
Constructors Constructor Description AMQPConnectionContext(ProtonProtocolManager protocolManager, AMQPConnectionCallback connectionSP, java.lang.String containerId, int idleTimeout, int maxFrameSize, int channelMax, boolean useCoreSubscriptionNaming, java.util.concurrent.ScheduledExecutorService scheduledPool, boolean isIncomingConnection, ClientSASLFactory saslClientFactory, java.util.Map<org.apache.qpid.proton.amqp.Symbol,java.lang.Object> connectionProperties)AMQPConnectionContext(ProtonProtocolManager protocolManager, AMQPConnectionCallback connectionSP, java.lang.String containerId, int idleTimeout, int maxFrameSize, int channelMax, boolean useCoreSubscriptionNaming, java.util.concurrent.ScheduledExecutorService scheduledPool, boolean isIncomingConnection, ClientSASLFactory saslClientFactory, java.util.Map<org.apache.qpid.proton.amqp.Symbol,java.lang.Object> connectionProperties, boolean bridgeConnection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddEventHandler(EventHandler eventHandler)voidafterFlush(java.lang.Runnable runnable)booleancheckDataReceived()voidclose(org.apache.qpid.proton.amqp.transport.ErrorCondition errorCondition)voiddestroy()booleanflowControl(org.apache.activemq.artemis.spi.core.remoting.ReadyListener readyListener)voidflush()intgetAmqpCredits()intgetAmqpLowCredits()AMQPConnectionCallbackgetConnectionCallback()org.apache.qpid.proton.amqp.Symbol[]getConnectionCapabilitiesOffered()java.lang.StringgetContainer()longgetCreationTime()ProtonHandlergetHandler()LinkCloseListenergetLinkCloseListener()java.lang.StringgetPassword()ProtonProtocolManagergetProtocolManager()java.lang.StringgetPubSubPrefix()java.lang.StringgetRemoteAddress()java.lang.StringgetRemoteContainer()ClientSASLFactorygetSaslClientFactory()SASLResultgetSASLResult()org.apache.activemq.artemis.core.security.SecurityAuthgetSecurityAuth()AMQPSessionContextgetSessionExtension(org.apache.qpid.proton.engine.Session realSession)java.util.Map<org.apache.qpid.proton.engine.Session,AMQPSessionContext>getSessions()java.lang.StringgetUser()java.lang.StringgetValidatedUser()protected voidinitInternal()voidinputBuffer(io.netty.buffer.ByteBuf buffer)voidinstantFlush()booleanisBridgeConnection()booleanisHandler()booleanisIncomingConnection()booleanisSyncOnFlush()booleanisUseCoreSubscriptionNaming()protected 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)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, java.lang.String[] mechanisms)voidonSaslRemoteMechanismChosen(ProtonHandler handler, java.lang.String mech)voidonTransport(org.apache.qpid.proton.engine.Transport transport)voidopen()voidpushBytes(io.netty.buffer.ByteBuf bytes)protected voidremoteLinkOpened(org.apache.qpid.proton.engine.Link link)voidrequireInHandler()voidrunLater(java.lang.Runnable run)voidrunNow(java.lang.Runnable run)voidrunOnPool(java.lang.Runnable run)voidscheduledFlush()AMQPConnectionContextsetLinkCloseListener(LinkCloseListener linkCloseListener)protected booleanvalidateConnection(org.apache.qpid.proton.engine.Connection connection)protected booleanverifyDesiredCapabilities(org.apache.qpid.proton.engine.Receiver reciever, org.apache.qpid.proton.amqp.Symbol s)-
Methods inherited from class org.apache.activemq.artemis.protocol.amqp.proton.ProtonInitializable
initialize, isInitialized
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.activemq.artemis.protocol.amqp.proton.handler.EventHandler
onFinal, onFinal, onFinal, onInit, onInit, onInit, onLocalClose, onLocalClose, onLocalClose, onLocalOpen, onLocalOpen
-
-
-
-
Field Detail
-
CONNECTION_OPEN_FAILED
public static final org.apache.qpid.proton.amqp.Symbol CONNECTION_OPEN_FAILED
-
AMQP_CONTAINER_ID
public static final java.lang.String AMQP_CONTAINER_ID
- See Also:
- Constant Field Values
-
handler
protected final ProtonHandler handler
-
-
Constructor Detail
-
AMQPConnectionContext
public AMQPConnectionContext(ProtonProtocolManager protocolManager, AMQPConnectionCallback connectionSP, java.lang.String containerId, int idleTimeout, int maxFrameSize, int channelMax, boolean useCoreSubscriptionNaming, java.util.concurrent.ScheduledExecutorService scheduledPool, boolean isIncomingConnection, ClientSASLFactory saslClientFactory, java.util.Map<org.apache.qpid.proton.amqp.Symbol,java.lang.Object> connectionProperties)
-
AMQPConnectionContext
public AMQPConnectionContext(ProtonProtocolManager protocolManager, AMQPConnectionCallback connectionSP, java.lang.String containerId, int idleTimeout, int maxFrameSize, int channelMax, boolean useCoreSubscriptionNaming, java.util.concurrent.ScheduledExecutorService scheduledPool, boolean isIncomingConnection, ClientSASLFactory saslClientFactory, java.util.Map<org.apache.qpid.proton.amqp.Symbol,java.lang.Object> connectionProperties, boolean bridgeConnection)
-
-
Method Detail
-
getLinkCloseListener
public LinkCloseListener getLinkCloseListener()
-
setLinkCloseListener
public AMQPConnectionContext setLinkCloseListener(LinkCloseListener linkCloseListener)
-
isBridgeConnection
public boolean isBridgeConnection()
-
requireInHandler
public void requireInHandler()
-
isHandler
public boolean isHandler()
-
scheduledFlush
public void scheduledFlush()
-
isIncomingConnection
public boolean isIncomingConnection()
-
getSaslClientFactory
public ClientSASLFactory getSaslClientFactory()
-
newSessionExtension
protected AMQPSessionContext newSessionExtension(org.apache.qpid.proton.engine.Session realSession) throws ActiveMQAMQPException
- Throws:
ActiveMQAMQPException
-
getSessions
public java.util.Map<org.apache.qpid.proton.engine.Session,AMQPSessionContext> getSessions()
-
getSecurityAuth
public org.apache.activemq.artemis.core.security.SecurityAuth getSecurityAuth()
-
getSASLResult
public SASLResult getSASLResult()
-
inputBuffer
public void inputBuffer(io.netty.buffer.ByteBuf buffer)
-
getHandler
public ProtonHandler getHandler()
-
getUser
public java.lang.String getUser()
-
getPassword
public java.lang.String getPassword()
-
getValidatedUser
public java.lang.String getValidatedUser()
-
destroy
public void destroy()
-
isSyncOnFlush
public boolean isSyncOnFlush()
-
instantFlush
public void instantFlush()
-
flush
public void flush()
-
afterFlush
public void afterFlush(java.lang.Runnable runnable)
-
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
public void runOnPool(java.lang.Runnable run)
-
runNow
public void runNow(java.lang.Runnable run)
-
runLater
public void runLater(java.lang.Runnable run)
-
validateConnection
protected boolean validateConnection(org.apache.qpid.proton.engine.Connection connection)
-
checkDataReceived
public boolean checkDataReceived()
-
getCreationTime
public long getCreationTime()
-
getRemoteContainer
public java.lang.String getRemoteContainer()
-
getPubSubPrefix
public java.lang.String getPubSubPrefix()
-
initInternal
protected void initInternal() throws java.lang.Exception- Throws:
java.lang.Exception
-
getConnectionCallback
public AMQPConnectionCallback getConnectionCallback()
-
remoteLinkOpened
protected void remoteLinkOpened(org.apache.qpid.proton.engine.Link link) throws java.lang.Exception- Throws:
java.lang.Exception
-
verifyDesiredCapabilities
protected boolean verifyDesiredCapabilities(org.apache.qpid.proton.engine.Receiver reciever, org.apache.qpid.proton.amqp.Symbol s)
-
getConnectionCapabilitiesOffered
public org.apache.qpid.proton.amqp.Symbol[] getConnectionCapabilitiesOffered()
-
open
public void open()
-
getContainer
public java.lang.String getContainer()
-
addEventHandler
public void addEventHandler(EventHandler eventHandler)
-
getProtocolManager
public ProtonProtocolManager 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
public void onSaslRemoteMechanismChosen(ProtonHandler handler, java.lang.String mech)
- Specified by:
onSaslRemoteMechanismChosenin interfaceEventHandler
-
onSaslMechanismsOffered
public void onSaslMechanismsOffered(ProtonHandler handler, java.lang.String[] mechanisms)
- 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
public boolean flowControl(org.apache.activemq.artemis.spi.core.remoting.ReadyListener readyListener)
- Specified by:
flowControlin interfaceEventHandler
-
getRemoteAddress
public java.lang.String getRemoteAddress()
- Specified by:
getRemoteAddressin interfaceEventHandler
-
onRemoteOpen
public void onRemoteOpen(org.apache.qpid.proton.engine.Connection connection) throws java.lang.Exception- Specified by:
onRemoteOpenin interfaceEventHandler- Throws:
java.lang.Exception
-
onRemoteClose
public void onRemoteClose(org.apache.qpid.proton.engine.Connection connection)
- Specified by:
onRemoteClosein interfaceEventHandler
-
onLocalOpen
public void onLocalOpen(org.apache.qpid.proton.engine.Session session) throws java.lang.Exception- Specified by:
onLocalOpenin interfaceEventHandler- Throws:
java.lang.Exception
-
onRemoteOpen
public void onRemoteOpen(org.apache.qpid.proton.engine.Session session) throws java.lang.Exception- Specified by:
onRemoteOpenin interfaceEventHandler- Throws:
java.lang.Exception
-
onRemoteClose
public void onRemoteClose(org.apache.qpid.proton.engine.Session session) throws java.lang.Exception- Specified by:
onRemoteClosein interfaceEventHandler- Throws:
java.lang.Exception
-
onRemoteOpen
public void onRemoteOpen(org.apache.qpid.proton.engine.Link link) throws java.lang.Exception- Specified by:
onRemoteOpenin interfaceEventHandler- Throws:
java.lang.Exception
-
onFlow
public void onFlow(org.apache.qpid.proton.engine.Link link) throws java.lang.Exception- Specified by:
onFlowin interfaceEventHandler- Throws:
java.lang.Exception
-
onRemoteClose
public void onRemoteClose(org.apache.qpid.proton.engine.Link link) throws java.lang.Exception- Specified by:
onRemoteClosein interfaceEventHandler- Throws:
java.lang.Exception
-
onRemoteDetach
public void onRemoteDetach(org.apache.qpid.proton.engine.Link link) throws java.lang.Exception- Specified by:
onRemoteDetachin interfaceEventHandler- Throws:
java.lang.Exception
-
onLocalDetach
public void onLocalDetach(org.apache.qpid.proton.engine.Link link) throws java.lang.Exception- Specified by:
onLocalDetachin interfaceEventHandler- Throws:
java.lang.Exception
-
onDelivery
public void onDelivery(org.apache.qpid.proton.engine.Delivery delivery) throws java.lang.Exception- Specified by:
onDeliveryin interfaceEventHandler- Throws:
java.lang.Exception
-
-