Class AMQSession
- java.lang.Object
-
- org.apache.activemq.artemis.core.protocol.openwire.amq.AMQSession
-
- All Implemented Interfaces:
org.apache.activemq.artemis.spi.core.protocol.SessionCallback
public class AMQSession 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 AMQSession(org.apache.activemq.command.ConnectionInfo connInfo, org.apache.activemq.command.SessionInfo sessInfo, org.apache.activemq.artemis.core.server.ActiveMQServer server, OpenWireConnection connection, OpenWireProtocolManager protocolManager, org.apache.activemq.artemis.core.persistence.CoreMessageObjectPools coreMessageObjectPools)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterDelivery()voidbrowserFinished(org.apache.activemq.artemis.core.server.ServerConsumer consumer)voidclose()voidclosed()java.lang.StringconvertWildcard(org.apache.activemq.command.ActiveMQDestination openWireDest)java.util.List<AMQConsumer>createConsumer(org.apache.activemq.command.ConsumerInfo info, org.apache.activemq.artemis.core.server.SlowConsumerDetectionListener slowConsumerDetectionListener)voiddeliverMessage(org.apache.activemq.command.MessageDispatch dispatch)voiddisableSecurity()voiddisconnect(org.apache.activemq.artemis.core.server.ServerConsumer serverConsumer, org.apache.activemq.artemis.api.core.SimpleString queueName)OpenWireConnectiongetConnection()org.apache.activemq.command.ConnectionInfogetConnectionInfo()org.apache.activemq.artemis.core.server.ActiveMQServergetCoreServer()org.apache.activemq.artemis.core.server.ServerSessiongetCoreSession()booleanhasCredits(org.apache.activemq.artemis.core.server.ServerConsumer consumer)voidinitialize()booleanisClosed()booleanisInternal()booleanisWritable(org.apache.activemq.artemis.spi.core.remoting.ReadyListener callback, java.lang.Object protocolContext)voidsend(org.apache.activemq.command.ProducerInfo producerInfo, org.apache.activemq.command.Message messageSend, boolean sendProducerAck)intsendLargeMessage(org.apache.activemq.artemis.core.server.MessageReference reference, org.apache.activemq.artemis.api.core.Message message, org.apache.activemq.artemis.core.server.ServerConsumer consumerID, long bodySize, int deliveryCount)intsendLargeMessageContinuation(org.apache.activemq.artemis.core.server.ServerConsumer consumerID, byte[] body, boolean continues, boolean requiresResponse)intsendMessage(org.apache.activemq.artemis.core.server.MessageReference reference, 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)voidstart()booleansupportsDirectDelivery()booleanupdateDeliveryCountAfterCancel(org.apache.activemq.artemis.core.server.ServerConsumer consumer, org.apache.activemq.artemis.core.server.MessageReference ref, boolean failed)org.apache.activemq.openwire.OpenWireFormatwireFormat()
-
-
-
Constructor Detail
-
AMQSession
public AMQSession(org.apache.activemq.command.ConnectionInfo connInfo, org.apache.activemq.command.SessionInfo sessInfo, org.apache.activemq.artemis.core.server.ActiveMQServer server, OpenWireConnection connection, OpenWireProtocolManager protocolManager, org.apache.activemq.artemis.core.persistence.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 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
-
createConsumer
public java.util.List<AMQConsumer> createConsumer(org.apache.activemq.command.ConsumerInfo info, org.apache.activemq.artemis.core.server.SlowConsumerDetectionListener slowConsumerDetectionListener) throws java.lang.Exception
- Throws:
java.lang.Exception
-
start
public void start()
-
afterDelivery
public void afterDelivery() throws java.lang.Exception- Specified by:
afterDeliveryin interfaceorg.apache.activemq.artemis.spi.core.protocol.SessionCallback- Throws:
java.lang.Exception
-
browserFinished
public void browserFinished(org.apache.activemq.artemis.core.server.ServerConsumer consumer)
- Specified by:
browserFinishedin interfaceorg.apache.activemq.artemis.spi.core.protocol.SessionCallback
-
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
-
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
-
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 reference, 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 reference, org.apache.activemq.artemis.api.core.Message message, org.apache.activemq.artemis.core.server.ServerConsumer consumerID, 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 consumerID, 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
-
hasCredits
public boolean hasCredits(org.apache.activemq.artemis.core.server.ServerConsumer consumer)
- Specified by:
hasCreditsin interfaceorg.apache.activemq.artemis.spi.core.protocol.SessionCallback
-
disconnect
public void disconnect(org.apache.activemq.artemis.core.server.ServerConsumer serverConsumer, org.apache.activemq.artemis.api.core.SimpleString queueName)- Specified by:
disconnectin interfaceorg.apache.activemq.artemis.spi.core.protocol.SessionCallback
-
send
public void send(org.apache.activemq.command.ProducerInfo producerInfo, org.apache.activemq.command.Message messageSend, boolean sendProducerAck) throws java.lang.Exception- Throws:
java.lang.Exception
-
convertWildcard
public java.lang.String convertWildcard(org.apache.activemq.command.ActiveMQDestination openWireDest)
-
getCoreSession
public org.apache.activemq.artemis.core.server.ServerSession getCoreSession()
-
getCoreServer
public org.apache.activemq.artemis.core.server.ActiveMQServer getCoreServer()
-
getConnectionInfo
public org.apache.activemq.command.ConnectionInfo getConnectionInfo()
-
disableSecurity
public void disableSecurity()
-
deliverMessage
public void deliverMessage(org.apache.activemq.command.MessageDispatch dispatch)
-
close
public void close() throws java.lang.Exception- Throws:
java.lang.Exception
-
getConnection
public OpenWireConnection getConnection()
-
isInternal
public boolean isInternal()
-
-