Class ServerSessionImpl
java.lang.Object
org.apache.activemq.artemis.core.server.impl.ServerSessionImpl
- All Implemented Interfaces:
FailureListener,SecurityAuth,ServerSession
Server side Session implementation
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected booleanprotected final SessionCallbackprotected final Map<Long,ServerConsumer> protected final ManagementServiceprotected final Stringprotected final PagingManagerprotected final Stringprotected TransactionThis will store the Transaction between xaEnd and xaPrepare or xaCommit.final PostOfficeprotected final booleanprotected RemotingConnectionprotected final RoutingContextprotected final ActiveMQServerprotected final ServerProducersprotected booleanprotected final StorageManagerprotected final booleanprotected final Map<SimpleString,ServerSessionImpl.TempQueueCleanerUpper> protected Transactionprotected final Stringprotected final Stringprotected boolean -
Constructor Summary
ConstructorsConstructorDescriptionServerSessionImpl(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, boolean isLegacyProducer) -
Method Summary
Modifier and TypeMethodDescriptionacknowledge(long consumerID, long messageID) voidaddCloseable(Closeable closeable) voidaddLingerConsumer(ServerConsumer consumer) voidaddMetaData(String key, String data) voidaddProducer(String name, String protocol, String address) booleanaddUniqueMetaData(String key, String data) checkAutoCreate(QueueConfiguration queueConfig) voidclose(boolean failed) voidclose(boolean failed, boolean force) voidcloseConsumer(long consumerID) voidcommit()voidconnectionFailed(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.createAddress(SimpleString address, EnumSet<RoutingType> routingTypes, boolean autoCreated) createAddress(SimpleString address, RoutingType routingType, boolean autoCreated) createAddress(AddressInfo addressInfo, boolean autoCreated) createConsumer(long consumerID, SimpleString queueName, SimpleString filterString, boolean browseOnly) createConsumer(long consumerID, SimpleString queueName, SimpleString filterString, boolean browseOnly, boolean supportLargeMessage, Integer credits) createConsumer(long consumerID, SimpleString queueName, SimpleString filterString, int priority, boolean browseOnly, boolean supportLargeMessage, Integer credits) createQueue(QueueConfiguration queueConfiguration) This 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 disconnectscreateQueue(SimpleString address, SimpleString name, RoutingType routingType, SimpleString filterString, boolean temporary, boolean durable) Deprecated.createQueue(SimpleString address, SimpleString name, RoutingType routingType, SimpleString filterString, boolean temporary, boolean durable, boolean autoCreated) Deprecated.createQueue(SimpleString address, SimpleString name, RoutingType routingType, SimpleString filterString, boolean temporary, boolean durable, int maxConsumers, boolean purgeOnNoConsumers, boolean autoCreated) Deprecated.createQueue(SimpleString address, SimpleString name, RoutingType routingType, SimpleString filterString, boolean temporary, boolean durable, int maxConsumers, boolean purgeOnNoConsumers, Boolean exclusive, Boolean lastValue, boolean autoCreated) Deprecated.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) Deprecated.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) Deprecated.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) Deprecated.createQueue(SimpleString address, SimpleString name, SimpleString filterString, boolean temporary, boolean durable) Deprecated.createQueue(AddressInfo addressInfo, SimpleString name, SimpleString filterString, boolean temporary, boolean durable) Deprecated.createQueue(AddressInfo addressInfo, SimpleString name, SimpleString filterString, boolean temporary, boolean durable, boolean autoCreated) Deprecated.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) Deprecated.createQueue(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) voiddeleteQueue(SimpleString queueToDelete, boolean enforceSecurity) voidAdd all the producers detail to the JSONArray object.voidprotected voiddoClose(boolean failed) doSend(Transaction tx, Message msg, SimpleString originalAddress, boolean direct, String senderName, boolean noAutoCreateQueue) doSend(Transaction tx, Message msg, SimpleString originalAddress, boolean direct, String senderName, boolean noAutoCreateQueue, RoutingContext routingContext) voidCertain protocols may create an internal session that shouldn't go through security checks.executeBindingQuery(SimpleString address) voidexpire(long consumerID, long messageID) voidforceConsumerDelivery(long consumerID, long sequence) getAddress(SimpleString address) getAddressAndRoutingType(AddressInfo addressInfo) Get the canonical (i.e. non-prefixed) address and the corresponding routing-type.getAddressAndRoutingTypes(SimpleString address, EnumSet<RoutingType> defaultRoutingTypes) Get the canonical (i.e. non-prefixed) address and the corresponding routing-type.intlongintgetDefaultConsumerWindowSize(SimpleString address) getInTXMessagesForConsumer(long consumerId) getMatchingQueue(SimpleString address, RoutingType routingType) getMatchingQueue(SimpleString address, SimpleString queueName, RoutingType routingType) getMetaData(String key) intgetName()getPrefix(SimpleString address) Get the prefix (if it exists) from the address based on the prefixes provided to the ServerSession constructor.intgetRoutingTypeFromPrefix(SimpleString address, RoutingType defaultRoutingType) voidindividualAcknowledge(long consumerID, long messageID) voidindividualCancel(long consumerID, long messageID, boolean failed) booleanisClosed()locateConsumer(long consumerID) voidvoidreceiveConsumerCredits(long consumerID, int credits) booleanremoveConsumer(long consumerID) removePrefix(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) send(Transaction tx, Message msg, boolean direct, String senderName, boolean noAutoCreateQueue) send(Transaction tx, Message messageParameter, boolean direct, String senderName, boolean noAutoCreateQueue, RoutingContext routingContext) voidsetTransferring(boolean transferring) voidstart()voidstop()toString()voidtransferConnection(RemotingConnection newConnection) voidvoidvoidvoidintvoidvoidvoidvoidxaRollback(Xid xid) voidxaSetTimeout(int timeout) voidvoid
-
Field Details
-
username
-
password
-
validatedUser
-
autoCommitSends
protected boolean autoCommitSends -
autoCommitAcks
protected boolean autoCommitAcks -
preAcknowledge
protected final boolean preAcknowledge -
strictUpdateDeliveryCount
protected final boolean strictUpdateDeliveryCount -
remotingConnection
-
consumers
-
serverProducers
-
tx
-
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
-
storageManager
-
postOffice
-
managementService
-
started
protected volatile boolean started -
tempQueueCleannerUppers
-
name
-
server
-
routingContext
-
callback
-
-
Constructor Details
-
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, boolean isLegacyProducer) throws Exception- Throws:
Exception
-
-
Method Details
-
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
- Specified by:
addCloseablein interfaceServerSession
-
getCloseables
-
getTempQueueCleanUppers
-
getSessionExecutor
- Specified by:
getSessionExecutorin interfaceServerSession
-
disableSecurity
public void disableSecurity()- Specified by:
disableSecurityin interfaceServerSession
-
isClosed
public boolean isClosed()- Specified by:
isClosedin interfaceServerSession
-
getSessionContext
- Specified by:
getSessionContextin interfaceServerSession
-
getUsername
- Specified by:
getUsernamein interfaceSecurityAuth
-
getPassword
- Specified by:
getPasswordin interfaceSecurityAuth
-
getMinLargeMessageSize
public int getMinLargeMessageSize()- Specified by:
getMinLargeMessageSizein interfaceServerSession
-
getName
- Specified by:
getNamein interfaceServerSession
-
getConnectionID
- Specified by:
getConnectionIDin interfaceServerSession
-
getServerConsumers
- Specified by:
getServerConsumersin interfaceServerSession
-
markTXFailed
- Specified by:
markTXFailedin interfaceServerSession
-
removeConsumer
- Specified by:
removeConsumerin interfaceServerSession- Throws:
Exception
-
doClose
- 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
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- 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
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
- Specified by:
createAddressin interfaceServerSession- Throws:
Exception
-
getRemotingConnection
- Specified by:
getRemotingConnectionin interfaceSecurityAuth- Specified by:
getRemotingConnectionin interfaceServerSession
-
transferConnection
- Specified by:
transferConnectionin interfaceServerSession
-
getSecurityDomain
- Specified by:
getSecurityDomainin interfaceSecurityAuth
-
deleteQueue
- Specified by:
deleteQueuein interfaceServerSession- Throws:
Exception
-
deleteQueue
- Specified by:
deleteQueuein interfaceServerSession- Throws:
Exception
-
executeQueueQuery
- Specified by:
executeQueueQueryin interfaceServerSession- Throws:
Exception
-
executeAddressQuery
- Specified by:
executeAddressQueryin interfaceServerSession- Throws:
Exception
-
executeBindingQuery
- Specified by:
executeBindingQueryin interfaceServerSession- Throws:
Exception
-
forceConsumerDelivery
- Specified by:
forceConsumerDeliveryin interfaceServerSession- Throws:
Exception
-
acknowledge
- Specified by:
acknowledgein interfaceServerSession- Throws:
Exception
-
locateConsumer
- Specified by:
locateConsumerin interfaceServerSession
-
individualAcknowledge
- Specified by:
individualAcknowledgein interfaceServerSession- Throws:
Exception
-
individualCancel
- Specified by:
individualCancelin interfaceServerSession- Throws:
Exception
-
expire
- Specified by:
expirein interfaceServerSession- Throws:
Exception
-
commit
- Specified by:
commitin interfaceServerSession- Throws:
Exception
-
rollback
- Specified by:
rollbackin interfaceServerSession- Throws:
Exception
-
newTransaction
- Specified by:
newTransactionin interfaceServerSession
-
xaCommit
- Specified by:
xaCommitin interfaceServerSession- Throws:
Exception
-
xaEnd
- Specified by:
xaEndin interfaceServerSession- Throws:
Exception
-
xaForget
- Specified by:
xaForgetin interfaceServerSession- Throws:
Exception
-
xaJoin
- Specified by:
xaJoinin interfaceServerSession- Throws:
Exception
-
xaResume
- Specified by:
xaResumein interfaceServerSession- Throws:
Exception
-
xaRollback
- Specified by:
xaRollbackin interfaceServerSession- Throws:
Exception
-
xaStart
- Specified by:
xaStartin interfaceServerSession- Throws:
Exception
-
xaFailed
- Specified by:
xaFailedin interfaceServerSession- Throws:
Exception
-
xaSuspend
- Specified by:
xaSuspendin interfaceServerSession- Throws:
Exception
-
xaPrepare
- Specified by:
xaPreparein interfaceServerSession- Throws:
Exception
-
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
-
close
public void close(boolean failed, boolean force) - Specified by:
closein interfaceServerSession
-
closeConsumer
- Specified by:
closeConsumerin interfaceServerSession- Throws:
Exception
-
receiveConsumerCredits
- Specified by:
receiveConsumerCreditsin interfaceServerSession- Throws:
Exception
-
getCurrentTransaction
- Specified by:
getCurrentTransactionin interfaceServerSession
-
checkAutoCreate
- Specified by:
checkAutoCreatein interfaceServerSession- Throws:
Exception
-
send
- Specified by:
sendin interfaceServerSession- Throws:
Exception
-
send
public RoutingStatus send(Message message, boolean direct, String senderName, boolean noAutoCreateQueue) throws Exception - Specified by:
sendin interfaceServerSession- Throws:
Exception
-
send
public RoutingStatus send(Transaction tx, Message msg, boolean direct, String senderName, boolean noAutoCreateQueue) throws Exception - Specified by:
sendin interfaceServerSession- Throws:
Exception
-
send
public RoutingStatus send(Transaction tx, Message messageParameter, boolean direct, String senderName, boolean noAutoCreateQueue, RoutingContext routingContext) throws Exception - Specified by:
sendin interfaceServerSession- Throws:
Exception
-
requestProducerCredits
- Specified by:
requestProducerCreditsin interfaceServerSession- Throws:
Exception
-
setTransferring
public void setTransferring(boolean transferring) - Specified by:
setTransferringin interfaceServerSession
-
addMetaData
- Specified by:
addMetaDatain interfaceServerSession- Throws:
Exception
-
addUniqueMetaData
- Specified by:
addUniqueMetaDatain interfaceServerSession- Throws:
Exception
-
getMetaData
- Specified by:
getMetaDatain interfaceServerSession
-
getMetaData
- Specified by:
getMetaDatain interfaceServerSession
-
getCreationTime
public long getCreationTime()- Specified by:
getCreationTimein interfaceServerSession
-
getStorageManager
-
describeProducersInfo
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
- 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
- Specified by:
getAddressin interfaceServerSession
-
toString
-
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
-
cloneProducers
-
doSend
public RoutingStatus doSend(Transaction tx, Message msg, SimpleString originalAddress, boolean direct, String senderName, boolean noAutoCreateQueue) throws Exception - Specified by:
doSendin interfaceServerSession- Throws:
Exception
-
doSend
public RoutingStatus doSend(Transaction tx, Message msg, SimpleString originalAddress, boolean direct, String senderName, boolean noAutoCreateQueue, RoutingContext routingContext) throws Exception - Specified by:
doSendin interfaceServerSession- Throws:
Exception
-
getInTXMessagesForConsumer
- Specified by:
getInTXMessagesForConsumerin interfaceServerSession
-
getInTxLingerMessages
- Specified by:
getInTxLingerMessagesin interfaceServerSession
-
addLingerConsumer
- Specified by:
addLingerConsumerin interfaceServerSession
-
removePrefix
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
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
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
- 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
- Specified by:
addProducerin interfaceServerSession
-
removeProducer
- Specified by:
removeProducerin interfaceServerSession
-
getServerProducers
- Specified by:
getServerProducersin interfaceServerSession
-
getDefaultAddress
- Specified by:
getDefaultAddressin interfaceServerSession
-
getConsumerCount
public int getConsumerCount()- Specified by:
getConsumerCountin interfaceServerSession
-
getProducerCount
public int getProducerCount()- Specified by:
getProducerCountin interfaceServerSession
-
getDefaultConsumerWindowSize
- Specified by:
getDefaultConsumerWindowSizein interfaceServerSession
-
toManagementString
- Specified by:
toManagementStringin interfaceServerSession
-