Class ClientSessionImpl
- All Implemented Interfaces:
AutoCloseable,XAResource,ClientSession,ClientSessionInternal,FailureListener
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.activemq.artemis.api.core.client.ClientSession
ClientSession.AddressQuery, ClientSession.QueueQuery -
Field Summary
Fields inherited from interface org.apache.activemq.artemis.api.core.client.ClientSession
JMS_SESSION_CLIENT_ID_PROPERTY, JMS_SESSION_IDENTIFIER_PROPERTYFields inherited from interface javax.transaction.xa.XAResource
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY -
Method Summary
Modifier and TypeMethodDescriptionvoidacknowledge(ClientConsumer consumer, Message message) voidaddConsumer(ClientConsumerInternal consumer) voidaddFailoverListener(FailoverEventListener listener) Adds a FailoverEventListener to the session which is notified if a failover event occurs on the session.voidaddFailureListener(SessionFailureListener listener) Adds a FailureListener to the session which is notified if a failure occurs on the session.voidaddMetaData(String key, String data) Attach any metadata to the session.voidaddProducer(ClientProducerInternal producer) addressQuery(SimpleString address) Queries information on a binding.voidaddUniqueMetaData(String key, String data) Attach any metadata to the session.voidcleanUp(boolean failingOver) Not part of the interface, used on tests onlyNot part of the interface, used on tests onlyvoidclose()Closes the session.voidcommit()Commits the current transaction, blocking.voidcommit(boolean block) Commits the current transaction.voidvoidconnectionFailed(ActiveMQException me, boolean failedOver) Notifies that a connection has failed due to the specified exception.voidconnectionFailed(ActiveMQException me, boolean failedOver, String scaleDownTargetNodeID) Notifies that a connection has failed due to the specified exception.static ObjectIf you ever tried to debug XIDs you will know what this is about.voidcreateAddress(SimpleString address, EnumSet<RoutingType> routingTypes, boolean autoCreated) Create Address with a single initial routing typevoidcreateAddress(SimpleString address, Set<RoutingType> routingTypes, boolean autoCreated) Create Address with a single initial routing typevoidcreateAddress(SimpleString address, RoutingType routingType, boolean autoCreated) Create Address with a single initial routing typecreateConsumer(String queueName) Creates a ClientConsumer to consume messages from the queue with the given name.createConsumer(String queueName, boolean browseOnly) Creates a ClientConsumer to consume or browse messages from the queue with the given name.createConsumer(String queueName, String filterString) Creates a ClientConsumer to consume messages matching the filter from the queue with the given name.createConsumer(String queueName, String filterString, boolean browseOnly) Creates a ClientConsumer to consume or browse messages matching the filter from the queue with the given name.createConsumer(String queueName, String filterString, int windowSize, int maxRate, boolean browseOnly) Creates a ClientConsumer to consume or browse messages matching the filter from the queue with the given name.createConsumer(SimpleString queueName) Creates a ClientConsumer to consume message from the queue with the given name.createConsumer(SimpleString queueName, boolean browseOnly) Creates a ClientConsumer to consume or browse messages from the queue with the given name.createConsumer(SimpleString queueName, SimpleString filterString) Creates a ClientConsumer to consume messages matching the filter from the queue with the given name.createConsumer(SimpleString queueName, SimpleString filterString, boolean browseOnly) Creates a ClientConsumer to consume or browse messages matching the filter from the queue with the given name.createConsumer(SimpleString queueName, SimpleString filterString, int priority, boolean browseOnly) Creates a ClientConsumer to consume or browse messages matching the filter from the queue with the given name.createConsumer(SimpleString queueName, SimpleString filterString, int windowSize, int maxRate, boolean browseOnly) Creates a ClientConsumer to consume or browse messages matching the filter from the queue with the given name.createConsumer(SimpleString queueName, SimpleString filterString, int priority, int windowSize, int maxRate, boolean browseOnly) Note, we DO NOT currently support direct consumers (i.e. consumers where delivery occurs on the remoting thread).createMessage(boolean durable) Creates a ClientMessage.createMessage(byte type, boolean durable) Creates a ClientMessage.createMessage(byte type, boolean durable, long expiration, long timestamp, byte priority) Creates a ClientMessage.Creates a producer with no default address.createProducer(String address) Creates a producer which sends messages to the given addresscreateProducer(String address, int rate) createProducer(SimpleString address) Creates a producer which sends messages to the given addresscreateProducer(SimpleString address, int maxRate) Creates a producer which sends messages to the given addressvoidcreateQueue(String address, String queueName) Creates a non-temporary queue non-durable queue.voidcreateQueue(String address, String queueName, boolean durable) Creates a non-temporary queue.voidcreateQueue(String address, String queueName, String filterString, boolean durable) Creates a non-temporaryqueue.voidcreateQueue(String address, String queueName, String filterString, boolean durable, boolean autoCreated) Creates a non-temporaryqueue.voidcreateQueue(String address, RoutingType routingType, String queueName) Deprecated.voidcreateQueue(String address, RoutingType routingType, String queueName, boolean durable) Creates a non-temporary queue.voidcreateQueue(String address, RoutingType routingType, String queueName, String filter, boolean durable) Creates a non-temporaryqueue.voidcreateQueue(String address, RoutingType routingType, String queueName, String filterString, boolean durable, boolean autoCreated) Creates a non-temporaryqueue.voidcreateQueue(String address, RoutingType routingType, String queueName, String filterString, boolean durable, boolean autoCreated, int maxConsumers, boolean purgeOnNoConsumers) Deprecated.voidcreateQueue(String address, RoutingType routingType, String queueName, String filterString, boolean durable, boolean autoCreated, int maxConsumers, boolean purgeOnNoConsumers, Boolean exclusive, Boolean lastValue) Creates a non-temporaryqueue.voidcreateQueue(QueueConfiguration queueConfiguration) This method creates a queue based on theQueueConfigurationinput.voidcreateQueue(SimpleString address, RoutingType routingType, SimpleString queueName) Deprecated.voidcreateQueue(SimpleString address, RoutingType routingType, SimpleString queueName, boolean durable) Deprecated.voidcreateQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, boolean durable) Deprecated.voidcreateQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filterString, boolean durable, boolean autoCreated) Deprecated.voidcreateQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filterString, boolean durable, boolean autoCreated, int maxConsumers, boolean purgeOnNoConsumers) Deprecated.voidcreateQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filterString, boolean durable, boolean autoCreated, int maxConsumers, boolean purgeOnNoConsumers, Boolean exclusive, Boolean lastValue) Deprecated.voidcreateQueue(SimpleString address, SimpleString queueName) Creates a non-temporary queue non-durable queue.voidcreateQueue(SimpleString address, SimpleString queueName, boolean durable) Creates a non-temporary queue.voidcreateQueue(SimpleString address, SimpleString queueName, boolean autoCreated, QueueAttributes queueAttributes) Deprecated.voidcreateQueue(SimpleString address, SimpleString queueName, SimpleString filterString, boolean durable) Creates a non-temporary queue.voidcreateQueue(SimpleString address, SimpleString queueName, SimpleString filterString, boolean durable, boolean autoCreated) Creates a non-temporary queue.voidcreateSharedQueue(QueueConfiguration queueConfiguration) This method is essentially the same asClientSession.createQueue(QueueConfiguration)with a few key exceptions.voidcreateSharedQueue(SimpleString address, RoutingType routingType, SimpleString queueName, boolean durable) Creates a transient queue.voidcreateSharedQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, boolean durable) Creates a transient queue.voidcreateSharedQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, boolean durable, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, Boolean lastValue) Deprecated.voidcreateSharedQueue(SimpleString address, SimpleString queueName, boolean durable) Creates a transient queue.voidcreateSharedQueue(SimpleString address, SimpleString queueName, QueueAttributes queueAttributes) Deprecated.voidcreateSharedQueue(SimpleString address, SimpleString queueName, SimpleString filterString, boolean durable) Creates a transient queue.voidcreateTemporaryQueue(String address, String queueName) Creates a temporary queue.voidcreateTemporaryQueue(String address, String queueName, String filter) Creates a temporary queue with a filter.voidcreateTemporaryQueue(String address, RoutingType routingType, String queueName) Creates a temporary queue.voidcreateTemporaryQueue(String address, RoutingType routingType, String queueName, String filter) Creates a temporary queue with a filter.voidcreateTemporaryQueue(SimpleString address, RoutingType routingType, SimpleString queueName) Creates a temporary queue.voidcreateTemporaryQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter) Deprecated.voidcreateTemporaryQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, int maxConsumers, boolean purgeOnNoConsumers, Boolean exclusive, Boolean lastValue) Deprecated.voidcreateTemporaryQueue(SimpleString address, SimpleString queueName) Creates a temporary queue.voidcreateTemporaryQueue(SimpleString address, SimpleString queueName, QueueAttributes queueAttributes) Deprecated.voidcreateTemporaryQueue(SimpleString address, SimpleString queueName, SimpleString filter) Creates a temporary queue with a filter.voiddeleteQueue(String queueName) Deletes the queue.voiddeleteQueue(SimpleString queueName) Deletes the queue.voidvoidendCall()Opposite ofClientSessionInternal.startCall()voidexpire(ClientConsumer consumer, Message message) voidintgetCredits(SimpleString address, boolean anon) intgetName()Returns theClientSessionFactoryused to created thisClientSession.intintReturns the server'sincrementingVersion.Returns the XAResource associated to the session.voidhandleConsumerDisconnect(ConsumerContext context) booleanhandleFailover(RemotingConnection backupConnection, ActiveMQException cause) voidhandleReceiveContinuation(ConsumerContext consumerID, byte[] chunk, int flowControlSize, boolean isContinues) voidhandleReceiveLargeMessage(ConsumerContext consumerID, ClientLargeMessageInternal clientLargeMessage, long largeMessageSize) voidhandleReceiveMessage(ConsumerContext consumerID, ClientMessageInternal message) voidhandleReceiveProducerCredits(SimpleString address, int credits) voidhandleReceiveProducerFailCredits(SimpleString address, int credits) voidindividualAcknowledge(ClientConsumer consumer, Message message) booleanReturnstrueif the session automatically commit its transaction every time a message is acknowledged by a ClientConsumer created by this session,falseelse.booleanReturns whether the session will automatically commit its transaction every time a message is sent by a ClientProducer created by this session,falseelse.booleanReturnstrueif the session's ClientConsumer block when they acknowledge a message,falseelse.booleanbooleanisClosed()Returnstrueif the session is closed,falseelse.booleanbooleanbooleanbooleanReturnstrueif the current transaction has been flagged to rollback,falseelse.booleanisSameRM(XAResource xares) booleanisWritable(ReadyListener callback) booleanisXA()Returnstrueif the session supports XA,falseelse.voidvoidpostHandleFailover(RemotingConnection connection, boolean successful) voidpreHandleFailover(RemotingConnection connection) intqueueQuery(SimpleString queueName) Queries information on a queue.Xid[]recover(int flags) voidremoveConsumer(ClientConsumerInternal consumer) booleanremoveFailoverListener(FailoverEventListener listener) Removes a FailoverEventListener to the session.booleanremoveFailureListener(SessionFailureListener listener) Removes a FailureListener to the session.voidremoveProducer(ClientProducerInternal producer) voidvoidreturnCredits(SimpleString address) voidrollback()Rolls back the current transaction.voidrollback(boolean isLastMessageAsDelivered) Rolls back the current transaction.voidrollback(boolean isLastMessageAsDelivered, boolean waitConsumers) voidvoidsendProducerCreditsMessage(int credits, SimpleString address) voidsetAddress(Message message, SimpleString address) This will set the address at the messagevoidsetForceNotSameRM(boolean force) voidsetPacketSize(int packetSize) Sets aSendAcknowledgementHandlerfor this session.voidbooleansetTransactionTimeout(int seconds) start()Starts the session.voidvoidThis is used internally to control and educate the user about using the thread boundaries properly. if more than one thread is using the session simultaneously this will generate a big warning on the docs.voidstop()Stops the session.voidstop(boolean waitForOnMessage) toString()voidworkDone()wrap(SendAcknowledgementHandler handler)
-
Method Details
-
createQueue
Description copied from interface:ClientSessionCreates a non-temporary queue non-durable queue.- Specified by:
createQueuein interfaceClientSession- Parameters:
address- the queue will be bound to this addressqueueName- the name of the queue- Throws:
ActiveMQException- in an exception occurs while creating the queue
-
createQueue
public void createQueue(SimpleString address, SimpleString queueName, boolean durable) throws ActiveMQException Description copied from interface:ClientSessionCreates a non-temporary queue.- Specified by:
createQueuein interfaceClientSession- Parameters:
address- the queue will be bound to this addressqueueName- the name of the queuedurable- whether the queue is durable or not- Throws:
ActiveMQException- in an exception occurs while creating the queue
-
createQueue
Description copied from interface:ClientSessionCreates a non-temporary queue.- Specified by:
createQueuein interfaceClientSession- Parameters:
address- the queue will be bound to this addressqueueName- the name of the queuedurable- whether the queue is durable or not- Throws:
ActiveMQException- in an exception occurs while creating the queue
-
createAddress
public void createAddress(SimpleString address, Set<RoutingType> routingTypes, boolean autoCreated) throws ActiveMQException Description copied from interface:ClientSessionCreate Address with a single initial routing type- Specified by:
createAddressin interfaceClientSession- Throws:
ActiveMQException
-
createAddress
public void createAddress(SimpleString address, EnumSet<RoutingType> routingTypes, boolean autoCreated) throws ActiveMQException Description copied from interface:ClientSessionCreate Address with a single initial routing type- Specified by:
createAddressin interfaceClientSession- Throws:
ActiveMQException
-
createAddress
public void createAddress(SimpleString address, RoutingType routingType, boolean autoCreated) throws ActiveMQException Description copied from interface:ClientSessionCreate Address with a single initial routing type- Specified by:
createAddressin interfaceClientSession- Throws:
ActiveMQException
-
createQueue
Description copied from interface:ClientSessionThis method creates a queue based on theQueueConfigurationinput. SeeQueueConfigurationfor more details on configuration specifics.Some static defaults will be enforced for properties which are not set on the
QueueConfiguration:transient:falsetemporary:falsedurable:trueautoCreated:falseinternal:falseconfigurationManaged:falsemaxConsumers:ActiveMQDefaultConfiguration.getDefaultMaxQueueConsumers()purgeOnNoConsumers:ActiveMQDefaultConfiguration.getDefaultPurgeOnNoConsumers()
exclusivegroupRebalancegroupBucketsgroupFirstKeylastValuelastValueKeynonDestructiveconsumersBeforeDispatchdelayBeforeDispatchringSizeroutingTypeautoCreateAddressautoDelete(only set if queue was auto-created)autoDeleteDelayautoDeleteMessageCount
- Specified by:
createQueuein interfaceClientSession- Parameters:
queueConfiguration- the configuration to use when creating the queue- Throws:
ActiveMQException
-
createQueue
public void createQueue(SimpleString address, SimpleString queueName, SimpleString filterString, boolean durable) throws ActiveMQException Description copied from interface:ClientSessionCreates a non-temporary queue.- Specified by:
createQueuein interfaceClientSession- Parameters:
address- the queue will be bound to this addressqueueName- the name of the queuefilterString- only messages which match this filter will be put in the queuedurable- whether the queue is durable or not- Throws:
ActiveMQException- in an exception occurs while creating the queue
-
createQueue
public void createQueue(String address, String queueName, String filterString, boolean durable) throws ActiveMQException Description copied from interface:ClientSessionCreates a non-temporaryqueue.- Specified by:
createQueuein interfaceClientSession- Parameters:
address- the queue will be bound to this addressqueueName- the name of the queuefilterString- only messages which match this filter will be put in the queuedurable- whether the queue is durable or not- Throws:
ActiveMQException- in an exception occurs while creating the queue
-
createQueue
public void createQueue(SimpleString address, SimpleString queueName, SimpleString filterString, boolean durable, boolean autoCreated) throws ActiveMQException Description copied from interface:ClientSessionCreates a non-temporary queue.- Specified by:
createQueuein interfaceClientSession- Parameters:
address- the queue will be bound to this addressqueueName- the name of the queuefilterString- only messages which match this filter will be put in the queuedurable- whether the queue is durable or notautoCreated- whether to mark this queue as autoCreated or not- Throws:
ActiveMQException- in an exception occurs while creating the queue
-
createQueue
public void createQueue(String address, String queueName, String filterString, boolean durable, boolean autoCreated) throws ActiveMQException Description copied from interface:ClientSessionCreates a non-temporaryqueue.- Specified by:
createQueuein interfaceClientSession- Parameters:
address- the queue will be bound to this addressqueueName- the name of the queuefilterString- only messages which match this filter will be put in the queuedurable- whether the queue is durable or notautoCreated- whether to mark this queue as autoCreated or not- Throws:
ActiveMQException- in an exception occurs while creating the queue
-
createTemporaryQueue
public void createTemporaryQueue(SimpleString address, SimpleString queueName) throws ActiveMQException Description copied from interface:ClientSessionCreates a temporary queue.- Specified by:
createTemporaryQueuein interfaceClientSession- Parameters:
address- the queue will be bound to this addressqueueName- the name of the queue- Throws:
ActiveMQException- in an exception occurs while creating the queue
-
createTemporaryQueue
Description copied from interface:ClientSessionCreates a temporary queue.- Specified by:
createTemporaryQueuein interfaceClientSession- Parameters:
address- the queue will be bound to this addressqueueName- the name of the queue- Throws:
ActiveMQException- in an exception occurs while creating the queue
-
createTemporaryQueue
public void createTemporaryQueue(SimpleString address, SimpleString queueName, SimpleString filter) throws ActiveMQException Description copied from interface:ClientSessionCreates a temporary queue with a filter.- Specified by:
createTemporaryQueuein interfaceClientSession- Parameters:
address- the queue will be bound to this addressqueueName- the name of the queuefilter- only messages which match this filter will be put in the queue- Throws:
ActiveMQException- in an exception occurs while creating the queue
-
createTemporaryQueue
public void createTemporaryQueue(String address, String queueName, String filter) throws ActiveMQException Description copied from interface:ClientSessionCreates a temporary queue with a filter.- Specified by:
createTemporaryQueuein interfaceClientSession- Parameters:
address- the queue will be bound to this addressqueueName- the name of the queuefilter- only messages which match this filter will be put in the queue- Throws:
ActiveMQException- in an exception occurs while creating the queue
-
createQueue
@Deprecated public void createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filterString, boolean durable, boolean autoCreated) throws ActiveMQException Deprecated.Description copied from interface:ClientSessionCreates a non-temporary queue.- Specified by:
createQueuein interfaceClientSession- Parameters:
address- the queue will be bound to this addressroutingType- the routing type for this queue, MULTICAST or ANYCASTqueueName- the name of the queuefilterString- only messages which match this filter will be put in the queuedurable- whether the queue is durable or notautoCreated- whether to mark this queue as autoCreated or not- Throws:
ActiveMQException- in an exception occurs while creating the queue
-
createQueue
public void createQueue(String address, RoutingType routingType, String queueName, String filterString, boolean durable, boolean autoCreated) throws ActiveMQException Description copied from interface:ClientSessionCreates a non-temporaryqueue.- Specified by:
createQueuein interfaceClientSession- Parameters:
address- the queue will be bound to this addressroutingType- the routing type for this queue, MULTICAST or ANYCASTqueueName- the name of the queuefilterString- only messages which match this filter will be put in the queuedurable- whether the queue is durable or notautoCreated- whether to mark this queue as autoCreated or not- Throws:
ActiveMQException- in an exception occurs while creating the queue
-
createQueue
@Deprecated public void createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filterString, boolean durable, boolean autoCreated, int maxConsumers, boolean purgeOnNoConsumers) throws ActiveMQException Deprecated.Description copied from interface:ClientSessionCreates a non-temporary queue.- Specified by:
createQueuein interfaceClientSession- Parameters:
address- the queue will be bound to this addressroutingType- the routing type for this queue, MULTICAST or ANYCASTqueueName- the name of the queuefilterString- only messages which match this filter will be put in the queuedurable- whether the queue is durable or notautoCreated- whether to mark this queue as autoCreated or notmaxConsumers- how many concurrent consumers will be allowed on this queuepurgeOnNoConsumers- whether to delete the contents of the queue when the last consumer disconnects- Throws:
ActiveMQException
-
createQueue
@Deprecated public void createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filterString, boolean durable, boolean autoCreated, int maxConsumers, boolean purgeOnNoConsumers, Boolean exclusive, Boolean lastValue) throws ActiveMQException Deprecated.Description copied from interface:ClientSessionCreates a non-temporary queue.- Specified by:
createQueuein interfaceClientSession- Parameters:
address- the queue will be bound to this addressroutingType- the routing type for this queue, MULTICAST or ANYCASTqueueName- the name of the queuefilterString- only messages which match this filter will be put in the queuedurable- whether the queue is durable or notautoCreated- whether to mark this queue as autoCreated or notmaxConsumers- how many concurrent consumers will be allowed on this queuepurgeOnNoConsumers- whether to delete the contents of the queue when the last consumer disconnectsexclusive- whether the queue should be exclusivelastValue- whether the queue should be lastValue- Throws:
ActiveMQException
-
createQueue
@Deprecated public void createQueue(SimpleString address, SimpleString queueName, boolean autoCreated, QueueAttributes queueAttributes) throws ActiveMQException Deprecated.Description copied from interface:ClientSessionCreates a non-temporary queue.- Specified by:
createQueuein interfaceClientSession- Parameters:
address- the queue will be bound to this addressqueueName- the name of the queueautoCreated- whether to mark this queue as autoCreated or notqueueAttributes- attributes for the queue- Throws:
ActiveMQException
-
createQueue
@Deprecated public void createQueue(String address, RoutingType routingType, String queueName, String filterString, boolean durable, boolean autoCreated, int maxConsumers, boolean purgeOnNoConsumers) throws ActiveMQException Deprecated.Description copied from interface:ClientSessionCreates a non-temporaryqueue.- Specified by:
createQueuein interfaceClientSession- Parameters:
address- the queue will be bound to this addressroutingType- the routing type for this queue, MULTICAST or ANYCASTqueueName- the name of the queuefilterString- only messages which match this filter will be put in the queuedurable- whether the queue is durable or notautoCreated- whether to mark this queue as autoCreated or notmaxConsumers- how many concurrent consumers will be allowed on this queuepurgeOnNoConsumers- whether to delete the contents of the queue when the last consumer disconnects- Throws:
ActiveMQException
-
createQueue
public void createQueue(String address, RoutingType routingType, String queueName, String filterString, boolean durable, boolean autoCreated, int maxConsumers, boolean purgeOnNoConsumers, Boolean exclusive, Boolean lastValue) throws ActiveMQException Description copied from interface:ClientSessionCreates a non-temporaryqueue.- Specified by:
createQueuein interfaceClientSession- Parameters:
address- the queue will be bound to this addressroutingType- the routing type for this queue, MULTICAST or ANYCASTqueueName- the name of the queuefilterString- only messages which match this filter will be put in the queuedurable- whether the queue is durable or notautoCreated- whether to mark this queue as autoCreated or notmaxConsumers- how many concurrent consumers will be allowed on this queuepurgeOnNoConsumers- whether to delete the contents of the queue when the last consumer disconnectsexclusive- whether the queue should be exclusivelastValue- whether the queue should be lastValue- Throws:
ActiveMQException
-
createTemporaryQueue
public void createTemporaryQueue(SimpleString address, RoutingType routingType, SimpleString queueName) throws ActiveMQException Description copied from interface:ClientSessionCreates a temporary queue.- Specified by:
createTemporaryQueuein interfaceClientSession- Parameters:
address- the queue will be bound to this addressroutingType- the routing type for this queue, MULTICAST or ANYCASTqueueName- the name of the queue- Throws:
ActiveMQException- in an exception occurs while creating the queue
-
createTemporaryQueue
public void createTemporaryQueue(String address, RoutingType routingType, String queueName) throws ActiveMQException Description copied from interface:ClientSessionCreates a temporary queue.- Specified by:
createTemporaryQueuein interfaceClientSession- Parameters:
address- the queue will be bound to this addressroutingType- the routing type for this queue, MULTICAST or ANYCASTqueueName- the name of the queue- Throws:
ActiveMQException- in an exception occurs while creating the queue
-
createTemporaryQueue
@Deprecated public void createTemporaryQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, int maxConsumers, boolean purgeOnNoConsumers, Boolean exclusive, Boolean lastValue) throws ActiveMQException Deprecated.Description copied from interface:ClientSessionCreates a temporary queue with a filter.- Specified by:
createTemporaryQueuein interfaceClientSession- Parameters:
address- the queue will be bound to this addressroutingType- the routing type for this queue, MULTICAST or ANYCASTqueueName- the name of the queuefilter- only messages which match this filter will be put in the queuemaxConsumers- how many concurrent consumers will be allowed on this queuepurgeOnNoConsumers- whether to delete the contents of the queue when the last consumer disconnectsexclusive- if the queue is exclusive queuelastValue- if the queue is last value queue- Throws:
ActiveMQException- in an exception occurs while creating the queue
-
createTemporaryQueue
@Deprecated public void createTemporaryQueue(SimpleString address, SimpleString queueName, QueueAttributes queueAttributes) throws ActiveMQException Deprecated.Description copied from interface:ClientSessionCreates a temporary queue with a filter.- Specified by:
createTemporaryQueuein interfaceClientSession- Parameters:
address- the queue will be bound to this addressqueueName- the name of the queuequeueAttributes- attributes for the queue- Throws:
ActiveMQException- in an exception occurs while creating the queue
-
createTemporaryQueue
@Deprecated public void createTemporaryQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter) throws ActiveMQException Deprecated.Description copied from interface:ClientSessionCreates a temporary queue with a filter.- Specified by:
createTemporaryQueuein interfaceClientSession- Parameters:
address- the queue will be bound to this addressroutingType- the routing type for this queue, MULTICAST or ANYCASTqueueName- the name of the queuefilter- only messages which match this filter will be put in the queue- Throws:
ActiveMQException- in an exception occurs while creating the queue
-
createTemporaryQueue
public void createTemporaryQueue(String address, RoutingType routingType, String queueName, String filter) throws ActiveMQException Description copied from interface:ClientSessionCreates a temporary queue with a filter.- Specified by:
createTemporaryQueuein interfaceClientSession- Parameters:
address- the queue will be bound to this addressroutingType- the routing type for this queue, MULTICAST or ANYCASTqueueName- the name of the queuefilter- only messages which match this filter will be put in the queue- Throws:
ActiveMQException- in an exception occurs while creating the queue
-
createQueue
@Deprecated public void createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, boolean durable) throws ActiveMQException Deprecated.Description copied from interface:ClientSessionCreates a non-temporary queue.- Specified by:
createQueuein interfaceClientSession- Parameters:
address- the queue will be bound to this addressroutingType- the routing type for this queue, MULTICAST or ANYCASTqueueName- the name of the queuedurable- whether the queue is durable or not- Throws:
ActiveMQException- in an exception occurs while creating the queue
-
createQueue
public void createQueue(String address, RoutingType routingType, String queueName, boolean durable) throws ActiveMQException Description copied from interface:ClientSessionCreates a non-temporary queue.- Specified by:
createQueuein interfaceClientSession- Parameters:
address- the queue will be bound to this addressroutingType- the routing type for this queue, MULTICAST or ANYCASTqueueName- the name of the queuedurable- whether the queue is durable or not- Throws:
ActiveMQException- in an exception occurs while creating the queue
-
createQueue
@Deprecated public void createQueue(String address, RoutingType routingType, String queueName) throws ActiveMQException Deprecated.Description copied from interface:ClientSessionCreates a non-temporary queue non-durable queue.- Specified by:
createQueuein interfaceClientSession- Parameters:
address- the queue will be bound to this addressroutingType- the routing type for this queue, MULTICAST or ANYCASTqueueName- the name of the queue- Throws:
ActiveMQException- in an exception occurs while creating the queue
-
createQueue
@Deprecated public void createQueue(SimpleString address, RoutingType routingType, SimpleString queueName) throws ActiveMQException Deprecated.Description copied from interface:ClientSessionCreates a non-temporary queue non-durable queue.- Specified by:
createQueuein interfaceClientSession- Parameters:
address- the queue will be bound to this addressroutingType- the routing type for this queue, MULTICAST or ANYCASTqueueName- the name of the queue- Throws:
ActiveMQException- in an exception occurs while creating the queue
-
createQueue
@Deprecated public void createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, boolean durable) throws ActiveMQException Deprecated.Description copied from interface:ClientSessionCreates a non-temporary queue.- Specified by:
createQueuein interfaceClientSession- Parameters:
address- the queue will be bound to this addressroutingType- the routing type for this queue, MULTICAST or ANYCASTqueueName- the name of the queuefilter- only messages which match this filter will be put in the queuedurable- whether the queue is durable or not- Throws:
ActiveMQException- in an exception occurs while creating the queue
-
createQueue
public void createQueue(String address, RoutingType routingType, String queueName, String filter, boolean durable) throws ActiveMQException Description copied from interface:ClientSessionCreates a non-temporaryqueue.- Specified by:
createQueuein interfaceClientSession- Parameters:
address- the queue will be bound to this addressroutingType- the routing type for this queue, MULTICAST or ANYCASTqueueName- the name of the queuefilter- only messages which match this filter will be put in the queuedurable- whether the queue is durable or not- Throws:
ActiveMQException- in an exception occurs while creating the queue
-
deleteQueue
Description copied from interface:ClientSessionDeletes the queue.- Specified by:
deleteQueuein interfaceClientSession- Parameters:
queueName- the name of the queue to delete- Throws:
ActiveMQException- if there is no queue for the given name or if the queue has consumers
-
deleteQueue
Description copied from interface:ClientSessionDeletes the queue.- Specified by:
deleteQueuein interfaceClientSession- Parameters:
queueName- the name of the queue to delete- Throws:
ActiveMQException- if there is no queue for the given name or if the queue has consumers
-
queueQuery
Description copied from interface:ClientSessionQueries information on a queue.- Specified by:
queueQueryin interfaceClientSession- Parameters:
queueName- the name of the queue to query- Returns:
- a QueueQuery containing information on the given queue
- Throws:
ActiveMQException- if an exception occurs while querying the queue
-
addressQuery
Description copied from interface:ClientSessionQueries information on a binding.- Specified by:
addressQueryin interfaceClientSession- Parameters:
address- the address of the biding to query- Returns:
- an AddressQuery containing information on the binding attached to the given address
- Throws:
ActiveMQException- if an exception occurs while querying the binding
-
createConsumer
Description copied from interface:ClientSessionCreates a ClientConsumer to consume message from the queue with the given name.- Specified by:
createConsumerin interfaceClientSession- Parameters:
queueName- name of the queue to consume messages from- Returns:
- a ClientConsumer
- Throws:
ActiveMQException- if an exception occurs while creating the ClientConsumer
-
createConsumer
Description copied from interface:ClientSessionCreates a ClientConsumer to consume messages from the queue with the given name.- Specified by:
createConsumerin interfaceClientSession- Parameters:
queueName- name of the queue to consume messages from- Returns:
- a ClientConsumer
- Throws:
ActiveMQException- if an exception occurs while creating the ClientConsumer
-
createConsumer
public ClientConsumer createConsumer(SimpleString queueName, SimpleString filterString) throws ActiveMQException Description copied from interface:ClientSessionCreates a ClientConsumer to consume messages matching the filter from the queue with the given name.- Specified by:
createConsumerin interfaceClientSession- Parameters:
queueName- name of the queue to consume messages fromfilterString- only messages which match this filter will be consumed- Returns:
- a ClientConsumer
- Throws:
ActiveMQException- if an exception occurs while creating the ClientConsumer
-
createQueue
Description copied from interface:ClientSessionCreates a non-temporary queue non-durable queue.- Specified by:
createQueuein interfaceClientSession- Parameters:
address- the queue will be bound to this addressqueueName- the name of the queue- Throws:
ActiveMQException- in an exception occurs while creating the queue
-
createConsumer
public ClientConsumer createConsumer(String queueName, String filterString) throws ActiveMQException Description copied from interface:ClientSessionCreates a ClientConsumer to consume messages matching the filter from the queue with the given name.- Specified by:
createConsumerin interfaceClientSession- Parameters:
queueName- name of the queue to consume messages fromfilterString- only messages which match this filter will be consumed- Returns:
- a ClientConsumer
- Throws:
ActiveMQException- if an exception occurs while creating the ClientConsumer
-
createConsumer
public ClientConsumer createConsumer(SimpleString queueName, SimpleString filterString, boolean browseOnly) throws ActiveMQException Description copied from interface:ClientSessionCreates a ClientConsumer to consume or browse messages matching the filter from the queue with the given name.If
browseOnlyistrue, the ClientConsumer will receive the messages from the queue but they will not be consumed (the messages will remain in the queue). Note that paged messages will not be in the queue, and will therefore not be visible ifbrowseOnlyistrue.If
browseOnlyisfalse, the ClientConsumer will behave like consume the messages from the queue and the messages will effectively be removed from the queue.- Specified by:
createConsumerin interfaceClientSession- Parameters:
queueName- name of the queue to consume messages fromfilterString- only messages which match this filter will be consumedbrowseOnly- whether the ClientConsumer will only browse the queue or consume messages.- Returns:
- a ClientConsumer
- Throws:
ActiveMQException- if an exception occurs while creating the ClientConsumer
-
createConsumer
public ClientConsumer createConsumer(SimpleString queueName, SimpleString filterString, int priority, boolean browseOnly) throws ActiveMQException Description copied from interface:ClientSessionCreates a ClientConsumer to consume or browse messages matching the filter from the queue with the given name.If
browseOnlyistrue, the ClientConsumer will receive the messages from the queue but they will not be consumed (the messages will remain in the queue). Note that paged messages will not be in the queue, and will therefore not be visible ifbrowseOnlyistrue.If
browseOnlyisfalse, the ClientConsumer will behave like consume the messages from the queue and the messages will effectively be removed from the queue.- Specified by:
createConsumerin interfaceClientSession- Parameters:
queueName- name of the queue to consume messages fromfilterString- only messages which match this filter will be consumedpriority- the consumer prioritybrowseOnly- whether the ClientConsumer will only browse the queue or consume messages.- Returns:
- a ClientConsumer
- Throws:
ActiveMQException- if an exception occurs while creating the ClientConsumer
-
createConsumer
public ClientConsumer createConsumer(SimpleString queueName, boolean browseOnly) throws ActiveMQException Description copied from interface:ClientSessionCreates a ClientConsumer to consume or browse messages from the queue with the given name.If
browseOnlyistrue, the ClientConsumer will receive the messages from the queue but they will not be consumed (the messages will remain in the queue). Note that paged messages will not be in the queue, and will therefore not be visible ifbrowseOnlyistrue.If
browseOnlyisfalse, the ClientConsumer will behave like consume the messages from the queue and the messages will effectively be removed from the queue.- Specified by:
createConsumerin interfaceClientSession- Parameters:
queueName- name of the queue to consume messages frombrowseOnly- whether the ClientConsumer will only browse the queue or consume messages.- Returns:
- a ClientConsumer
- Throws:
ActiveMQException- if an exception occurs while creating the ClientConsumer
-
createConsumer
public ClientConsumer createConsumer(String queueName, String filterString, boolean browseOnly) throws ActiveMQException Description copied from interface:ClientSessionCreates a ClientConsumer to consume or browse messages matching the filter from the queue with the given name.If
browseOnlyistrue, the ClientConsumer will receive the messages from the queue but they will not be consumed (the messages will remain in the queue). Note that paged messages will not be in the queue, and will therefore not be visible ifbrowseOnlyistrue.If
browseOnlyisfalse, the ClientConsumer will behave like consume the messages from the queue and the messages will effectively be removed from the queue.- Specified by:
createConsumerin interfaceClientSession- Parameters:
queueName- name of the queue to consume messages fromfilterString- only messages which match this filter will be consumedbrowseOnly- whether the ClientConsumer will only browse the queue or consume messages.- Returns:
- a ClientConsumer
- Throws:
ActiveMQException- if an exception occurs while creating the ClientConsumer
-
createConsumer
Description copied from interface:ClientSessionCreates a ClientConsumer to consume or browse messages from the queue with the given name.If
browseOnlyistrue, the ClientConsumer will receive the messages from the queue but they will not be consumed (the messages will remain in the queue). Note that paged messages will not be in the queue, and will therefore not be visible ifbrowseOnlyistrue.If
browseOnlyisfalse, the ClientConsumer will behave like consume the messages from the queue and the messages will effectively be removed from the queue.- Specified by:
createConsumerin interfaceClientSession- Parameters:
queueName- name of the queue to consume messages frombrowseOnly- whether the ClientConsumer will only browse the queue or consume messages.- Returns:
- a ClientConsumer
- Throws:
ActiveMQException- if an exception occurs while creating the ClientConsumer
-
isWritable
- Specified by:
isWritablein interfaceClientSessionInternal
-
createConsumer
public ClientConsumer createConsumer(SimpleString queueName, SimpleString filterString, int windowSize, int maxRate, boolean browseOnly) throws ActiveMQException Description copied from interface:ClientSessionCreates a ClientConsumer to consume or browse messages matching the filter from the queue with the given name.If
browseOnlyistrue, the ClientConsumer will receive the messages from the queue but they will not be consumed (the messages will remain in the queue). Note that paged messages will not be in the queue, and will therefore not be visible ifbrowseOnlyistrue.If
browseOnlyisfalse, the ClientConsumer will behave like consume the messages from the queue and the messages will effectively be removed from the queue.- Specified by:
createConsumerin interfaceClientSession- Parameters:
queueName- name of the queue to consume messages fromfilterString- only messages which match this filter will be consumedwindowSize- the consumer window sizemaxRate- the maximum rate to consume messagesbrowseOnly- whether the ClientConsumer will only browse the queue or consume messages.- Returns:
- a ClientConsumer
- Throws:
ActiveMQException- if an exception occurs while creating the ClientConsumer
-
createConsumer
public ClientConsumer createConsumer(SimpleString queueName, SimpleString filterString, int priority, int windowSize, int maxRate, boolean browseOnly) throws ActiveMQException Note, we DO NOT currently support direct consumers (i.e. consumers where delivery occurs on the remoting thread).Direct consumers have issues with blocking and failover. E.g. if direct then inside MessageHandler call a blocking method like rollback or acknowledge (blocking) This can block until failover completes, which disallows the thread to be used to deliver any responses to the client during that period, so failover won't occur. If we want direct consumers we need to rethink how they work.
- Specified by:
createConsumerin interfaceClientSession- Parameters:
queueName- name of the queue to consume messages fromfilterString- only messages which match this filter will be consumedpriority- the consumer prioritywindowSize- the consumer window sizemaxRate- the maximum rate to consume messagesbrowseOnly- whether the ClientConsumer will only browse the queue or consume messages.- Returns:
- a ClientConsumer
- Throws:
ActiveMQException- if an exception occurs while creating the ClientConsumer
-
createConsumer
public ClientConsumer createConsumer(String queueName, String filterString, int windowSize, int maxRate, boolean browseOnly) throws ActiveMQException Description copied from interface:ClientSessionCreates a ClientConsumer to consume or browse messages matching the filter from the queue with the given name.If
browseOnlyistrue, the ClientConsumer will receive the messages from the queue but they will not be consumed (the messages will remain in the queue). Note that paged messages will not be in the queue, and will therefore not be visible ifbrowseOnlyistrue.If
browseOnlyisfalse, the ClientConsumer will behave like consume the messages from the queue and the messages will effectively be removed from the queue.- Specified by:
createConsumerin interfaceClientSession- Parameters:
queueName- name of the queue to consume messages fromfilterString- only messages which match this filter will be consumedwindowSize- the consumer window sizemaxRate- the maximum rate to consume messagesbrowseOnly- whether the ClientConsumer will only browse the queue or consume messages.- Returns:
- a ClientConsumer
- Throws:
ActiveMQException- if an exception occurs while creating the ClientConsumer
-
createProducer
Description copied from interface:ClientSessionCreates a producer with no default address. Address must be specified every time a message is sent- Specified by:
createProducerin interfaceClientSession- Returns:
- a ClientProducer
- Throws:
ActiveMQException- See Also:
-
createProducer
Description copied from interface:ClientSessionCreates a producer which sends messages to the given address- Specified by:
createProducerin interfaceClientSession- Parameters:
address- the address to send messages to- Returns:
- a ClientProducer
- Throws:
ActiveMQException- if an exception occurs while creating the ClientProducer
-
createProducer
Description copied from interface:ClientSessionCreates a producer which sends messages to the given address- Specified by:
createProducerin interfaceClientSession- Parameters:
address- the address to send messages to- Returns:
- a ClientProducer
- Throws:
ActiveMQException- if an exception occurs while creating the ClientProducer
-
createProducer
Description copied from interface:ClientSessionCreates a producer which sends messages to the given address- Specified by:
createProducerin interfaceClientSession- Parameters:
address- the address to send messages tomaxRate- the producer rate- Returns:
- a ClientProducer
- Throws:
ActiveMQException- if an exception occurs while creating the ClientProducer
-
createProducer
- Throws:
ActiveMQException
-
getXAResource
Description copied from interface:ClientSessionReturns the XAResource associated to the session.- Specified by:
getXAResourcein interfaceClientSession- Returns:
- the XAResource associated to the session
-
commit
Description copied from interface:ClientSessionCommits the current transaction, blocking.- Specified by:
commitin interfaceClientSession- Throws:
ActiveMQException- if an exception occurs while committing the transaction
-
commit
Description copied from interface:ClientSessionCommits the current transaction.- Specified by:
commitin interfaceClientSession- Parameters:
block- if the commit will be blocking or not.- Throws:
ActiveMQException- if an exception occurs while committing the transaction
-
isRollbackOnly
public boolean isRollbackOnly()Description copied from interface:ClientSessionReturnstrueif the current transaction has been flagged to rollback,falseelse.- Specified by:
isRollbackOnlyin interfaceClientSession- Returns:
trueif the current transaction has been flagged to rollback,falseelse
-
rollback
Description copied from interface:ClientSessionRolls back the current transaction.- Specified by:
rollbackin interfaceClientSession- Throws:
ActiveMQException- if an exception occurs while rolling back the transaction
-
rollback
Description copied from interface:ClientSessionRolls back the current transaction.- Specified by:
rollbackin interfaceClientSession- Parameters:
isLastMessageAsDelivered- the first message on deliveringMessage Buffer is considered as delivered- Throws:
ActiveMQException- if an exception occurs while rolling back the transaction
-
rollback
public void rollback(boolean isLastMessageAsDelivered, boolean waitConsumers) throws ActiveMQException - Throws:
ActiveMQException
-
markRollbackOnly
public void markRollbackOnly()- Specified by:
markRollbackOnlyin interfaceClientSessionInternal
-
createMessage
public ClientMessage createMessage(byte type, boolean durable, long expiration, long timestamp, byte priority) Description copied from interface:ClientSessionCreates a ClientMessage.- Specified by:
createMessagein interfaceClientSession- Parameters:
type- type of the messagedurable- whether the created message is durable or notexpiration- the message expirationtimestamp- the message timestamppriority- the message priority (between 0 and 9 inclusive)- Returns:
- a ClientMessage
-
createMessage
Description copied from interface:ClientSessionCreates a ClientMessage.- Specified by:
createMessagein interfaceClientSession- Parameters:
type- type of the messagedurable- whether the created message is durable or not- Returns:
- a ClientMessage
-
createMessage
Description copied from interface:ClientSessionCreates a ClientMessage.- Specified by:
createMessagein interfaceClientSession- Parameters:
durable- whether the created message is durable or not- Returns:
- a ClientMessage
-
isClosed
public boolean isClosed()Description copied from interface:ClientSessionReturnstrueif the session is closed,falseelse.- Specified by:
isClosedin interfaceClientSession- Returns:
trueif the session is closed,falseelse
-
isAutoCommitSends
public boolean isAutoCommitSends()Description copied from interface:ClientSessionReturns whether the session will automatically commit its transaction every time a message is sent by a ClientProducer created by this session,falseelse.- Specified by:
isAutoCommitSendsin interfaceClientSession- Returns:
- whether the session will automatically commit its transaction every time a message is sent by a
ClientProducer created by this session,
falseelse
-
isAutoCommitAcks
public boolean isAutoCommitAcks()Description copied from interface:ClientSessionReturnstrueif the session automatically commit its transaction every time a message is acknowledged by a ClientConsumer created by this session,falseelse.- Specified by:
isAutoCommitAcksin interfaceClientSession- Returns:
trueif the session automatically commit its transaction every time a message is acknowledged by a ClientConsumer created by this session,falseelse
-
isBlockOnAcknowledge
public boolean isBlockOnAcknowledge()Description copied from interface:ClientSessionReturnstrueif the session's ClientConsumer block when they acknowledge a message,falseelse.- Specified by:
isBlockOnAcknowledgein interfaceClientSession- Returns:
trueif the session's ClientConsumer block when they acknowledge a message,falseelse
-
isXA
public boolean isXA()Description copied from interface:ClientSessionReturnstrueif the session supports XA,falseelse.- Specified by:
isXAin interfaceClientSession- Returns:
trueif the session supports XA,falseelse
-
resetIfNeeded
- Specified by:
resetIfNeededin interfaceClientSessionInternal- Throws:
ActiveMQException
-
start
Description copied from interface:ClientSessionStarts the session. The session must be started before ClientConsumers created by the session can consume messages from the queue.- Specified by:
startin interfaceClientSession- Throws:
ActiveMQException- if an exception occurs while starting the session
-
stop
Description copied from interface:ClientSessionStops the session. ClientConsumers created by the session can not consume messages when the session is stopped.- Specified by:
stopin interfaceClientSession- Throws:
ActiveMQException- if an exception occurs while stopping the session
-
stop
- Throws:
ActiveMQException
-
addFailureListener
Description copied from interface:ClientSessionAdds a FailureListener to the session which is notified if a failure occurs on the session.- Specified by:
addFailureListenerin interfaceClientSession- Parameters:
listener- the listener to add
-
removeFailureListener
Description copied from interface:ClientSessionRemoves a FailureListener to the session.- Specified by:
removeFailureListenerin interfaceClientSession- Parameters:
listener- the listener to remove- Returns:
trueif the listener was removed,falseelse
-
addFailoverListener
Description copied from interface:ClientSessionAdds a FailoverEventListener to the session which is notified if a failover event occurs on the session.- Specified by:
addFailoverListenerin interfaceClientSession- Parameters:
listener- the listener to add
-
removeFailoverListener
Description copied from interface:ClientSessionRemoves a FailoverEventListener to the session.- Specified by:
removeFailoverListenerin interfaceClientSession- Parameters:
listener- the listener to remove- Returns:
trueif the listener was removed,falseelse
-
getVersion
public int getVersion()Description copied from interface:ClientSessionReturns the server'sincrementingVersion.- Specified by:
getVersionin interfaceClientSession- Returns:
- the server's
incrementingVersion
-
isClosing
public boolean isClosing()- Specified by:
isClosingin interfaceClientSessionInternal
-
getNodeId
- Specified by:
getNodeIdin interfaceClientSessionInternal
-
getMinLargeMessageSize
public int getMinLargeMessageSize()- Specified by:
getMinLargeMessageSizein interfaceClientSessionInternal
-
isCompressLargeMessages
public boolean isCompressLargeMessages()- Specified by:
isCompressLargeMessagesin interfaceClientSessionInternal
-
getCompressionLevel
public int getCompressionLevel()- Specified by:
getCompressionLevelin interfaceClientSessionInternal
-
isCacheLargeMessageClient
public boolean isCacheLargeMessageClient()- Specified by:
isCacheLargeMessageClientin interfaceClientSessionInternal
-
getName
- Specified by:
getNamein interfaceClientSessionInternal
-
acknowledge
- Specified by:
acknowledgein interfaceClientSessionInternal- Throws:
ActiveMQException
-
individualAcknowledge
public void individualAcknowledge(ClientConsumer consumer, Message message) throws ActiveMQException - Specified by:
individualAcknowledgein interfaceClientSessionInternal- Throws:
ActiveMQException
-
expire
- Specified by:
expirein interfaceClientSessionInternal- Throws:
ActiveMQException
-
addConsumer
- Specified by:
addConsumerin interfaceClientSessionInternal
-
addProducer
- Specified by:
addProducerin interfaceClientSessionInternal
-
removeConsumer
- Specified by:
removeConsumerin interfaceClientSessionInternal- Throws:
ActiveMQException
-
removeProducer
- Specified by:
removeProducerin interfaceClientSessionInternal
-
handleReceiveMessage
public void handleReceiveMessage(ConsumerContext consumerID, ClientMessageInternal message) throws Exception - Specified by:
handleReceiveMessagein interfaceClientSessionInternal- Throws:
Exception
-
handleReceiveLargeMessage
public void handleReceiveLargeMessage(ConsumerContext consumerID, ClientLargeMessageInternal clientLargeMessage, long largeMessageSize) throws Exception - Specified by:
handleReceiveLargeMessagein interfaceClientSessionInternal- Throws:
Exception
-
handleReceiveContinuation
public void handleReceiveContinuation(ConsumerContext consumerID, byte[] chunk, int flowControlSize, boolean isContinues) throws Exception - Specified by:
handleReceiveContinuationin interfaceClientSessionInternal- Throws:
Exception
-
handleConsumerDisconnect
- Specified by:
handleConsumerDisconnectin interfaceClientSessionInternal- Throws:
ActiveMQException
-
close
Description copied from interface:ClientSessionCloses the session.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceClientSession- Throws:
ActiveMQException- if an exception occurs while closing the session
-
cleanUp
- Specified by:
cleanUpin interfaceClientSessionInternal- Throws:
ActiveMQException
-
setSendAcknowledgementHandler
Description copied from interface:ClientSessionSets aSendAcknowledgementHandlerfor this session.- Specified by:
setSendAcknowledgementHandlerin interfaceClientSession- Parameters:
handler- a SendAcknowledgementHandler- Returns:
- this ClientSession
-
preHandleFailover
- Specified by:
preHandleFailoverin interfaceClientSessionInternal
-
handleFailover
- Specified by:
handleFailoverin interfaceClientSessionInternal
-
postHandleFailover
- Specified by:
postHandleFailoverin interfaceClientSessionInternal
-
addMetaData
Description copied from interface:ClientSessionAttach any metadata to the session.- Specified by:
addMetaDatain interfaceClientSession- Throws:
ActiveMQException
-
addUniqueMetaData
Description copied from interface:ClientSessionAttach any metadata to the session. Throws an exception if there's already a metadata available. You can use this metadata to ensure that there is no other session with the same meta-data you are passing as an argument. This is useful to simulate unique client-ids, where you may want to avoid multiple instances of your client application connected.- Specified by:
addUniqueMetaDatain interfaceClientSession- Throws:
ActiveMQException
-
getSessionFactory
Description copied from interface:ClientSessionReturns theClientSessionFactoryused to created thisClientSession.- Specified by:
getSessionFactoryin interfaceClientSession- Returns:
- the
ClientSessionFactoryused to created thisClientSession
-
setAddress
Description copied from interface:ClientSessionInternalThis will set the address at the message- Specified by:
setAddressin interfaceClientSessionInternal
-
setPacketSize
public void setPacketSize(int packetSize) - Specified by:
setPacketSizein interfaceClientSessionInternal
-
workDone
public void workDone()- Specified by:
workDonein interfaceClientSessionInternal
-
sendProducerCreditsMessage
- Specified by:
sendProducerCreditsMessagein interfaceClientSessionInternal
-
getCredits
- Specified by:
getCreditsin interfaceClientSessionInternal
-
returnCredits
- Specified by:
returnCreditsin interfaceClientSessionInternal
-
handleReceiveProducerCredits
- Specified by:
handleReceiveProducerCreditsin interfaceClientSessionInternal
-
handleReceiveProducerFailCredits
- Specified by:
handleReceiveProducerFailCreditsin interfaceClientSessionInternal
-
getProducerCreditManager
- Specified by:
getProducerCreditManagerin interfaceClientSessionInternal
-
startCall
public void startCall()Description copied from interface:ClientSessionInternalThis is used internally to control and educate the user about using the thread boundaries properly. if more than one thread is using the session simultaneously this will generate a big warning on the docs. There are a limited number of places where we can call this such as acks and sends. otherwise we could get false warns- Specified by:
startCallin interfaceClientSessionInternal
-
endCall
public void endCall()Description copied from interface:ClientSessionInternalOpposite ofClientSessionInternal.startCall()- Specified by:
endCallin interfaceClientSessionInternal- See Also:
-
commit
- Specified by:
commitin interfaceXAResource- Throws:
XAException
-
end
- Specified by:
endin interfaceXAResource- Throws:
XAException
-
forget
- Specified by:
forgetin interfaceXAResource- Throws:
XAException
-
getTransactionTimeout
- Specified by:
getTransactionTimeoutin interfaceXAResource- Throws:
XAException
-
setTransactionTimeout
- Specified by:
setTransactionTimeoutin interfaceXAResource- Throws:
XAException
-
isSameRM
- Specified by:
isSameRMin interfaceXAResource- Throws:
XAException
-
prepare
- Specified by:
preparein interfaceXAResource- Throws:
XAException
-
recover
- Specified by:
recoverin interfaceXAResource- Throws:
XAException
-
rollback
- Specified by:
rollbackin interfaceXAResource- Throws:
XAException
-
start
- Specified by:
startin interfaceXAResource- Throws:
XAException
-
connectionFailed
Description copied from interface:FailureListenerNotifies that a connection has failed due to the specified exception.- Specified by:
connectionFailedin interfaceFailureListener- Parameters:
me- exception which has caused the connection to fail
-
connectionFailed
public void connectionFailed(ActiveMQException me, boolean failedOver, String scaleDownTargetNodeID) Description copied from interface:FailureListenerNotifies that a connection has failed due to the specified exception.- Specified by:
connectionFailedin interfaceFailureListener- Parameters:
me- exception which has caused the connection to failscaleDownTargetNodeID- the ID of the node to which messages are scaling down
-
setForceNotSameRM
public void setForceNotSameRM(boolean force) - Specified by:
setForceNotSameRMin interfaceClientSessionInternal
-
getConnection
- Specified by:
getConnectionin interfaceClientSessionInternal
-
toString
-
cloneProducers
Not part of the interface, used on tests only -
cloneConsumers
Not part of the interface, used on tests only -
cloneConsumerEntries
-
convert
If you ever tried to debug XIDs you will know what this is about. This will serialize and deserialize the XID to the same way it's going to be printed on server logs or print-data.This will convert to the same XID deserialized on the Server, hence we will be able to debug eventual stuff
-
setStopSignal
public void setStopSignal()- Specified by:
setStopSignalin interfaceClientSessionInternal
-
isConfirmationWindowEnabled
public boolean isConfirmationWindowEnabled()- Specified by:
isConfirmationWindowEnabledin interfaceClientSessionInternal
-
getSessionContext
- Specified by:
getSessionContextin interfaceClientSessionInternal
-
wrap
- Specified by:
wrapin interfaceClientSessionInternal
-