Class AMQPSessionCallback
- java.lang.Object
-
- org.apache.activemq.artemis.protocol.amqp.broker.AMQPSessionCallback
-
- All Implemented Interfaces:
org.apache.activemq.artemis.spi.core.protocol.SessionCallback
public class AMQPSessionCallback extends java.lang.Object implements org.apache.activemq.artemis.spi.core.protocol.SessionCallback
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.activemq.artemis.utils.IDGeneratorconsumerIDGenerator
-
Constructor Summary
Constructors Constructor Description AMQPSessionCallback(AMQPConnectionCallback protonSPI, ProtonProtocolManager manager, AMQPConnectionContext connection, org.apache.activemq.artemis.spi.core.remoting.Connection transportConnection, java.util.concurrent.Executor executor, org.apache.activemq.artemis.core.persistence.OperationContext operationContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidack(org.apache.activemq.artemis.core.transaction.Transaction transaction, java.lang.Object brokerConsumer, org.apache.activemq.artemis.api.core.Message message)voidaddProducer(org.apache.activemq.artemis.core.server.ServerProducer serverProducer)org.apache.activemq.artemis.core.server.AddressQueryResultaddressQuery(org.apache.activemq.artemis.api.core.SimpleString addressName, org.apache.activemq.artemis.api.core.RoutingType routingType, boolean autoCreate)voidafterDelivery()voidafterIO(org.apache.activemq.artemis.core.io.IOCallback ioCallback)voidbrowserFinished(org.apache.activemq.artemis.core.server.ServerConsumer consumer)voidcancel(java.lang.Object brokerConsumer, org.apache.activemq.artemis.api.core.Message message, boolean updateCounts)voidcheck(org.apache.activemq.artemis.api.core.SimpleString address, org.apache.activemq.artemis.core.security.CheckType checkType, org.apache.activemq.artemis.core.security.SecurityAuth session)booleancheckAddressAndAutocreateIfPossible(org.apache.activemq.artemis.api.core.SimpleString address, org.apache.activemq.artemis.api.core.RoutingType routingType)voidclose()voidclose(boolean failed)voidclosed()voidcloseSender(java.lang.Object brokerConsumer)java.lang.ObjectcreateSender(ProtonServerSenderContext protonSender, org.apache.activemq.artemis.api.core.SimpleString queue, java.lang.String filter, boolean browserOnly)voidcreateSharedDurableQueue(org.apache.activemq.artemis.api.core.SimpleString address, org.apache.activemq.artemis.api.core.RoutingType routingType, org.apache.activemq.artemis.api.core.SimpleString queueName, org.apache.activemq.artemis.api.core.SimpleString filter)voidcreateSharedVolatileQueue(org.apache.activemq.artemis.api.core.SimpleString address, org.apache.activemq.artemis.api.core.RoutingType routingType, org.apache.activemq.artemis.api.core.SimpleString queueName, org.apache.activemq.artemis.api.core.SimpleString filter)AMQPStandardMessagecreateStandardMessage(org.apache.qpid.proton.engine.Delivery delivery, org.apache.qpid.proton.codec.ReadableBuffer data)voidcreateTemporaryQueue(org.apache.activemq.artemis.api.core.SimpleString queueName, org.apache.activemq.artemis.api.core.RoutingType routingType)voidcreateTemporaryQueue(org.apache.activemq.artemis.api.core.SimpleString address, org.apache.activemq.artemis.api.core.SimpleString queueName, org.apache.activemq.artemis.api.core.RoutingType routingType, org.apache.activemq.artemis.api.core.SimpleString filter)voidcreateUnsharedDurableQueue(org.apache.activemq.artemis.api.core.SimpleString address, org.apache.activemq.artemis.api.core.RoutingType routingType, org.apache.activemq.artemis.api.core.SimpleString queueName, org.apache.activemq.artemis.api.core.SimpleString filter)voiddeleteQueue(org.apache.activemq.artemis.api.core.SimpleString queueName)voiddisconnect(org.apache.activemq.artemis.core.server.ServerConsumer consumer, org.apache.activemq.artemis.api.core.SimpleString queueName)voidflow(org.apache.activemq.artemis.api.core.SimpleString address, java.lang.Runnable runnable)Will execute a Runnable on an Address when there's space in memoryorg.apache.activemq.artemis.core.server.impl.AddressInfogetAddress(org.apache.activemq.artemis.api.core.SimpleString address)org.apache.activemq.artemis.core.persistence.CoreMessageObjectPoolsgetCoreMessageObjectPools()org.apache.activemq.artemis.core.transaction.TransactiongetCurrentTransaction()org.apache.activemq.artemis.api.core.RoutingTypegetDefaultRoutingType(org.apache.activemq.artemis.api.core.SimpleString address)org.apache.activemq.artemis.api.core.SimpleStringgetMatchingQueue(org.apache.activemq.artemis.api.core.SimpleString address, org.apache.activemq.artemis.api.core.RoutingType routingType)org.apache.activemq.artemis.api.core.SimpleStringgetMatchingQueue(org.apache.activemq.artemis.api.core.SimpleString address, org.apache.activemq.artemis.api.core.SimpleString queueName, org.apache.activemq.artemis.api.core.RoutingType routingType)ProtonProtocolManagergetProtocolManager()org.apache.activemq.artemis.core.persistence.OperationContextgetSessionContext()org.apache.activemq.artemis.core.persistence.StorageManagergetStorageManager()org.apache.activemq.artemis.core.transaction.TransactiongetTransaction(org.apache.qpid.proton.amqp.Binary txid, boolean remove)ProtonTransactionHandlergetTransactionHandler()org.apache.activemq.artemis.spi.core.remoting.ConnectiongetTransportConnection()booleanhasCredits(org.apache.activemq.artemis.core.server.ServerConsumer consumer)voidinit(AMQPSessionContext protonSession, SASLResult saslResult)java.lang.StringinvokeIncoming(AMQPMessage message, ActiveMQProtonRemotingConnection connection)java.lang.StringinvokeOutgoing(AMQPMessage message, ActiveMQProtonRemotingConnection connection)booleanisWritable(org.apache.activemq.artemis.spi.core.remoting.ReadyListener callback, java.lang.Object protocolContext)org.apache.qpid.proton.amqp.BinarynewTransaction()org.apache.activemq.artemis.core.server.QueueQueryResultqueueQuery(org.apache.activemq.artemis.api.core.SimpleString queueName, org.apache.activemq.artemis.api.core.RoutingType routingType, boolean autoCreate)org.apache.activemq.artemis.core.persistence.OperationContextrecoverContext()voidreject(java.lang.Object brokerConsumer, org.apache.activemq.artemis.api.core.Message message)voidremoveProducer(java.lang.String name)voidremoveTemporaryQueue(org.apache.activemq.artemis.api.core.SimpleString address)voidresetContext(org.apache.activemq.artemis.core.persistence.OperationContext oldContext)voidresumeDelivery(java.lang.Object consumer)intsendLargeMessage(org.apache.activemq.artemis.core.server.MessageReference ref, org.apache.activemq.artemis.api.core.Message message, org.apache.activemq.artemis.core.server.ServerConsumer consumer, long bodySize, int deliveryCount)intsendLargeMessageContinuation(org.apache.activemq.artemis.core.server.ServerConsumer consumer, byte[] body, boolean continues, boolean requiresResponse)intsendMessage(org.apache.activemq.artemis.core.server.MessageReference ref, org.apache.activemq.artemis.api.core.Message message, org.apache.activemq.artemis.core.server.ServerConsumer consumer, int deliveryCount)voidsendProducerCreditsFailMessage(int credits, org.apache.activemq.artemis.api.core.SimpleString address)voidsendProducerCreditsMessage(int credits, org.apache.activemq.artemis.api.core.SimpleString address)voidserverSend(ProtonServerReceiverContext context, org.apache.activemq.artemis.core.transaction.Transaction transaction, org.apache.qpid.proton.engine.Receiver receiver, org.apache.qpid.proton.engine.Delivery delivery, org.apache.activemq.artemis.api.core.SimpleString address, org.apache.activemq.artemis.core.server.RoutingContext routingContext, AMQPMessage message)voidsetTransactionHandler(ProtonTransactionHandler transactionHandler)voidstart()voidstartSender(java.lang.Object brokerConsumer)booleansupportsDirectDelivery()java.lang.StringtempQueueName()booleanupdateDeliveryCountAfterCancel(org.apache.activemq.artemis.core.server.ServerConsumer consumer, org.apache.activemq.artemis.core.server.MessageReference ref, boolean failed)voidwithinContext(java.lang.Runnable run)voidwithinSessionExecutor(java.lang.Runnable run)
-
-
-
Constructor Detail
-
AMQPSessionCallback
public AMQPSessionCallback(AMQPConnectionCallback protonSPI, ProtonProtocolManager manager, AMQPConnectionContext connection, org.apache.activemq.artemis.spi.core.remoting.Connection transportConnection, java.util.concurrent.Executor executor, org.apache.activemq.artemis.core.persistence.OperationContext operationContext)
-
-
Method Detail
-
getStorageManager
public org.apache.activemq.artemis.core.persistence.StorageManager getStorageManager()
-
getCoreMessageObjectPools
public org.apache.activemq.artemis.core.persistence.CoreMessageObjectPools getCoreMessageObjectPools()
-
getProtocolManager
public ProtonProtocolManager getProtocolManager()
-
isWritable
public boolean isWritable(org.apache.activemq.artemis.spi.core.remoting.ReadyListener callback, java.lang.Object protocolContext)- Specified by:
isWritablein interfaceorg.apache.activemq.artemis.spi.core.protocol.SessionCallback
-
withinSessionExecutor
public void withinSessionExecutor(java.lang.Runnable run)
-
withinContext
public void withinContext(java.lang.Runnable run) throws java.lang.Exception- Throws:
java.lang.Exception
-
afterIO
public void afterIO(org.apache.activemq.artemis.core.io.IOCallback ioCallback)
-
getSessionContext
public org.apache.activemq.artemis.core.persistence.OperationContext getSessionContext()
-
browserFinished
public void browserFinished(org.apache.activemq.artemis.core.server.ServerConsumer consumer)
- Specified by:
browserFinishedin interfaceorg.apache.activemq.artemis.spi.core.protocol.SessionCallback
-
supportsDirectDelivery
public boolean supportsDirectDelivery()
- Specified by:
supportsDirectDeliveryin interfaceorg.apache.activemq.artemis.spi.core.protocol.SessionCallback
-
init
public void init(AMQPSessionContext protonSession, SASLResult saslResult) throws java.lang.Exception
- Throws:
java.lang.Exception
-
afterDelivery
public void afterDelivery() throws java.lang.Exception- Specified by:
afterDeliveryin interfaceorg.apache.activemq.artemis.spi.core.protocol.SessionCallback- Throws:
java.lang.Exception
-
start
public void start()
-
createSender
public java.lang.Object createSender(ProtonServerSenderContext protonSender, org.apache.activemq.artemis.api.core.SimpleString queue, java.lang.String filter, boolean browserOnly) throws java.lang.Exception
- Throws:
java.lang.Exception
-
startSender
public void startSender(java.lang.Object brokerConsumer) throws java.lang.Exception- Throws:
java.lang.Exception
-
createTemporaryQueue
public void createTemporaryQueue(org.apache.activemq.artemis.api.core.SimpleString queueName, org.apache.activemq.artemis.api.core.RoutingType routingType) throws java.lang.Exception- Throws:
java.lang.Exception
-
createTemporaryQueue
public void createTemporaryQueue(org.apache.activemq.artemis.api.core.SimpleString address, org.apache.activemq.artemis.api.core.SimpleString queueName, org.apache.activemq.artemis.api.core.RoutingType routingType, org.apache.activemq.artemis.api.core.SimpleString filter) throws java.lang.Exception- Throws:
java.lang.Exception
-
createUnsharedDurableQueue
public void createUnsharedDurableQueue(org.apache.activemq.artemis.api.core.SimpleString address, org.apache.activemq.artemis.api.core.RoutingType routingType, org.apache.activemq.artemis.api.core.SimpleString queueName, org.apache.activemq.artemis.api.core.SimpleString filter) throws java.lang.Exception- Throws:
java.lang.Exception
-
createSharedDurableQueue
public void createSharedDurableQueue(org.apache.activemq.artemis.api.core.SimpleString address, org.apache.activemq.artemis.api.core.RoutingType routingType, org.apache.activemq.artemis.api.core.SimpleString queueName, org.apache.activemq.artemis.api.core.SimpleString filter) throws java.lang.Exception- Throws:
java.lang.Exception
-
createSharedVolatileQueue
public void createSharedVolatileQueue(org.apache.activemq.artemis.api.core.SimpleString address, org.apache.activemq.artemis.api.core.RoutingType routingType, org.apache.activemq.artemis.api.core.SimpleString queueName, org.apache.activemq.artemis.api.core.SimpleString filter) throws java.lang.Exception- Throws:
java.lang.Exception
-
queueQuery
public org.apache.activemq.artemis.core.server.QueueQueryResult queueQuery(org.apache.activemq.artemis.api.core.SimpleString queueName, org.apache.activemq.artemis.api.core.RoutingType routingType, boolean autoCreate) throws java.lang.Exception- Throws:
java.lang.Exception
-
checkAddressAndAutocreateIfPossible
public boolean checkAddressAndAutocreateIfPossible(org.apache.activemq.artemis.api.core.SimpleString address, org.apache.activemq.artemis.api.core.RoutingType routingType) throws java.lang.Exception- Throws:
java.lang.Exception
-
addressQuery
public org.apache.activemq.artemis.core.server.AddressQueryResult addressQuery(org.apache.activemq.artemis.api.core.SimpleString addressName, org.apache.activemq.artemis.api.core.RoutingType routingType, boolean autoCreate) throws java.lang.Exception- Throws:
java.lang.Exception
-
closeSender
public void closeSender(java.lang.Object brokerConsumer) throws java.lang.Exception- Throws:
java.lang.Exception
-
tempQueueName
public java.lang.String tempQueueName()
-
close
public void close() throws java.lang.Exception- Throws:
java.lang.Exception
-
close
public void close(boolean failed)
- Specified by:
closein interfaceorg.apache.activemq.artemis.spi.core.protocol.SessionCallback
-
ack
public void ack(org.apache.activemq.artemis.core.transaction.Transaction transaction, java.lang.Object brokerConsumer, org.apache.activemq.artemis.api.core.Message message) throws java.lang.Exception- Throws:
java.lang.Exception
-
cancel
public void cancel(java.lang.Object brokerConsumer, org.apache.activemq.artemis.api.core.Message message, boolean updateCounts) throws java.lang.Exception- Throws:
java.lang.Exception
-
reject
public void reject(java.lang.Object brokerConsumer, org.apache.activemq.artemis.api.core.Message message) throws java.lang.Exception- Throws:
java.lang.Exception
-
resumeDelivery
public void resumeDelivery(java.lang.Object consumer)
-
createStandardMessage
public AMQPStandardMessage createStandardMessage(org.apache.qpid.proton.engine.Delivery delivery, org.apache.qpid.proton.codec.ReadableBuffer data)
-
serverSend
public void serverSend(ProtonServerReceiverContext context, org.apache.activemq.artemis.core.transaction.Transaction transaction, org.apache.qpid.proton.engine.Receiver receiver, org.apache.qpid.proton.engine.Delivery delivery, org.apache.activemq.artemis.api.core.SimpleString address, org.apache.activemq.artemis.core.server.RoutingContext routingContext, AMQPMessage message) throws java.lang.Exception
- Throws:
java.lang.Exception
-
flow
public void flow(org.apache.activemq.artemis.api.core.SimpleString address, java.lang.Runnable runnable)Will execute a Runnable on an Address when there's space in memory
-
deleteQueue
public void deleteQueue(org.apache.activemq.artemis.api.core.SimpleString queueName) throws java.lang.Exception- Throws:
java.lang.Exception
-
resetContext
public void resetContext(org.apache.activemq.artemis.core.persistence.OperationContext oldContext)
-
recoverContext
public org.apache.activemq.artemis.core.persistence.OperationContext recoverContext()
-
sendProducerCreditsMessage
public void sendProducerCreditsMessage(int credits, org.apache.activemq.artemis.api.core.SimpleString address)- Specified by:
sendProducerCreditsMessagein interfaceorg.apache.activemq.artemis.spi.core.protocol.SessionCallback
-
updateDeliveryCountAfterCancel
public boolean updateDeliveryCountAfterCancel(org.apache.activemq.artemis.core.server.ServerConsumer consumer, org.apache.activemq.artemis.core.server.MessageReference ref, boolean failed)- Specified by:
updateDeliveryCountAfterCancelin interfaceorg.apache.activemq.artemis.spi.core.protocol.SessionCallback
-
sendProducerCreditsFailMessage
public void sendProducerCreditsFailMessage(int credits, org.apache.activemq.artemis.api.core.SimpleString address)- Specified by:
sendProducerCreditsFailMessagein interfaceorg.apache.activemq.artemis.spi.core.protocol.SessionCallback
-
sendMessage
public int sendMessage(org.apache.activemq.artemis.core.server.MessageReference ref, org.apache.activemq.artemis.api.core.Message message, org.apache.activemq.artemis.core.server.ServerConsumer consumer, int deliveryCount)- Specified by:
sendMessagein interfaceorg.apache.activemq.artemis.spi.core.protocol.SessionCallback
-
sendLargeMessage
public int sendLargeMessage(org.apache.activemq.artemis.core.server.MessageReference ref, org.apache.activemq.artemis.api.core.Message message, org.apache.activemq.artemis.core.server.ServerConsumer consumer, long bodySize, int deliveryCount)- Specified by:
sendLargeMessagein interfaceorg.apache.activemq.artemis.spi.core.protocol.SessionCallback
-
sendLargeMessageContinuation
public int sendLargeMessageContinuation(org.apache.activemq.artemis.core.server.ServerConsumer consumer, byte[] body, boolean continues, boolean requiresResponse)- Specified by:
sendLargeMessageContinuationin interfaceorg.apache.activemq.artemis.spi.core.protocol.SessionCallback
-
closed
public void closed()
- Specified by:
closedin interfaceorg.apache.activemq.artemis.spi.core.protocol.SessionCallback
-
disconnect
public void disconnect(org.apache.activemq.artemis.core.server.ServerConsumer consumer, org.apache.activemq.artemis.api.core.SimpleString queueName)- Specified by:
disconnectin interfaceorg.apache.activemq.artemis.spi.core.protocol.SessionCallback
-
hasCredits
public boolean hasCredits(org.apache.activemq.artemis.core.server.ServerConsumer consumer)
- Specified by:
hasCreditsin interfaceorg.apache.activemq.artemis.spi.core.protocol.SessionCallback
-
getCurrentTransaction
public org.apache.activemq.artemis.core.transaction.Transaction getCurrentTransaction()
- Specified by:
getCurrentTransactionin interfaceorg.apache.activemq.artemis.spi.core.protocol.SessionCallback
-
getTransaction
public org.apache.activemq.artemis.core.transaction.Transaction getTransaction(org.apache.qpid.proton.amqp.Binary txid, boolean remove) throws ActiveMQAMQPException- Throws:
ActiveMQAMQPException
-
newTransaction
public org.apache.qpid.proton.amqp.Binary newTransaction()
-
getMatchingQueue
public org.apache.activemq.artemis.api.core.SimpleString getMatchingQueue(org.apache.activemq.artemis.api.core.SimpleString address, org.apache.activemq.artemis.api.core.RoutingType routingType) throws java.lang.Exception- Throws:
java.lang.Exception
-
getMatchingQueue
public org.apache.activemq.artemis.api.core.SimpleString getMatchingQueue(org.apache.activemq.artemis.api.core.SimpleString address, org.apache.activemq.artemis.api.core.SimpleString queueName, org.apache.activemq.artemis.api.core.RoutingType routingType) throws java.lang.Exception- Throws:
java.lang.Exception
-
getAddress
public org.apache.activemq.artemis.core.server.impl.AddressInfo getAddress(org.apache.activemq.artemis.api.core.SimpleString address)
-
removeTemporaryQueue
public void removeTemporaryQueue(org.apache.activemq.artemis.api.core.SimpleString address) throws java.lang.Exception- Throws:
java.lang.Exception
-
getDefaultRoutingType
public org.apache.activemq.artemis.api.core.RoutingType getDefaultRoutingType(org.apache.activemq.artemis.api.core.SimpleString address)
-
check
public void check(org.apache.activemq.artemis.api.core.SimpleString address, org.apache.activemq.artemis.core.security.CheckType checkType, org.apache.activemq.artemis.core.security.SecurityAuth session) throws java.lang.Exception- Throws:
java.lang.Exception
-
invokeIncoming
public java.lang.String invokeIncoming(AMQPMessage message, ActiveMQProtonRemotingConnection connection)
-
invokeOutgoing
public java.lang.String invokeOutgoing(AMQPMessage message, ActiveMQProtonRemotingConnection connection)
-
addProducer
public void addProducer(org.apache.activemq.artemis.core.server.ServerProducer serverProducer)
-
removeProducer
public void removeProducer(java.lang.String name)
-
setTransactionHandler
public void setTransactionHandler(ProtonTransactionHandler transactionHandler)
-
getTransportConnection
public org.apache.activemq.artemis.spi.core.remoting.Connection getTransportConnection()
-
getTransactionHandler
public ProtonTransactionHandler getTransactionHandler()
-
-