Class SessionContext


  • public abstract class SessionContext
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      abstract ClientSession.AddressQuery addressQuery​(org.apache.activemq.artemis.api.core.SimpleString address)  
      abstract void addSessionMetadata​(java.lang.String key, java.lang.String data)  
      abstract void addUniqueMetaData​(java.lang.String key, java.lang.String data)  
      abstract void cleanup()  
      abstract void closeConsumer​(ClientConsumer consumer)  
      abstract boolean configureTransactionTimeout​(int seconds)  
      abstract void createAddress​(org.apache.activemq.artemis.api.core.SimpleString address, java.util.EnumSet<org.apache.activemq.artemis.api.core.RoutingType> routingTypes, boolean autoCreated)  
      abstract void createAddress​(org.apache.activemq.artemis.api.core.SimpleString address, java.util.Set<org.apache.activemq.artemis.api.core.RoutingType> routingTypes, boolean autoCreated)
      Deprecated.
      abstract org.apache.activemq.artemis.core.client.impl.ClientConsumerInternal createConsumer​(org.apache.activemq.artemis.api.core.SimpleString queueName, org.apache.activemq.artemis.api.core.SimpleString filterString, int priority, int windowSize, int maxRate, int ackBatchSize, boolean browseOnly, java.util.concurrent.Executor executor, java.util.concurrent.Executor flowControlExecutor)  
      abstract void createQueue​(org.apache.activemq.artemis.api.core.QueueConfiguration queueConfiguration)  
      abstract void createQueue​(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 filterString, boolean durable, boolean temp, int maxConsumers, boolean purgeOnNoConsumers, boolean autoCreated)
      Deprecated.
      abstract void createQueue​(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 filterString, boolean durable, boolean temp, int maxConsumers, boolean purgeOnNoConsumers, boolean autoCreated, java.lang.Boolean exclusive, java.lang.Boolean lastVale)  
      abstract void createQueue​(org.apache.activemq.artemis.api.core.SimpleString address, org.apache.activemq.artemis.api.core.SimpleString queueName, boolean temp, boolean autoCreated, org.apache.activemq.artemis.api.core.QueueAttributes queueAttributes)  
      abstract void createQueue​(org.apache.activemq.artemis.api.core.SimpleString address, org.apache.activemq.artemis.api.core.SimpleString queueName, org.apache.activemq.artemis.api.core.SimpleString filterString, boolean durable, boolean temp, boolean autoCreated)
      Deprecated.
      abstract void createSharedQueue​(org.apache.activemq.artemis.api.core.QueueConfiguration queueConfiguration)  
      abstract void createSharedQueue​(org.apache.activemq.artemis.api.core.SimpleString address, org.apache.activemq.artemis.api.core.SimpleString queueName, org.apache.activemq.artemis.api.core.QueueAttributes queueAttributes)
      Deprecated.
      abstract void createSharedQueue​(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 filterString, boolean durable)
      Deprecated.
      abstract void createSharedQueue​(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 filterString, boolean durable, java.lang.Integer maxConsumers, java.lang.Boolean purgeOnNoConsumers, java.lang.Boolean exclusive, java.lang.Boolean lastValue)
      Deprecated.
      abstract void createSharedQueue​(org.apache.activemq.artemis.api.core.SimpleString address, org.apache.activemq.artemis.api.core.SimpleString queueName, org.apache.activemq.artemis.api.core.SimpleString filterString, boolean durable)
      Deprecated.
      abstract void deleteQueue​(org.apache.activemq.artemis.api.core.SimpleString queueName)  
      abstract void expireMessage​(ClientConsumer consumer, Message message)  
      abstract void forceDelivery​(ClientConsumer consumer, long sequence)  
      abstract int getCreditsOnSendingFull​(Message msgI)  
      abstract int getDefaultConsumerWindowSize​(org.apache.activemq.artemis.core.protocol.core.impl.wireformat.SessionQueueQueryResponseMessage response)  
      abstract int getReconnectID()  
      RemotingConnection getRemotingConnection()  
      abstract SendAcknowledgementHandler getSendAcknowledgementHandler()  
      abstract int getServerVersion()  
      org.apache.activemq.artemis.core.client.impl.ClientSessionInternal getSession()  
      protected void handleReceiveContinuation​(ConsumerContext consumerID, byte[] chunk, int flowControlSize, boolean isContinues)  
      protected void handleReceiveLargeMessage​(ConsumerContext consumerID, org.apache.activemq.artemis.core.client.impl.ClientLargeMessageInternal clientLargeMessage, long largeMessageSize)  
      protected void handleReceiveMessage​(ConsumerContext consumerID, org.apache.activemq.artemis.core.client.impl.ClientMessageInternal message)  
      protected void handleReceiveProducerCredits​(org.apache.activemq.artemis.api.core.SimpleString address, int credits)  
      protected void handleReceiveProducerFailCredits​(org.apache.activemq.artemis.api.core.SimpleString address, int credits)  
      abstract boolean isWritable​(ReadyListener callback)  
      abstract void linkFlowControl​(org.apache.activemq.artemis.api.core.SimpleString address, org.apache.activemq.artemis.core.client.impl.ClientProducerCredits clientProducerCredits)  
      abstract void lockCommunications()
      it will lock the communication channel of the session avoiding anything to come while failover is happening.
      abstract ClientSession.QueueQuery queueQuery​(org.apache.activemq.artemis.api.core.SimpleString queueName)  
      abstract boolean reattachOnNewConnection​(RemotingConnection newConnection)
      it will either reattach or reconnect, preferably reattaching it.
      abstract int recoverSessionTimeout()
      Performs a round trip to the server requesting what is the current tx timeout on the session
      abstract void recreateConsumerOnServer​(org.apache.activemq.artemis.core.client.impl.ClientConsumerInternal consumerInternal, long consumerId, boolean isSessionStarted)  
      abstract void recreateSession​(java.lang.String username, java.lang.String password, int minLargeMessageSize, boolean xa, boolean autoCommitSends, boolean autoCommitAcks, boolean preAcknowledge)  
      abstract void releaseCommunications()  
      abstract void resetMetadata​(java.util.HashMap<java.lang.String,​java.lang.String> metaDataToSend)  
      abstract void resetName​(java.lang.String name)  
      abstract void restartSession()  
      abstract void returnBlocking​(org.apache.activemq.artemis.api.core.ActiveMQException cause)
      Interrupt and return any blocked calls
      abstract void sendACK​(boolean individual, boolean block, ClientConsumer consumer, Message message)  
      abstract void sendConsumerCredits​(ClientConsumer consumer, int credits)  
      abstract void sendFullMessage​(ICoreMessage msgI, boolean sendBlocking, SendAcknowledgementHandler handler, org.apache.activemq.artemis.api.core.SimpleString defaultAddress)  
      abstract int sendInitialChunkOnLargeMessage​(Message msgI)
      it should return the number of credits (or bytes) used to send this packet
      abstract int sendLargeMessageChunk​(Message msgI, long messageBodySize, boolean sendBlocking, boolean lastChunk, byte[] chunk, int reconnectID, SendAcknowledgementHandler messageHandler)  
      abstract void sendProducerCreditsMessage​(int credits, org.apache.activemq.artemis.api.core.SimpleString address)  
      abstract int sendServerLargeMessageChunk​(Message msgI, long messageBodySize, boolean sendBlocking, boolean lastChunk, byte[] chunk, SendAcknowledgementHandler messageHandler)  
      abstract void sessionClose()  
      abstract void sessionStart()  
      abstract void sessionStop()  
      abstract void setSendAcknowledgementHandler​(SendAcknowledgementHandler handler)  
      void setSession​(org.apache.activemq.artemis.core.client.impl.ClientSessionInternal session)  
      abstract void simpleCommit()  
      abstract void simpleCommit​(boolean block)  
      abstract void simpleRollback​(boolean lastMessageAsDelivered)
      If we are doing a simple rollback on the RA, we need to ack the last message sent to the consumer, otherwise DLQ won't work.
      abstract boolean supportsLargeMessage()  
      abstract void transferConnection​(RemotingConnection newConnection)
      Transfers the session context to the given newConnection on the client-side
      abstract void xaCommit​(javax.transaction.xa.Xid xid, boolean onePhase)  
      abstract void xaEnd​(javax.transaction.xa.Xid xid, int flags)  
      abstract void xaFailed​(javax.transaction.xa.Xid xid)  
      abstract void xaForget​(javax.transaction.xa.Xid xid)  
      abstract int xaPrepare​(javax.transaction.xa.Xid xid)  
      abstract void xaRollback​(javax.transaction.xa.Xid xid, boolean wasStarted)  
      abstract javax.transaction.xa.Xid[] xaScan()  
      abstract void xaStart​(javax.transaction.xa.Xid xid, int flags)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • session

        protected org.apache.activemq.artemis.core.client.impl.ClientSessionInternal session
      • idGenerator

        protected final org.apache.activemq.artemis.utils.IDGenerator idGenerator
    • Constructor Detail

    • Method Detail

      • getSession

        public org.apache.activemq.artemis.core.client.impl.ClientSessionInternal getSession()
      • setSession

        public void setSession​(org.apache.activemq.artemis.core.client.impl.ClientSessionInternal session)
      • resetName

        public abstract void resetName​(java.lang.String name)
      • getReconnectID

        public abstract int getReconnectID()
      • transferConnection

        public abstract void transferConnection​(RemotingConnection newConnection)
        Transfers the session context to the given newConnection on the client-side
      • reattachOnNewConnection

        public abstract boolean reattachOnNewConnection​(RemotingConnection newConnection)
                                                 throws org.apache.activemq.artemis.api.core.ActiveMQException
        it will either reattach or reconnect, preferably reattaching it.
        Parameters:
        newConnection -
        Returns:
        true if it was possible to reattach
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • closeConsumer

        public abstract void closeConsumer​(ClientConsumer consumer)
                                    throws org.apache.activemq.artemis.api.core.ActiveMQException
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • sendConsumerCredits

        public abstract void sendConsumerCredits​(ClientConsumer consumer,
                                                 int credits)
      • supportsLargeMessage

        public abstract boolean supportsLargeMessage()
      • handleReceiveLargeMessage

        protected void handleReceiveLargeMessage​(ConsumerContext consumerID,
                                                 org.apache.activemq.artemis.core.client.impl.ClientLargeMessageInternal clientLargeMessage,
                                                 long largeMessageSize)
                                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • handleReceiveMessage

        protected void handleReceiveMessage​(ConsumerContext consumerID,
                                            org.apache.activemq.artemis.core.client.impl.ClientMessageInternal message)
                                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • handleReceiveContinuation

        protected void handleReceiveContinuation​(ConsumerContext consumerID,
                                                 byte[] chunk,
                                                 int flowControlSize,
                                                 boolean isContinues)
                                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • handleReceiveProducerCredits

        protected void handleReceiveProducerCredits​(org.apache.activemq.artemis.api.core.SimpleString address,
                                                    int credits)
      • handleReceiveProducerFailCredits

        protected void handleReceiveProducerFailCredits​(org.apache.activemq.artemis.api.core.SimpleString address,
                                                        int credits)
      • getCreditsOnSendingFull

        public abstract int getCreditsOnSendingFull​(Message msgI)
      • sendFullMessage

        public abstract void sendFullMessage​(ICoreMessage msgI,
                                             boolean sendBlocking,
                                             SendAcknowledgementHandler handler,
                                             org.apache.activemq.artemis.api.core.SimpleString defaultAddress)
                                      throws org.apache.activemq.artemis.api.core.ActiveMQException
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • sendInitialChunkOnLargeMessage

        public abstract int sendInitialChunkOnLargeMessage​(Message msgI)
                                                    throws org.apache.activemq.artemis.api.core.ActiveMQException
        it should return the number of credits (or bytes) used to send this packet
        Parameters:
        msgI -
        Returns:
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • sendLargeMessageChunk

        public abstract int sendLargeMessageChunk​(Message msgI,
                                                  long messageBodySize,
                                                  boolean sendBlocking,
                                                  boolean lastChunk,
                                                  byte[] chunk,
                                                  int reconnectID,
                                                  SendAcknowledgementHandler messageHandler)
                                           throws org.apache.activemq.artemis.api.core.ActiveMQException
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • sendServerLargeMessageChunk

        public abstract int sendServerLargeMessageChunk​(Message msgI,
                                                        long messageBodySize,
                                                        boolean sendBlocking,
                                                        boolean lastChunk,
                                                        byte[] chunk,
                                                        SendAcknowledgementHandler messageHandler)
                                                 throws org.apache.activemq.artemis.api.core.ActiveMQException
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • createSharedQueue

        @Deprecated
        public abstract void createSharedQueue​(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 filterString,
                                               boolean durable,
                                               java.lang.Integer maxConsumers,
                                               java.lang.Boolean purgeOnNoConsumers,
                                               java.lang.Boolean exclusive,
                                               java.lang.Boolean lastValue)
                                        throws org.apache.activemq.artemis.api.core.ActiveMQException
        Deprecated.
        Creates a shared queue using the routing type set by the Address. If the Address supports more than one type of delivery then the default delivery mode (MULTICAST) is used.
        Parameters:
        address -
        queueName -
        routingType -
        filterString -
        durable -
        exclusive -
        lastValue -
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • createSharedQueue

        @Deprecated
        public abstract void createSharedQueue​(org.apache.activemq.artemis.api.core.SimpleString address,
                                               org.apache.activemq.artemis.api.core.SimpleString queueName,
                                               org.apache.activemq.artemis.api.core.QueueAttributes queueAttributes)
                                        throws org.apache.activemq.artemis.api.core.ActiveMQException
        Deprecated.
        Creates a shared queue using the routing type set by the Address. If the Address supports more than one type of delivery then the default delivery mode (MULTICAST) is used.
        Parameters:
        address -
        queueName -
        queueAttributes -
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • createSharedQueue

        @Deprecated
        public abstract void createSharedQueue​(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 filterString,
                                               boolean durable)
                                        throws org.apache.activemq.artemis.api.core.ActiveMQException
        Deprecated.
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • createSharedQueue

        @Deprecated
        public abstract void createSharedQueue​(org.apache.activemq.artemis.api.core.SimpleString address,
                                               org.apache.activemq.artemis.api.core.SimpleString queueName,
                                               org.apache.activemq.artemis.api.core.SimpleString filterString,
                                               boolean durable)
                                        throws org.apache.activemq.artemis.api.core.ActiveMQException
        Deprecated.
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • createSharedQueue

        public abstract void createSharedQueue​(org.apache.activemq.artemis.api.core.QueueConfiguration queueConfiguration)
                                        throws org.apache.activemq.artemis.api.core.ActiveMQException
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • deleteQueue

        public abstract void deleteQueue​(org.apache.activemq.artemis.api.core.SimpleString queueName)
                                  throws org.apache.activemq.artemis.api.core.ActiveMQException
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • createAddress

        @Deprecated
        public abstract void createAddress​(org.apache.activemq.artemis.api.core.SimpleString address,
                                           java.util.Set<org.apache.activemq.artemis.api.core.RoutingType> routingTypes,
                                           boolean autoCreated)
                                    throws org.apache.activemq.artemis.api.core.ActiveMQException
        Deprecated.
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • createAddress

        public abstract void createAddress​(org.apache.activemq.artemis.api.core.SimpleString address,
                                           java.util.EnumSet<org.apache.activemq.artemis.api.core.RoutingType> routingTypes,
                                           boolean autoCreated)
                                    throws org.apache.activemq.artemis.api.core.ActiveMQException
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • createQueue

        @Deprecated
        public abstract void createQueue​(org.apache.activemq.artemis.api.core.SimpleString address,
                                         org.apache.activemq.artemis.api.core.SimpleString queueName,
                                         org.apache.activemq.artemis.api.core.SimpleString filterString,
                                         boolean durable,
                                         boolean temp,
                                         boolean autoCreated)
                                  throws org.apache.activemq.artemis.api.core.ActiveMQException
        Deprecated.
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • createQueue

        @Deprecated
        public abstract void createQueue​(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 filterString,
                                         boolean durable,
                                         boolean temp,
                                         int maxConsumers,
                                         boolean purgeOnNoConsumers,
                                         boolean autoCreated)
                                  throws org.apache.activemq.artemis.api.core.ActiveMQException
        Deprecated.
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • createQueue

        public abstract void createQueue​(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 filterString,
                                         boolean durable,
                                         boolean temp,
                                         int maxConsumers,
                                         boolean purgeOnNoConsumers,
                                         boolean autoCreated,
                                         java.lang.Boolean exclusive,
                                         java.lang.Boolean lastVale)
                                  throws org.apache.activemq.artemis.api.core.ActiveMQException
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • createQueue

        public abstract void createQueue​(org.apache.activemq.artemis.api.core.SimpleString address,
                                         org.apache.activemq.artemis.api.core.SimpleString queueName,
                                         boolean temp,
                                         boolean autoCreated,
                                         org.apache.activemq.artemis.api.core.QueueAttributes queueAttributes)
                                  throws org.apache.activemq.artemis.api.core.ActiveMQException
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • createQueue

        public abstract void createQueue​(org.apache.activemq.artemis.api.core.QueueConfiguration queueConfiguration)
                                  throws org.apache.activemq.artemis.api.core.ActiveMQException
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • queueQuery

        public abstract ClientSession.QueueQuery queueQuery​(org.apache.activemq.artemis.api.core.SimpleString queueName)
                                                     throws org.apache.activemq.artemis.api.core.ActiveMQException
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • forceDelivery

        public abstract void forceDelivery​(ClientConsumer consumer,
                                           long sequence)
                                    throws org.apache.activemq.artemis.api.core.ActiveMQException
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • addressQuery

        public abstract ClientSession.AddressQuery addressQuery​(org.apache.activemq.artemis.api.core.SimpleString address)
                                                         throws org.apache.activemq.artemis.api.core.ActiveMQException
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • simpleCommit

        public abstract void simpleCommit()
                                   throws org.apache.activemq.artemis.api.core.ActiveMQException
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • simpleCommit

        public abstract void simpleCommit​(boolean block)
                                   throws org.apache.activemq.artemis.api.core.ActiveMQException
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • simpleRollback

        public abstract void simpleRollback​(boolean lastMessageAsDelivered)
                                     throws org.apache.activemq.artemis.api.core.ActiveMQException
        If we are doing a simple rollback on the RA, we need to ack the last message sent to the consumer, otherwise DLQ won't work.

        this is because we only ACK after on the RA, We may review this if we always acked earlier.

        Parameters:
        lastMessageAsDelivered -
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • sessionStart

        public abstract void sessionStart()
                                   throws org.apache.activemq.artemis.api.core.ActiveMQException
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • sessionStop

        public abstract void sessionStop()
                                  throws org.apache.activemq.artemis.api.core.ActiveMQException
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • sendACK

        public abstract void sendACK​(boolean individual,
                                     boolean block,
                                     ClientConsumer consumer,
                                     Message message)
                              throws org.apache.activemq.artemis.api.core.ActiveMQException
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • expireMessage

        public abstract void expireMessage​(ClientConsumer consumer,
                                           Message message)
                                    throws org.apache.activemq.artemis.api.core.ActiveMQException
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • sessionClose

        public abstract void sessionClose()
                                   throws org.apache.activemq.artemis.api.core.ActiveMQException
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • addSessionMetadata

        public abstract void addSessionMetadata​(java.lang.String key,
                                                java.lang.String data)
                                         throws org.apache.activemq.artemis.api.core.ActiveMQException
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • addUniqueMetaData

        public abstract void addUniqueMetaData​(java.lang.String key,
                                               java.lang.String data)
                                        throws org.apache.activemq.artemis.api.core.ActiveMQException
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • sendProducerCreditsMessage

        public abstract void sendProducerCreditsMessage​(int credits,
                                                        org.apache.activemq.artemis.api.core.SimpleString address)
      • xaCommit

        public abstract void xaCommit​(javax.transaction.xa.Xid xid,
                                      boolean onePhase)
                               throws javax.transaction.xa.XAException,
                                      org.apache.activemq.artemis.api.core.ActiveMQException
        Throws:
        javax.transaction.xa.XAException
        org.apache.activemq.artemis.api.core.ActiveMQException
      • xaEnd

        public abstract void xaEnd​(javax.transaction.xa.Xid xid,
                                   int flags)
                            throws javax.transaction.xa.XAException,
                                   org.apache.activemq.artemis.api.core.ActiveMQException
        Throws:
        javax.transaction.xa.XAException
        org.apache.activemq.artemis.api.core.ActiveMQException
      • xaForget

        public abstract void xaForget​(javax.transaction.xa.Xid xid)
                               throws javax.transaction.xa.XAException,
                                      org.apache.activemq.artemis.api.core.ActiveMQException
        Throws:
        javax.transaction.xa.XAException
        org.apache.activemq.artemis.api.core.ActiveMQException
      • xaPrepare

        public abstract int xaPrepare​(javax.transaction.xa.Xid xid)
                               throws javax.transaction.xa.XAException,
                                      org.apache.activemq.artemis.api.core.ActiveMQException
        Throws:
        javax.transaction.xa.XAException
        org.apache.activemq.artemis.api.core.ActiveMQException
      • xaScan

        public abstract javax.transaction.xa.Xid[] xaScan()
                                                   throws org.apache.activemq.artemis.api.core.ActiveMQException
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • xaRollback

        public abstract void xaRollback​(javax.transaction.xa.Xid xid,
                                        boolean wasStarted)
                                 throws org.apache.activemq.artemis.api.core.ActiveMQException,
                                        javax.transaction.xa.XAException
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
        javax.transaction.xa.XAException
      • xaStart

        public abstract void xaStart​(javax.transaction.xa.Xid xid,
                                     int flags)
                              throws javax.transaction.xa.XAException,
                                     org.apache.activemq.artemis.api.core.ActiveMQException
        Throws:
        javax.transaction.xa.XAException
        org.apache.activemq.artemis.api.core.ActiveMQException
      • configureTransactionTimeout

        public abstract boolean configureTransactionTimeout​(int seconds)
                                                     throws org.apache.activemq.artemis.api.core.ActiveMQException
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • createConsumer

        public abstract org.apache.activemq.artemis.core.client.impl.ClientConsumerInternal createConsumer​(org.apache.activemq.artemis.api.core.SimpleString queueName,
                                                                                                           org.apache.activemq.artemis.api.core.SimpleString filterString,
                                                                                                           int priority,
                                                                                                           int windowSize,
                                                                                                           int maxRate,
                                                                                                           int ackBatchSize,
                                                                                                           boolean browseOnly,
                                                                                                           java.util.concurrent.Executor executor,
                                                                                                           java.util.concurrent.Executor flowControlExecutor)
                                                                                                    throws org.apache.activemq.artemis.api.core.ActiveMQException
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • recoverSessionTimeout

        public abstract int recoverSessionTimeout()
                                           throws org.apache.activemq.artemis.api.core.ActiveMQException
        Performs a round trip to the server requesting what is the current tx timeout on the session
        Returns:
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • getServerVersion

        public abstract int getServerVersion()
      • recreateSession

        public abstract void recreateSession​(java.lang.String username,
                                             java.lang.String password,
                                             int minLargeMessageSize,
                                             boolean xa,
                                             boolean autoCommitSends,
                                             boolean autoCommitAcks,
                                             boolean preAcknowledge)
                                      throws org.apache.activemq.artemis.api.core.ActiveMQException
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • recreateConsumerOnServer

        public abstract void recreateConsumerOnServer​(org.apache.activemq.artemis.core.client.impl.ClientConsumerInternal consumerInternal,
                                                      long consumerId,
                                                      boolean isSessionStarted)
                                               throws org.apache.activemq.artemis.api.core.ActiveMQException
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • xaFailed

        public abstract void xaFailed​(javax.transaction.xa.Xid xid)
                               throws org.apache.activemq.artemis.api.core.ActiveMQException
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • restartSession

        public abstract void restartSession()
                                     throws org.apache.activemq.artemis.api.core.ActiveMQException
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • resetMetadata

        public abstract void resetMetadata​(java.util.HashMap<java.lang.String,​java.lang.String> metaDataToSend)
      • getDefaultConsumerWindowSize

        public abstract int getDefaultConsumerWindowSize​(org.apache.activemq.artemis.core.protocol.core.impl.wireformat.SessionQueueQueryResponseMessage response)
                                                  throws org.apache.activemq.artemis.api.core.ActiveMQException
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • returnBlocking

        public abstract void returnBlocking​(org.apache.activemq.artemis.api.core.ActiveMQException cause)
        Interrupt and return any blocked calls
      • lockCommunications

        public abstract void lockCommunications()
        it will lock the communication channel of the session avoiding anything to come while failover is happening. It happens on preFailover from ClientSessionImpl
      • releaseCommunications

        public abstract void releaseCommunications()
      • cleanup

        public abstract void cleanup()
      • linkFlowControl

        public abstract void linkFlowControl​(org.apache.activemq.artemis.api.core.SimpleString address,
                                             org.apache.activemq.artemis.core.client.impl.ClientProducerCredits clientProducerCredits)
      • isWritable

        public abstract boolean isWritable​(ReadyListener callback)