Class AMQPSessionCallback
- java.lang.Object
-
- org.apache.activemq.artemis.protocol.amqp.broker.AMQPSessionCallback
-
- All Implemented Interfaces:
SessionCallback
public class AMQPSessionCallback extends Object implements SessionCallback
-
-
Field Summary
Fields Modifier and Type Field Description protected IDGeneratorconsumerIDGenerator
-
Constructor Summary
Constructors Constructor Description AMQPSessionCallback(AMQPConnectionCallback protonSPI, ProtonProtocolManager manager, AMQPConnectionContext connection, Connection transportConnection, Executor executor, OperationContext operationContext)
-
Method Summary
-
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.spi.core.protocol.SessionCallback
hasCredits
-
-
-
-
Field Detail
-
consumerIDGenerator
protected final IDGenerator consumerIDGenerator
-
-
Constructor Detail
-
AMQPSessionCallback
public AMQPSessionCallback(AMQPConnectionCallback protonSPI, ProtonProtocolManager manager, AMQPConnectionContext connection, Connection transportConnection, Executor executor, OperationContext operationContext)
-
-
Method Detail
-
getStorageManager
public StorageManager getStorageManager()
-
getCoreMessageObjectPools
public CoreMessageObjectPools getCoreMessageObjectPools()
-
getProtocolManager
public ProtonProtocolManager getProtocolManager()
-
isWritable
public boolean isWritable(ReadyListener callback, Object protocolContext)
- Specified by:
isWritablein interfaceSessionCallback
-
withinSessionExecutor
public void withinSessionExecutor(Runnable run)
-
afterIO
public void afterIO(IOCallback ioCallback)
-
getSessionContext
public OperationContext getSessionContext()
-
browserFinished
public void browserFinished(ServerConsumer consumer)
- Specified by:
browserFinishedin interfaceSessionCallback
-
supportsDirectDelivery
public boolean supportsDirectDelivery()
- Specified by:
supportsDirectDeliveryin interfaceSessionCallback
-
init
public void init(AMQPSessionContext protonSession, SASLResult saslResult) throws Exception
- Throws:
Exception
-
afterDelivery
public void afterDelivery() throws Exception- Specified by:
afterDeliveryin interfaceSessionCallback- Throws:
Exception
-
start
public void start()
-
createSender
public Object createSender(ProtonServerSenderContext protonSender, SimpleString queue, String filter, boolean browserOnly) throws Exception
- Throws:
Exception
-
createTemporaryQueue
public void createTemporaryQueue(SimpleString queueName, RoutingType routingType) throws Exception
- Throws:
Exception
-
createTemporaryQueue
public void createTemporaryQueue(SimpleString address, SimpleString queueName, RoutingType routingType, SimpleString filter) throws Exception
- Throws:
Exception
-
createUnsharedDurableQueue
public void createUnsharedDurableQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter) throws Exception
- Throws:
Exception
-
createSharedDurableQueue
public void createSharedDurableQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter) throws Exception
- Throws:
Exception
-
createSharedVolatileQueue
public void createSharedVolatileQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter) throws Exception
- Throws:
Exception
-
queueQuery
public QueueQueryResult queueQuery(SimpleString queueName, RoutingType routingType, boolean autoCreate) throws Exception
- Throws:
Exception
-
checkAddressAndAutocreateIfPossible
public boolean checkAddressAndAutocreateIfPossible(SimpleString address, RoutingType routingType) throws Exception
- Throws:
Exception
-
addressQuery
public AddressQueryResult addressQuery(SimpleString addressName, RoutingType routingType, boolean autoCreate) throws Exception
- Throws:
Exception
-
tempQueueName
public String tempQueueName()
-
close
public void close(boolean failed)
- Specified by:
closein interfaceSessionCallback
-
ack
public void ack(Transaction transaction, Object brokerConsumer, Message message) throws Exception
- Throws:
Exception
-
cancel
public void cancel(Object brokerConsumer, Message message, boolean updateCounts) throws Exception
- Throws:
Exception
-
reject
public void reject(Object brokerConsumer, Message message) throws Exception
- Throws:
Exception
-
resumeDelivery
public void resumeDelivery(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, Transaction transaction, org.apache.qpid.proton.engine.Receiver receiver, org.apache.qpid.proton.engine.Delivery delivery, SimpleString address, RoutingContext routingContext, AMQPMessage message) throws Exception
- Throws:
Exception
-
flow
public void flow(SimpleString address, Runnable runnable)
Will execute a Runnable on an Address when there's space in memory
-
deleteQueue
public void deleteQueue(SimpleString queueName) throws Exception
- Throws:
Exception
-
resetContext
public void resetContext(OperationContext oldContext)
-
recoverContext
public OperationContext recoverContext()
-
sendProducerCreditsMessage
public void sendProducerCreditsMessage(int credits, SimpleString address)- Specified by:
sendProducerCreditsMessagein interfaceSessionCallback
-
updateDeliveryCountAfterCancel
public boolean updateDeliveryCountAfterCancel(ServerConsumer consumer, MessageReference ref, boolean failed)
- Specified by:
updateDeliveryCountAfterCancelin interfaceSessionCallback
-
sendProducerCreditsFailMessage
public void sendProducerCreditsFailMessage(int credits, SimpleString address)- Specified by:
sendProducerCreditsFailMessagein interfaceSessionCallback
-
sendMessage
public int sendMessage(MessageReference ref, Message message, ServerConsumer consumer, int deliveryCount)
- Specified by:
sendMessagein interfaceSessionCallback
-
sendLargeMessage
public int sendLargeMessage(MessageReference ref, Message message, ServerConsumer consumer, long bodySize, int deliveryCount)
- Specified by:
sendLargeMessagein interfaceSessionCallback
-
sendLargeMessageContinuation
public int sendLargeMessageContinuation(ServerConsumer consumer, byte[] body, boolean continues, boolean requiresResponse)
- Specified by:
sendLargeMessageContinuationin interfaceSessionCallback
-
closed
public void closed()
- Specified by:
closedin interfaceSessionCallback
-
disconnect
public void disconnect(ServerConsumer consumer, SimpleString queueName)
- Specified by:
disconnectin interfaceSessionCallback
-
hasCredits
public boolean hasCredits(ServerConsumer consumer)
- Specified by:
hasCreditsin interfaceSessionCallback
-
getCurrentTransaction
public Transaction getCurrentTransaction()
- Specified by:
getCurrentTransactionin interfaceSessionCallback
-
getTransaction
public 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 SimpleString getMatchingQueue(SimpleString address, RoutingType routingType) throws Exception
- Throws:
Exception
-
getMatchingQueue
public SimpleString getMatchingQueue(SimpleString address, SimpleString queueName, RoutingType routingType) throws Exception
- Throws:
Exception
-
getAddress
public AddressInfo getAddress(SimpleString address)
-
removeTemporaryQueue
public void removeTemporaryQueue(SimpleString address) throws Exception
- Throws:
Exception
-
getDefaultRoutingType
public RoutingType getDefaultRoutingType(SimpleString address)
-
check
public void check(SimpleString address, CheckType checkType, SecurityAuth session) throws Exception
- Throws:
Exception
-
invokeIncoming
public String invokeIncoming(AMQPMessage message, ActiveMQProtonRemotingConnection connection)
-
invokeOutgoing
public String invokeOutgoing(AMQPMessage message, ActiveMQProtonRemotingConnection connection)
-
addProducer
public void addProducer(ServerProducer serverProducer)
-
removeProducer
public void removeProducer(String name)
-
setTransactionHandler
public void setTransactionHandler(ProtonTransactionHandler transactionHandler)
-
getTransportConnection
public Connection getTransportConnection()
-
getTransactionHandler
public ProtonTransactionHandler getTransactionHandler()
-
-