Class AMQSession
- java.lang.Object
-
- org.apache.activemq.artemis.core.protocol.openwire.amq.AMQSession
-
- All Implemented Interfaces:
SessionCallback
public class AMQSession extends Object implements SessionCallback
-
-
Field Summary
Fields Modifier and Type Field Description protected IDGeneratorconsumerIDGenerator
-
Constructor Summary
Constructors Constructor Description AMQSession(org.apache.activemq.command.ConnectionInfo connInfo, org.apache.activemq.command.SessionInfo sessInfo, ActiveMQServer server, OpenWireConnection connection, OpenWireProtocolManager protocolManager, CoreMessageObjectPools coreMessageObjectPools)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterDelivery()voidbrowserFinished(ServerConsumer consumer)voidclose()voidclosed()StringconvertWildcard(org.apache.activemq.command.ActiveMQDestination openWireDest)List<AMQConsumer>createConsumer(org.apache.activemq.command.ConsumerInfo info, SlowConsumerDetectionListener slowConsumerDetectionListener)voiddeliverMessage(org.apache.activemq.command.MessageDispatch dispatch)voiddisableSecurity()voiddisconnect(ServerConsumer serverConsumer, SimpleString queueName)OpenWireConnectiongetConnection()org.apache.activemq.command.ConnectionInfogetConnectionInfo()ActiveMQServergetCoreServer()ServerSessiongetCoreSession()booleanhasCredits(ServerConsumer consumer)voidinitialize()booleanisClosed()booleanisInternal()booleanisWritable(ReadyListener callback, Object protocolContext)voidsend(org.apache.activemq.command.ProducerInfo producerInfo, org.apache.activemq.command.Message messageSend, boolean sendProducerAck)intsendLargeMessage(MessageReference reference, Message message, ServerConsumer consumerID, long bodySize, int deliveryCount)intsendLargeMessageContinuation(ServerConsumer consumerID, byte[] body, boolean continues, boolean requiresResponse)intsendMessage(MessageReference reference, Message message, ServerConsumer consumer, int deliveryCount)voidsendProducerCreditsFailMessage(int credits, SimpleString address)voidsendProducerCreditsMessage(int credits, SimpleString address)voidstart()booleansupportsDirectDelivery()booleanupdateDeliveryCountAfterCancel(ServerConsumer consumer, MessageReference ref, boolean failed)org.apache.activemq.openwire.OpenWireFormatwireFormat()-
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
close, getCurrentTransaction, hasCredits
-
-
-
-
Field Detail
-
consumerIDGenerator
protected final IDGenerator consumerIDGenerator
-
-
Constructor Detail
-
AMQSession
public AMQSession(org.apache.activemq.command.ConnectionInfo connInfo, org.apache.activemq.command.SessionInfo sessInfo, ActiveMQServer server, OpenWireConnection connection, OpenWireProtocolManager protocolManager, CoreMessageObjectPools coreMessageObjectPools)
-
-
Method Detail
-
isClosed
public boolean isClosed()
-
wireFormat
public org.apache.activemq.openwire.OpenWireFormat wireFormat()
-
initialize
public void initialize()
-
supportsDirectDelivery
public boolean supportsDirectDelivery()
- Specified by:
supportsDirectDeliveryin interfaceSessionCallback
-
updateDeliveryCountAfterCancel
public boolean updateDeliveryCountAfterCancel(ServerConsumer consumer, MessageReference ref, boolean failed)
- Specified by:
updateDeliveryCountAfterCancelin interfaceSessionCallback
-
createConsumer
public List<AMQConsumer> createConsumer(org.apache.activemq.command.ConsumerInfo info, SlowConsumerDetectionListener slowConsumerDetectionListener) throws Exception
- Throws:
Exception
-
start
public void start()
-
afterDelivery
public void afterDelivery() throws Exception- Specified by:
afterDeliveryin interfaceSessionCallback- Throws:
Exception
-
browserFinished
public void browserFinished(ServerConsumer consumer)
- Specified by:
browserFinishedin interfaceSessionCallback
-
isWritable
public boolean isWritable(ReadyListener callback, Object protocolContext)
- Specified by:
isWritablein interfaceSessionCallback
-
sendProducerCreditsMessage
public void sendProducerCreditsMessage(int credits, SimpleString address)- Specified by:
sendProducerCreditsMessagein interfaceSessionCallback
-
sendProducerCreditsFailMessage
public void sendProducerCreditsFailMessage(int credits, SimpleString address)- Specified by:
sendProducerCreditsFailMessagein interfaceSessionCallback
-
sendMessage
public int sendMessage(MessageReference reference, Message message, ServerConsumer consumer, int deliveryCount)
- Specified by:
sendMessagein interfaceSessionCallback
-
sendLargeMessage
public int sendLargeMessage(MessageReference reference, Message message, ServerConsumer consumerID, long bodySize, int deliveryCount)
- Specified by:
sendLargeMessagein interfaceSessionCallback
-
sendLargeMessageContinuation
public int sendLargeMessageContinuation(ServerConsumer consumerID, byte[] body, boolean continues, boolean requiresResponse)
- Specified by:
sendLargeMessageContinuationin interfaceSessionCallback
-
closed
public void closed()
- Specified by:
closedin interfaceSessionCallback
-
hasCredits
public boolean hasCredits(ServerConsumer consumer)
- Specified by:
hasCreditsin interfaceSessionCallback
-
disconnect
public void disconnect(ServerConsumer serverConsumer, SimpleString queueName)
- Specified by:
disconnectin interfaceSessionCallback
-
send
public void send(org.apache.activemq.command.ProducerInfo producerInfo, org.apache.activemq.command.Message messageSend, boolean sendProducerAck) throws Exception- Throws:
Exception
-
convertWildcard
public String convertWildcard(org.apache.activemq.command.ActiveMQDestination openWireDest)
-
getCoreSession
public ServerSession getCoreSession()
-
getCoreServer
public ActiveMQServer getCoreServer()
-
getConnectionInfo
public org.apache.activemq.command.ConnectionInfo getConnectionInfo()
-
disableSecurity
public void disableSecurity()
-
deliverMessage
public void deliverMessage(org.apache.activemq.command.MessageDispatch dispatch)
-
getConnection
public OpenWireConnection getConnection()
-
isInternal
public boolean isInternal()
-
-