Class ServerSessionImpl
- java.lang.Object
-
- org.apache.activemq.artemis.core.server.impl.ServerSessionImpl
-
- All Implemented Interfaces:
FailureListener,SecurityAuth,ServerSession
public class ServerSessionImpl extends Object implements ServerSession, FailureListener
Server side Session implementation
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classServerSessionImpl.TempQueueCleanerUpper
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ServerSessionImpl(String name, String username, String password, String validatedUser, int minLargeMessageSize, boolean autoCommitSends, boolean autoCommitAcks, boolean preAcknowledge, boolean strictUpdateDeliveryCount, boolean xa, RemotingConnection remotingConnection, StorageManager storageManager, PostOffice postOffice, ResourceManager resourceManager, SecurityStore securityStore, ManagementService managementService, ActiveMQServer server, SimpleString managementAddress, SimpleString defaultAddress, SessionCallback callback, OperationContext context, PagingManager pagingManager, Map<SimpleString,RoutingType> prefixes, String securityDomain)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description List<Long>acknowledge(long consumerID, long messageID)voidaddCloseable(Closeable closeable)voidaddLingerConsumer(ServerConsumer consumer)voidaddMetaData(String key, String data)voidaddProducer(ServerProducer serverProducer)booleanaddUniqueMetaData(String key, String data)Map<SimpleString,Pair<Object,AtomicLong>>cloneTargetAddresses()voidclose(boolean failed)voidcloseConsumer(long consumerID)voidcommit()voidconnectionFailed(ActiveMQException me, boolean failedOver)voidconnectionFailed(ActiveMQException me, boolean failedOver, String scaleDownTargetNodeID)AddressInfocreateAddress(SimpleString address, EnumSet<RoutingType> routingTypes, boolean autoCreated)AddressInfocreateAddress(SimpleString address, RoutingType routingType, boolean autoCreated)AddressInfocreateAddress(AddressInfo addressInfo, boolean autoCreated)ServerConsumercreateConsumer(long consumerID, SimpleString queueName, SimpleString filterString, boolean browseOnly)ServerConsumercreateConsumer(long consumerID, SimpleString queueName, SimpleString filterString, boolean browseOnly, boolean supportLargeMessage, Integer credits)ServerConsumercreateConsumer(long consumerID, SimpleString queueName, SimpleString filterString, int priority, boolean browseOnly, boolean supportLargeMessage, Integer credits)QueuecreateQueue(QueueConfiguration queueConfiguration)This method invokesActiveMQServer.createQueue(QueueConfiguration)with a few client-specific additions:QueuecreateQueue(SimpleString address, SimpleString name, RoutingType routingType, SimpleString filterString, boolean temporary, boolean durable)Deprecated.QueuecreateQueue(SimpleString address, SimpleString name, RoutingType routingType, SimpleString filterString, boolean temporary, boolean durable, boolean autoCreated)Deprecated.QueuecreateQueue(SimpleString address, SimpleString name, RoutingType routingType, SimpleString filterString, boolean temporary, boolean durable, int maxConsumers, boolean purgeOnNoConsumers, boolean autoCreated)Deprecated.QueuecreateQueue(SimpleString address, SimpleString name, RoutingType routingType, SimpleString filterString, boolean temporary, boolean durable, int maxConsumers, boolean purgeOnNoConsumers, Boolean exclusive, Boolean lastValue, boolean autoCreated)Deprecated.QueuecreateQueue(SimpleString address, SimpleString name, RoutingType routingType, SimpleString filterString, boolean temporary, boolean durable, int maxConsumers, boolean purgeOnNoConsumers, Boolean exclusive, Boolean groupRebalance, Integer groupBuckets, Boolean lastValue, SimpleString lastValueKey, Boolean nonDestructive, Integer consumersBeforeDispatch, Long delayBeforeDispatch, Boolean autoDelete, Long autoDeleteDelay, Long autoDeleteMessageCount, boolean autoCreated)Deprecated.QueuecreateQueue(SimpleString address, SimpleString name, RoutingType routingType, SimpleString filterString, boolean temporary, boolean durable, int maxConsumers, boolean purgeOnNoConsumers, Boolean exclusive, Boolean groupRebalance, Integer groupBuckets, SimpleString groupFirstKey, Boolean lastValue, SimpleString lastValueKey, Boolean nonDestructive, Integer consumersBeforeDispatch, Long delayBeforeDispatch, Boolean autoDelete, Long autoDeleteDelay, Long autoDeleteMessageCount, boolean autoCreated)Deprecated.QueuecreateQueue(SimpleString address, SimpleString name, RoutingType routingType, SimpleString filterString, boolean temporary, boolean durable, int maxConsumers, boolean purgeOnNoConsumers, Boolean exclusive, Boolean groupRebalance, Integer groupBuckets, SimpleString groupFirstKey, Boolean lastValue, SimpleString lastValueKey, Boolean nonDestructive, Integer consumersBeforeDispatch, Long delayBeforeDispatch, Boolean autoDelete, Long autoDeleteDelay, Long autoDeleteMessageCount, boolean autoCreated, Long ringSize)Deprecated.QueuecreateQueue(SimpleString address, SimpleString name, SimpleString filterString, boolean temporary, boolean durable)Deprecated.QueuecreateQueue(AddressInfo addressInfo, SimpleString name, SimpleString filterString, boolean temporary, boolean durable)Deprecated.QueuecreateQueue(AddressInfo addressInfo, SimpleString name, SimpleString filterString, boolean temporary, boolean durable, boolean autoCreated)Deprecated.QueuecreateQueue(AddressInfo addressInfo, SimpleString name, SimpleString filterString, boolean temporary, boolean durable, int maxConsumers, boolean purgeOnNoConsumers, boolean exclusive, boolean groupRebalance, int groupBuckets, SimpleString groupFirstKey, boolean lastValue, SimpleString lastValueKey, boolean nonDestructive, int consumersBeforeDispatch, long delayBeforeDispatch, boolean autoDelete, long autoDeleteDelay, long autoDeleteMessageCount, boolean autoCreated, long ringSize)Deprecated.QueuecreateQueue(AddressInfo addressInfo, SimpleString name, SimpleString filterString, boolean temporary, boolean durable, Boolean exclusive, Boolean lastValue, boolean autoCreated)Deprecated.voidcreateSharedQueue(QueueConfiguration queueConfiguration)voidcreateSharedQueue(SimpleString address, SimpleString name, boolean durable, SimpleString filterString)Deprecated.voidcreateSharedQueue(SimpleString address, SimpleString name, RoutingType routingType, boolean durable, SimpleString filterString)Deprecated.voidcreateSharedQueue(SimpleString address, SimpleString name, RoutingType routingType, SimpleString filterString, boolean durable, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, Boolean lastValue)Deprecated.voidcreateSharedQueue(SimpleString address, SimpleString name, RoutingType routingType, SimpleString filterString, boolean durable, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, Boolean groupRebalance, Integer groupBuckets, Boolean lastValue, SimpleString lastValueKey, Boolean nonDestructive, Integer consumersBeforeDispatch, Long delayBeforeDispatch, Boolean autoDelete, Long autoDeleteDelay, Long autoDeleteMessageCount)Deprecated.voidcreateSharedQueue(SimpleString address, SimpleString name, RoutingType routingType, SimpleString filterString, boolean durable, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, Boolean groupRebalance, Integer groupBuckets, SimpleString groupFirstKey, Boolean lastValue, SimpleString lastValueKey, Boolean nonDestructive, Integer consumersBeforeDispatch, Long delayBeforeDispatch, Boolean autoDelete, Long autoDeleteDelay, Long autoDeleteMessageCount)Deprecated.voiddeleteQueue(SimpleString queueToDelete)voiddescribeProducersInfo(JsonArrayBuilder array)Add all the producers detail to the JSONArray object.voiddisableSecurity()protected voiddoClose(boolean failed)RoutingStatusdoSend(Transaction tx, Message msg, SimpleString originalAddress, boolean direct, boolean noAutoCreateQueue)RoutingStatusdoSend(Transaction tx, Message msg, SimpleString originalAddress, boolean direct, boolean noAutoCreateQueue, RoutingContext routingContext)voidenableSecurity()Certain protocols may create an internal session that shouldn't go through security checks.AddressQueryResultexecuteAddressQuery(SimpleString name)BindingQueryResultexecuteBindingQuery(SimpleString address)QueueQueryResultexecuteQueueQuery(SimpleString name)voidexpire(long consumerID, long messageID)voidforceConsumerDelivery(long consumerID, long sequence)AddressInfogetAddress(SimpleString address)AddressInfogetAddressAndRoutingType(AddressInfo addressInfo)Get the canonical (i.e.Pair<SimpleString,EnumSet<RoutingType>>getAddressAndRoutingTypes(SimpleString address, EnumSet<RoutingType> defaultRoutingTypes)Get the canonical (i.e.Set<Closeable>getCloseables()ObjectgetConnectionID()intgetConsumerCount()longgetCreationTime()TransactiongetCurrentTransaction()StringgetDefaultAddress()intgetDefaultConsumerWindowSize(SimpleString address)List<MessageReference>getInTxLingerMessages()List<MessageReference>getInTXMessagesForConsumer(long consumerId)StringgetLastSentMessageID(String address)SimpleStringgetMatchingQueue(SimpleString address, RoutingType routingType)SimpleStringgetMatchingQueue(SimpleString address, SimpleString queueName, RoutingType routingType)Map<String,String>getMetaData()StringgetMetaData(String key)intgetMinLargeMessageSize()StringgetName()StringgetPassword()SimpleStringgetPrefix(SimpleString address)Get the prefix (if it exists) from the address based on the prefixes provided to the ServerSession constructor.intgetProducerCount()RemotingConnectiongetRemotingConnection()RoutingTypegetRoutingTypeFromPrefix(SimpleString address, RoutingType defaultRoutingType)StringgetSecurityDomain()Set<ServerConsumer>getServerConsumers()Map<String,ServerProducer>getServerProducers()OperationContextgetSessionContext()ExecutorgetSessionExecutor()StorageManagergetStorageManager()String[]getTargetAddresses()Map<SimpleString,ServerSessionImpl.TempQueueCleanerUpper>getTempQueueCleanUppers()StringgetUsername()StringgetValidatedUser()voidindividualAcknowledge(long consumerID, long messageID)voidindividualCancel(long consumerID, long messageID, boolean failed)booleanisClosed()ServerConsumerlocateConsumer(long consumerID)voidmarkTXFailed(Throwable e)TransactionnewTransaction()voidreceiveConsumerCredits(long consumerID, int credits)booleanremoveConsumer(long consumerID)SimpleStringremovePrefix(SimpleString address)Strip the prefix (if it exists) from the address based on the prefixes provided to the ServerSession constructor.voidremoveProducer(String ID)voidrequestProducerCredits(SimpleString address, int credits)voidresetTX(Transaction transaction)Some protocols may chose to hold their transactions outside of the ServerSession.voidrollback(boolean considerLastMessageAsDelivered)RoutingStatussend(Message message, boolean direct)RoutingStatussend(Message message, boolean direct, boolean noAutoCreateQueue)RoutingStatussend(Transaction tx, Message msg, boolean direct, boolean noAutoCreateQueue)RoutingStatussend(Transaction tx, Message messageParameter, boolean direct, boolean noAutoCreateQueue, RoutingContext routingContext)voidsetTransferring(boolean transferring)voidstart()voidstop()StringtoManagementString()StringtoString()voidtransferConnection(RemotingConnection newConnection)voidxaCommit(Xid xid, boolean onePhase)voidxaEnd(Xid xid)voidxaFailed(Xid xid)voidxaForget(Xid xid)List<Xid>xaGetInDoubtXids()intxaGetTimeout()voidxaJoin(Xid xid)voidxaPrepare(Xid xid)voidxaResume(Xid xid)voidxaRollback(Xid xid)voidxaSetTimeout(int timeout)voidxaStart(Xid xid)voidxaSuspend()
-
-
-
Field Detail
-
username
protected final String username
-
password
protected final String password
-
validatedUser
protected final String validatedUser
-
autoCommitSends
protected boolean autoCommitSends
-
autoCommitAcks
protected boolean autoCommitAcks
-
preAcknowledge
protected final boolean preAcknowledge
-
strictUpdateDeliveryCount
protected final boolean strictUpdateDeliveryCount
-
remotingConnection
protected RemotingConnection remotingConnection
-
consumers
protected final Map<Long,ServerConsumer> consumers
-
producers
protected final Map<String,ServerProducer> producers
-
tx
protected Transaction tx
-
pendingTX
protected volatile Transaction pendingTX
This will store the Transaction between xaEnd and xaPrepare or xaCommit. in a failure scenario (client is gone), this will be held between xaEnd and xaCommit.
-
xa
protected boolean xa
-
pagingManager
protected final PagingManager pagingManager
-
storageManager
protected final StorageManager storageManager
-
postOffice
public final PostOffice postOffice
-
managementService
protected final ManagementService managementService
-
started
protected volatile boolean started
-
tempQueueCleannerUppers
protected final Map<SimpleString,ServerSessionImpl.TempQueueCleanerUpper> tempQueueCleannerUppers
-
name
protected final String name
-
server
protected final ActiveMQServer server
-
routingContext
protected final RoutingContext routingContext
-
callback
protected final SessionCallback callback
-
targetAddressInfos
protected final Map<SimpleString,Pair<Object,AtomicLong>> targetAddressInfos
-
-
Constructor Detail
-
ServerSessionImpl
public ServerSessionImpl(String name, String username, String password, String validatedUser, int minLargeMessageSize, boolean autoCommitSends, boolean autoCommitAcks, boolean preAcknowledge, boolean strictUpdateDeliveryCount, boolean xa, RemotingConnection remotingConnection, StorageManager storageManager, PostOffice postOffice, ResourceManager resourceManager, SecurityStore securityStore, ManagementService managementService, ActiveMQServer server, SimpleString managementAddress, SimpleString defaultAddress, SessionCallback callback, OperationContext context, PagingManager pagingManager, Map<SimpleString,RoutingType> prefixes, String securityDomain) throws Exception
- Throws:
Exception
-
-
Method Detail
-
enableSecurity
public void enableSecurity()
Description copied from interface:ServerSessionCertain protocols may create an internal session that shouldn't go through security checks. make sure you don't expose this property through any protocol layer as that would be a security breach- Specified by:
enableSecurityin interfaceServerSession
-
addCloseable
public void addCloseable(Closeable closeable)
- Specified by:
addCloseablein interfaceServerSession
-
getTempQueueCleanUppers
public Map<SimpleString,ServerSessionImpl.TempQueueCleanerUpper> getTempQueueCleanUppers()
-
getSessionExecutor
public Executor getSessionExecutor()
- Specified by:
getSessionExecutorin interfaceServerSession
-
disableSecurity
public void disableSecurity()
- Specified by:
disableSecurityin interfaceServerSession
-
isClosed
public boolean isClosed()
- Specified by:
isClosedin interfaceServerSession
-
getSessionContext
public OperationContext getSessionContext()
- Specified by:
getSessionContextin interfaceServerSession- Returns:
- the sessionContext
-
getUsername
public String getUsername()
- Specified by:
getUsernamein interfaceSecurityAuth
-
getPassword
public String getPassword()
- Specified by:
getPasswordin interfaceSecurityAuth
-
getMinLargeMessageSize
public int getMinLargeMessageSize()
- Specified by:
getMinLargeMessageSizein interfaceServerSession
-
getName
public String getName()
- Specified by:
getNamein interfaceServerSession
-
getConnectionID
public Object getConnectionID()
- Specified by:
getConnectionIDin interfaceServerSession
-
getServerConsumers
public Set<ServerConsumer> getServerConsumers()
- Specified by:
getServerConsumersin interfaceServerSession
-
markTXFailed
public void markTXFailed(Throwable e)
- Specified by:
markTXFailedin interfaceServerSession
-
removeConsumer
public boolean removeConsumer(long consumerID) throws Exception- Specified by:
removeConsumerin interfaceServerSession- Throws:
Exception
-
createConsumer
public ServerConsumer createConsumer(long consumerID, SimpleString queueName, SimpleString filterString, boolean browseOnly) throws Exception
- Specified by:
createConsumerin interfaceServerSession- Throws:
Exception
-
createConsumer
public ServerConsumer createConsumer(long consumerID, SimpleString queueName, SimpleString filterString, boolean browseOnly, boolean supportLargeMessage, Integer credits) throws Exception
- Specified by:
createConsumerin interfaceServerSession- Throws:
Exception
-
createConsumer
public ServerConsumer createConsumer(long consumerID, SimpleString queueName, SimpleString filterString, int priority, boolean browseOnly, boolean supportLargeMessage, Integer credits) throws Exception
- Specified by:
createConsumerin interfaceServerSession- Throws:
Exception
-
resetTX
public void resetTX(Transaction transaction)
Some protocols may chose to hold their transactions outside of the ServerSession. This can be used to replace the transaction. Notice that we set autoCommitACK and autoCommitSends to true if tx == null- Specified by:
resetTXin interfaceServerSession
-
createQueue
@Deprecated public Queue createQueue(SimpleString address, SimpleString name, SimpleString filterString, boolean temporary, boolean durable) throws Exception
Deprecated.Description copied from interface:ServerSessionCreate queue with default delivery mode- Specified by:
createQueuein interfaceServerSession- Returns:
- Throws:
Exception
-
createQueue
@Deprecated public Queue createQueue(SimpleString address, SimpleString name, RoutingType routingType, SimpleString filterString, boolean temporary, boolean durable) throws Exception
Deprecated.- Specified by:
createQueuein interfaceServerSession- Throws:
Exception
-
createQueue
@Deprecated public Queue createQueue(AddressInfo addressInfo, SimpleString name, SimpleString filterString, boolean temporary, boolean durable) throws Exception
Deprecated.- Specified by:
createQueuein interfaceServerSession- Throws:
Exception
-
createQueue
@Deprecated public Queue createQueue(AddressInfo addressInfo, SimpleString name, SimpleString filterString, boolean temporary, boolean durable, int maxConsumers, boolean purgeOnNoConsumers, boolean exclusive, boolean groupRebalance, int groupBuckets, SimpleString groupFirstKey, boolean lastValue, SimpleString lastValueKey, boolean nonDestructive, int consumersBeforeDispatch, long delayBeforeDispatch, boolean autoDelete, long autoDeleteDelay, long autoDeleteMessageCount, boolean autoCreated, long ringSize) throws Exception
Deprecated.- Throws:
Exception
-
createQueue
public Queue createQueue(QueueConfiguration queueConfiguration) throws Exception
Description copied from interface:ServerSessionThis method invokesActiveMQServer.createQueue(QueueConfiguration)with a few client-specific additions:- set the routing type based on the prefixes configured on the acceptor used by the client
- strip any prefixes from the address and queue names (if applicable)
- check authorization based on the client's credentials
- enforce queue creation resource limit
- set up callbacks to clean up temporary queues once the client disconnects
- Specified by:
createQueuein interfaceServerSession- Parameters:
queueConfiguration- the configuration to use when creating the queue- Returns:
- the
Queueinstance that was created - Throws:
Exception
-
createQueue
@Deprecated public Queue createQueue(SimpleString address, SimpleString name, RoutingType routingType, SimpleString filterString, boolean temporary, boolean durable, int maxConsumers, boolean purgeOnNoConsumers, boolean autoCreated) throws Exception
Deprecated.- Specified by:
createQueuein interfaceServerSession- Throws:
Exception
-
createQueue
@Deprecated public Queue createQueue(SimpleString address, SimpleString name, RoutingType routingType, SimpleString filterString, boolean temporary, boolean durable, int maxConsumers, boolean purgeOnNoConsumers, Boolean exclusive, Boolean lastValue, boolean autoCreated) throws Exception
Deprecated.- Specified by:
createQueuein interfaceServerSession- Throws:
Exception
-
createQueue
@Deprecated public Queue createQueue(SimpleString address, SimpleString name, RoutingType routingType, SimpleString filterString, boolean temporary, boolean durable, int maxConsumers, boolean purgeOnNoConsumers, Boolean exclusive, Boolean groupRebalance, Integer groupBuckets, Boolean lastValue, SimpleString lastValueKey, Boolean nonDestructive, Integer consumersBeforeDispatch, Long delayBeforeDispatch, Boolean autoDelete, Long autoDeleteDelay, Long autoDeleteMessageCount, boolean autoCreated) throws Exception
Deprecated.- Specified by:
createQueuein interfaceServerSession- Throws:
Exception
-
createQueue
@Deprecated public Queue createQueue(SimpleString address, SimpleString name, RoutingType routingType, SimpleString filterString, boolean temporary, boolean durable, int maxConsumers, boolean purgeOnNoConsumers, Boolean exclusive, Boolean groupRebalance, Integer groupBuckets, SimpleString groupFirstKey, Boolean lastValue, SimpleString lastValueKey, Boolean nonDestructive, Integer consumersBeforeDispatch, Long delayBeforeDispatch, Boolean autoDelete, Long autoDeleteDelay, Long autoDeleteMessageCount, boolean autoCreated) throws Exception
Deprecated.- Specified by:
createQueuein interfaceServerSession- Throws:
Exception
-
createQueue
@Deprecated public Queue createQueue(SimpleString address, SimpleString name, RoutingType routingType, SimpleString filterString, boolean temporary, boolean durable, int maxConsumers, boolean purgeOnNoConsumers, Boolean exclusive, Boolean groupRebalance, Integer groupBuckets, SimpleString groupFirstKey, Boolean lastValue, SimpleString lastValueKey, Boolean nonDestructive, Integer consumersBeforeDispatch, Long delayBeforeDispatch, Boolean autoDelete, Long autoDeleteDelay, Long autoDeleteMessageCount, boolean autoCreated, Long ringSize) throws Exception
Deprecated.- Specified by:
createQueuein interfaceServerSession- Throws:
Exception
-
createQueue
@Deprecated public Queue createQueue(SimpleString address, SimpleString name, RoutingType routingType, SimpleString filterString, boolean temporary, boolean durable, boolean autoCreated) throws Exception
Deprecated.- Specified by:
createQueuein interfaceServerSession- Throws:
Exception
-
createQueue
@Deprecated public Queue createQueue(AddressInfo addressInfo, SimpleString name, SimpleString filterString, boolean temporary, boolean durable, boolean autoCreated) throws Exception
Deprecated.- Specified by:
createQueuein interfaceServerSession- Throws:
Exception
-
createQueue
@Deprecated public Queue createQueue(AddressInfo addressInfo, SimpleString name, SimpleString filterString, boolean temporary, boolean durable, Boolean exclusive, Boolean lastValue, boolean autoCreated) throws Exception
Deprecated.- Specified by:
createQueuein interfaceServerSession- Throws:
Exception
-
createAddress
public AddressInfo createAddress(SimpleString address, EnumSet<RoutingType> routingTypes, boolean autoCreated) throws Exception
- Specified by:
createAddressin interfaceServerSession- Throws:
Exception
-
createAddress
public AddressInfo createAddress(SimpleString address, RoutingType routingType, boolean autoCreated) throws Exception
- Specified by:
createAddressin interfaceServerSession- Throws:
Exception
-
createAddress
public AddressInfo createAddress(AddressInfo addressInfo, boolean autoCreated) throws Exception
- Specified by:
createAddressin interfaceServerSession- Throws:
Exception
-
createSharedQueue
@Deprecated public void createSharedQueue(SimpleString address, SimpleString name, RoutingType routingType, SimpleString filterString, boolean durable, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, Boolean lastValue) throws Exception
Deprecated.- Specified by:
createSharedQueuein interfaceServerSession- Throws:
Exception
-
createSharedQueue
@Deprecated public void createSharedQueue(SimpleString address, SimpleString name, RoutingType routingType, SimpleString filterString, boolean durable, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, Boolean groupRebalance, Integer groupBuckets, Boolean lastValue, SimpleString lastValueKey, Boolean nonDestructive, Integer consumersBeforeDispatch, Long delayBeforeDispatch, Boolean autoDelete, Long autoDeleteDelay, Long autoDeleteMessageCount) throws Exception
Deprecated.- Specified by:
createSharedQueuein interfaceServerSession- Throws:
Exception
-
createSharedQueue
@Deprecated public void createSharedQueue(SimpleString address, SimpleString name, RoutingType routingType, SimpleString filterString, boolean durable, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, Boolean groupRebalance, Integer groupBuckets, SimpleString groupFirstKey, Boolean lastValue, SimpleString lastValueKey, Boolean nonDestructive, Integer consumersBeforeDispatch, Long delayBeforeDispatch, Boolean autoDelete, Long autoDeleteDelay, Long autoDeleteMessageCount) throws Exception
Deprecated.- Specified by:
createSharedQueuein interfaceServerSession- Throws:
Exception
-
createSharedQueue
public void createSharedQueue(QueueConfiguration queueConfiguration) throws Exception
- Specified by:
createSharedQueuein interfaceServerSession- Throws:
Exception
-
createSharedQueue
@Deprecated public void createSharedQueue(SimpleString address, SimpleString name, RoutingType routingType, boolean durable, SimpleString filterString) throws Exception
Deprecated.- Specified by:
createSharedQueuein interfaceServerSession- Throws:
Exception
-
createSharedQueue
@Deprecated public void createSharedQueue(SimpleString address, SimpleString name, boolean durable, SimpleString filterString) throws Exception
Deprecated.- Specified by:
createSharedQueuein interfaceServerSession- Throws:
Exception
-
getRemotingConnection
public RemotingConnection getRemotingConnection()
- Specified by:
getRemotingConnectionin interfaceSecurityAuth- Specified by:
getRemotingConnectionin interfaceServerSession
-
transferConnection
public void transferConnection(RemotingConnection newConnection)
- Specified by:
transferConnectionin interfaceServerSession
-
getSecurityDomain
public String getSecurityDomain()
- Specified by:
getSecurityDomainin interfaceSecurityAuth
-
deleteQueue
public void deleteQueue(SimpleString queueToDelete) throws Exception
- Specified by:
deleteQueuein interfaceServerSession- Throws:
Exception
-
executeQueueQuery
public QueueQueryResult executeQueueQuery(SimpleString name) throws Exception
- Specified by:
executeQueueQueryin interfaceServerSession- Throws:
Exception
-
executeAddressQuery
public AddressQueryResult executeAddressQuery(SimpleString name) throws Exception
- Specified by:
executeAddressQueryin interfaceServerSession- Throws:
Exception
-
executeBindingQuery
public BindingQueryResult executeBindingQuery(SimpleString address) throws Exception
- Specified by:
executeBindingQueryin interfaceServerSession- Throws:
Exception
-
forceConsumerDelivery
public void forceConsumerDelivery(long consumerID, long sequence) throws Exception- Specified by:
forceConsumerDeliveryin interfaceServerSession- Throws:
Exception
-
acknowledge
public List<Long> acknowledge(long consumerID, long messageID) throws Exception
- Specified by:
acknowledgein interfaceServerSession- Throws:
Exception
-
locateConsumer
public ServerConsumer locateConsumer(long consumerID)
- Specified by:
locateConsumerin interfaceServerSession
-
individualAcknowledge
public void individualAcknowledge(long consumerID, long messageID) throws Exception- Specified by:
individualAcknowledgein interfaceServerSession- Throws:
Exception
-
individualCancel
public void individualCancel(long consumerID, long messageID, boolean failed) throws Exception- Specified by:
individualCancelin interfaceServerSession- Throws:
Exception
-
expire
public void expire(long consumerID, long messageID) throws Exception- Specified by:
expirein interfaceServerSession- Throws:
Exception
-
commit
public void commit() throws Exception- Specified by:
commitin interfaceServerSession- Throws:
Exception
-
rollback
public void rollback(boolean considerLastMessageAsDelivered) throws Exception- Specified by:
rollbackin interfaceServerSession- Throws:
Exception
-
newTransaction
public Transaction newTransaction()
- Specified by:
newTransactionin interfaceServerSession- Returns:
-
xaCommit
public void xaCommit(Xid xid, boolean onePhase) throws Exception
- Specified by:
xaCommitin interfaceServerSession- Throws:
Exception
-
xaEnd
public void xaEnd(Xid xid) throws Exception
- Specified by:
xaEndin interfaceServerSession- Throws:
Exception
-
xaForget
public void xaForget(Xid xid) throws Exception
- Specified by:
xaForgetin interfaceServerSession- Throws:
Exception
-
xaJoin
public void xaJoin(Xid xid) throws Exception
- Specified by:
xaJoinin interfaceServerSession- Throws:
Exception
-
xaResume
public void xaResume(Xid xid) throws Exception
- Specified by:
xaResumein interfaceServerSession- Throws:
Exception
-
xaRollback
public void xaRollback(Xid xid) throws Exception
- Specified by:
xaRollbackin interfaceServerSession- Throws:
Exception
-
xaStart
public void xaStart(Xid xid) throws Exception
- Specified by:
xaStartin interfaceServerSession- Throws:
Exception
-
xaFailed
public void xaFailed(Xid xid) throws Exception
- Specified by:
xaFailedin interfaceServerSession- Throws:
Exception
-
xaSuspend
public void xaSuspend() throws Exception- Specified by:
xaSuspendin interfaceServerSession- Throws:
Exception
-
xaPrepare
public void xaPrepare(Xid xid) throws Exception
- Specified by:
xaPreparein interfaceServerSession- Throws:
Exception
-
xaGetInDoubtXids
public List<Xid> xaGetInDoubtXids()
- Specified by:
xaGetInDoubtXidsin interfaceServerSession
-
xaGetTimeout
public int xaGetTimeout()
- Specified by:
xaGetTimeoutin interfaceServerSession
-
xaSetTimeout
public void xaSetTimeout(int timeout)
- Specified by:
xaSetTimeoutin interfaceServerSession
-
start
public void start()
- Specified by:
startin interfaceServerSession
-
stop
public void stop()
- Specified by:
stopin interfaceServerSession
-
close
public void close(boolean failed)
- Specified by:
closein interfaceServerSession
-
closeConsumer
public void closeConsumer(long consumerID) throws Exception- Specified by:
closeConsumerin interfaceServerSession- Throws:
Exception
-
receiveConsumerCredits
public void receiveConsumerCredits(long consumerID, int credits) throws Exception- Specified by:
receiveConsumerCreditsin interfaceServerSession- Throws:
Exception
-
getCurrentTransaction
public Transaction getCurrentTransaction()
- Specified by:
getCurrentTransactionin interfaceServerSession
-
send
public RoutingStatus send(Message message, boolean direct) throws Exception
- Specified by:
sendin interfaceServerSession- Throws:
Exception
-
send
public RoutingStatus send(Message message, boolean direct, boolean noAutoCreateQueue) throws Exception
- Specified by:
sendin interfaceServerSession- Throws:
Exception
-
send
public RoutingStatus send(Transaction tx, Message msg, boolean direct, boolean noAutoCreateQueue) throws Exception
- Specified by:
sendin interfaceServerSession- Throws:
Exception
-
send
public RoutingStatus send(Transaction tx, Message messageParameter, boolean direct, boolean noAutoCreateQueue, RoutingContext routingContext) throws Exception
- Specified by:
sendin interfaceServerSession- Throws:
Exception
-
requestProducerCredits
public void requestProducerCredits(SimpleString address, int credits) throws Exception
- Specified by:
requestProducerCreditsin interfaceServerSession- Throws:
Exception
-
setTransferring
public void setTransferring(boolean transferring)
- Specified by:
setTransferringin interfaceServerSession
-
addMetaData
public void addMetaData(String key, String data) throws Exception
- Specified by:
addMetaDatain interfaceServerSession- Throws:
Exception
-
addUniqueMetaData
public boolean addUniqueMetaData(String key, String data) throws Exception
- Specified by:
addUniqueMetaDatain interfaceServerSession- Throws:
Exception
-
getMetaData
public String getMetaData(String key)
- Specified by:
getMetaDatain interfaceServerSession
-
getMetaData
public Map<String,String> getMetaData()
- Specified by:
getMetaDatain interfaceServerSession
-
getTargetAddresses
public String[] getTargetAddresses()
- Specified by:
getTargetAddressesin interfaceServerSession
-
getLastSentMessageID
public String getLastSentMessageID(String address)
- Specified by:
getLastSentMessageIDin interfaceServerSession
-
getCreationTime
public long getCreationTime()
- Specified by:
getCreationTimein interfaceServerSession
-
getStorageManager
public StorageManager getStorageManager()
-
describeProducersInfo
public void describeProducersInfo(JsonArrayBuilder array) throws Exception
Description copied from interface:ServerSessionAdd all the producers detail to the JSONArray object. This is a method to be used by the management layer.- Specified by:
describeProducersInfoin interfaceServerSession- Throws:
Exception
-
getValidatedUser
public String getValidatedUser()
- Specified by:
getValidatedUserin interfaceServerSession
-
getMatchingQueue
public SimpleString getMatchingQueue(SimpleString address, RoutingType routingType) throws Exception
- Specified by:
getMatchingQueuein interfaceServerSession- Throws:
Exception
-
getMatchingQueue
public SimpleString getMatchingQueue(SimpleString address, SimpleString queueName, RoutingType routingType) throws Exception
- Specified by:
getMatchingQueuein interfaceServerSession- Throws:
Exception
-
getAddress
public AddressInfo getAddress(SimpleString address)
- Specified by:
getAddressin interfaceServerSession
-
connectionFailed
public void connectionFailed(ActiveMQException me, boolean failedOver)
- Specified by:
connectionFailedin interfaceFailureListener
-
connectionFailed
public void connectionFailed(ActiveMQException me, boolean failedOver, String scaleDownTargetNodeID)
- Specified by:
connectionFailedin interfaceFailureListener
-
cloneTargetAddresses
public Map<SimpleString,Pair<Object,AtomicLong>> cloneTargetAddresses()
-
doSend
public RoutingStatus doSend(Transaction tx, Message msg, SimpleString originalAddress, boolean direct, boolean noAutoCreateQueue) throws Exception
- Specified by:
doSendin interfaceServerSession- Throws:
Exception
-
doSend
public RoutingStatus doSend(Transaction tx, Message msg, SimpleString originalAddress, boolean direct, boolean noAutoCreateQueue, RoutingContext routingContext) throws Exception
- Specified by:
doSendin interfaceServerSession- Throws:
Exception
-
getInTXMessagesForConsumer
public List<MessageReference> getInTXMessagesForConsumer(long consumerId)
- Specified by:
getInTXMessagesForConsumerin interfaceServerSession
-
getInTxLingerMessages
public List<MessageReference> getInTxLingerMessages()
- Specified by:
getInTxLingerMessagesin interfaceServerSession
-
addLingerConsumer
public void addLingerConsumer(ServerConsumer consumer)
- Specified by:
addLingerConsumerin interfaceServerSession
-
removePrefix
public SimpleString removePrefix(SimpleString address)
Description copied from interface:ServerSessionStrip the prefix (if it exists) from the address based on the prefixes provided to the ServerSession constructor.- Specified by:
removePrefixin interfaceServerSession- Parameters:
address- the address to inspect- Returns:
- the canonical (i.e. non-prefixed) address name
-
getPrefix
public SimpleString getPrefix(SimpleString address)
Description copied from interface:ServerSessionGet the prefix (if it exists) from the address based on the prefixes provided to the ServerSession constructor.- Specified by:
getPrefixin interfaceServerSession- Parameters:
address- the address to inspect- Returns:
- the canonical (i.e. non-prefixed) address name
-
getAddressAndRoutingType
public AddressInfo getAddressAndRoutingType(AddressInfo addressInfo)
Description copied from interface:ServerSessionGet the canonical (i.e. non-prefixed) address and the corresponding routing-type.- Specified by:
getAddressAndRoutingTypein interfaceServerSession- Parameters:
addressInfo- the address to inspect- Returns:
- a
org.apache.activemq.artemis.api.core.Pairrepresenting the canonical (i.e. non-prefixed) address name and theorg.apache.activemq.artemis.api.core.RoutingTypecorresponding to the that prefix.
-
getRoutingTypeFromPrefix
public RoutingType getRoutingTypeFromPrefix(SimpleString address, RoutingType defaultRoutingType)
- Specified by:
getRoutingTypeFromPrefixin interfaceServerSession
-
getAddressAndRoutingTypes
public Pair<SimpleString,EnumSet<RoutingType>> getAddressAndRoutingTypes(SimpleString address, EnumSet<RoutingType> defaultRoutingTypes)
Description copied from interface:ServerSessionGet the canonical (i.e. non-prefixed) address and the corresponding routing-type.- Specified by:
getAddressAndRoutingTypesin interfaceServerSession- Parameters:
address- the address to inspectdefaultRoutingTypes- a thejava.util.Setoforg.apache.activemq.artemis.api.core.RoutingTypeobjects to return if no prefix match is found.- Returns:
- a
org.apache.activemq.artemis.api.core.Pairrepresenting the canonical (i.e. non-prefixed) address name and thejava.util.Setoforg.apache.activemq.artemis.api.core.RoutingTypeobjects corresponding to the that prefix.
-
addProducer
public void addProducer(ServerProducer serverProducer)
- Specified by:
addProducerin interfaceServerSession
-
removeProducer
public void removeProducer(String ID)
- Specified by:
removeProducerin interfaceServerSession
-
getServerProducers
public Map<String,ServerProducer> getServerProducers()
- Specified by:
getServerProducersin interfaceServerSession
-
getDefaultAddress
public String getDefaultAddress()
- Specified by:
getDefaultAddressin interfaceServerSession
-
getConsumerCount
public int getConsumerCount()
- Specified by:
getConsumerCountin interfaceServerSession
-
getProducerCount
public int getProducerCount()
- Specified by:
getProducerCountin interfaceServerSession
-
getDefaultConsumerWindowSize
public int getDefaultConsumerWindowSize(SimpleString address)
- Specified by:
getDefaultConsumerWindowSizein interfaceServerSession
-
toManagementString
public String toManagementString()
- Specified by:
toManagementStringin interfaceServerSession
-
-