public class ServerSessionImpl extends Object implements ServerSession, FailureListener
Modifier and Type | Class and Description |
---|---|
static class |
ServerSessionImpl.TempQueueCleanerUpper |
Modifier and Type | Field and Description |
---|---|
protected boolean |
autoCommitAcks |
protected boolean |
autoCommitSends |
protected SessionCallback |
callback |
protected Map<Long,ServerConsumer> |
consumers |
protected ManagementService |
managementService |
protected String |
name |
protected PagingManager |
pagingManager |
protected String |
password |
PostOffice |
postOffice |
protected boolean |
preAcknowledge |
protected Map<String,ServerProducer> |
producers |
protected RemotingConnection |
remotingConnection |
protected RoutingContext |
routingContext |
protected ActiveMQServer |
server |
protected boolean |
started |
protected StorageManager |
storageManager |
protected boolean |
strictUpdateDeliveryCount |
protected Map<SimpleString,Pair<Object,AtomicLong>> |
targetAddressInfos |
protected Map<SimpleString,ServerSessionImpl.TempQueueCleanerUpper> |
tempQueueCleannerUppers |
protected Transaction |
tx |
protected String |
username |
protected String |
validatedUser |
protected boolean |
xa |
Constructor and 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) |
Modifier and Type | Method and Description |
---|---|
void |
acknowledge(long consumerID,
long messageID) |
void |
addCloseable(Closeable closeable) |
void |
addMetaData(String key,
String data) |
void |
addProducer(ServerProducer serverProducer) |
boolean |
addUniqueMetaData(String key,
String data) |
Map<SimpleString,Pair<Object,AtomicLong>> |
cloneTargetAddresses() |
void |
close(boolean failed) |
void |
closeConsumer(long consumerID) |
void |
commit() |
void |
connectionFailed(ActiveMQException me,
boolean failedOver)
Notifies that a connection has failed due to the specified exception.
|
void |
connectionFailed(ActiveMQException me,
boolean failedOver,
String scaleDownTargetNodeID)
Notifies that a connection has failed due to the specified exception.
|
AddressInfo |
createAddress(AddressInfo addressInfo,
boolean autoCreated) |
AddressInfo |
createAddress(SimpleString address,
EnumSet<RoutingType> routingTypes,
boolean autoCreated) |
AddressInfo |
createAddress(SimpleString address,
RoutingType routingType,
boolean autoCreated) |
ServerConsumer |
createConsumer(long consumerID,
SimpleString queueName,
SimpleString filterString,
boolean browseOnly) |
ServerConsumer |
createConsumer(long consumerID,
SimpleString queueName,
SimpleString filterString,
boolean browseOnly,
boolean supportLargeMessage,
Integer credits) |
ServerConsumer |
createConsumer(long consumerID,
SimpleString queueName,
SimpleString filterString,
int priority,
boolean browseOnly,
boolean supportLargeMessage,
Integer credits) |
Queue |
createQueue(AddressInfo addressInfo,
SimpleString name,
SimpleString filterString,
boolean temporary,
boolean durable) |
Queue |
createQueue(AddressInfo addressInfo,
SimpleString name,
SimpleString filterString,
boolean temporary,
boolean durable,
boolean autoCreated) |
Queue |
createQueue(AddressInfo addressInfo,
SimpleString name,
SimpleString filterString,
boolean temporary,
boolean durable,
Boolean exclusive,
Boolean lastValue,
boolean autoCreated) |
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) |
Queue |
createQueue(SimpleString address,
SimpleString name,
RoutingType routingType,
SimpleString filterString,
boolean temporary,
boolean durable) |
Queue |
createQueue(SimpleString address,
SimpleString name,
RoutingType routingType,
SimpleString filterString,
boolean temporary,
boolean durable,
boolean autoCreated) |
Queue |
createQueue(SimpleString address,
SimpleString name,
RoutingType routingType,
SimpleString filterString,
boolean temporary,
boolean durable,
int maxConsumers,
boolean purgeOnNoConsumers,
boolean autoCreated) |
Queue |
createQueue(SimpleString address,
SimpleString name,
RoutingType routingType,
SimpleString filterString,
boolean temporary,
boolean durable,
int maxConsumers,
boolean purgeOnNoConsumers,
Boolean exclusive,
Boolean lastValue,
boolean autoCreated) |
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) |
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) |
Queue |
createQueue(SimpleString address,
SimpleString name,
SimpleString filterString,
boolean temporary,
boolean durable)
Create queue with default delivery mode
|
void |
createSharedQueue(SimpleString address,
SimpleString name,
boolean durable,
SimpleString filterString) |
void |
createSharedQueue(SimpleString address,
SimpleString name,
RoutingType routingType,
boolean durable,
SimpleString filterString) |
void |
createSharedQueue(SimpleString address,
SimpleString name,
RoutingType routingType,
SimpleString filterString,
boolean durable,
Integer maxConsumers,
Boolean purgeOnNoConsumers,
Boolean exclusive,
Boolean lastValue) |
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) |
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) |
void |
deleteQueue(SimpleString queueToDelete) |
void |
describeProducersInfo(JsonArrayBuilder array)
Add all the producers detail to the JSONArray object.
|
void |
disableSecurity() |
protected void |
doClose(boolean failed) |
RoutingStatus |
doSend(Transaction tx,
Message msg,
SimpleString originalAddress,
boolean direct,
boolean noAutoCreateQueue) |
RoutingStatus |
doSend(Transaction tx,
Message msg,
SimpleString originalAddress,
boolean direct,
boolean noAutoCreateQueue,
RoutingContext routingContext) |
void |
enableSecurity()
Certain protocols may create an internal session that shouldn't go through security checks.
|
AddressQueryResult |
executeAddressQuery(SimpleString name) |
BindingQueryResult |
executeBindingQuery(SimpleString address) |
QueueQueryResult |
executeQueueQuery(SimpleString name) |
void |
expire(long consumerID,
long messageID) |
void |
forceConsumerDelivery(long consumerID,
long sequence) |
AddressInfo |
getAddress(SimpleString address) |
AddressInfo |
getAddressAndRoutingType(AddressInfo addressInfo)
Get the canonical (i.e.
|
Pair<SimpleString,EnumSet<RoutingType>> |
getAddressAndRoutingTypes(SimpleString address,
EnumSet<RoutingType> defaultRoutingTypes)
Get the canonical (i.e.
|
Object |
getConnectionID() |
int |
getConsumerCount() |
long |
getCreationTime() |
Transaction |
getCurrentTransaction() |
String |
getDefaultAddress() |
int |
getDefaultConsumerWindowSize(SimpleString address) |
List<MessageReference> |
getInTXMessagesForConsumer(long consumerId) |
String |
getLastSentMessageID(String address) |
SimpleString |
getMatchingQueue(SimpleString address,
RoutingType routingType) |
SimpleString |
getMatchingQueue(SimpleString address,
SimpleString queueName,
RoutingType routingType) |
Map<String,String> |
getMetaData() |
String |
getMetaData(String key) |
int |
getMinLargeMessageSize() |
String |
getName() |
String |
getPassword() |
SimpleString |
getPrefix(SimpleString address)
Get the prefix (if it exists) from the address based on the prefixes provided to the ServerSession constructor.
|
int |
getProducerCount() |
RemotingConnection |
getRemotingConnection() |
Set<ServerConsumer> |
getServerConsumers() |
Map<String,ServerProducer> |
getServerProducers() |
OperationContext |
getSessionContext() |
Executor |
getSessionExecutor() |
StorageManager |
getStorageManager() |
String[] |
getTargetAddresses() |
Map<SimpleString,ServerSessionImpl.TempQueueCleanerUpper> |
getTempQueueCleanUppers() |
String |
getUsername() |
String |
getValidatedUser() |
void |
individualAcknowledge(long consumerID,
long messageID) |
void |
individualCancel(long consumerID,
long messageID,
boolean failed) |
boolean |
isClosed() |
ServerConsumer |
locateConsumer(long consumerID) |
void |
markTXFailed(Throwable e) |
Transaction |
newTransaction() |
void |
receiveConsumerCredits(long consumerID,
int credits) |
boolean |
removeConsumer(long consumerID) |
SimpleString |
removePrefix(SimpleString address)
Strip the prefix (if it exists) from the address based on the prefixes provided to the ServerSession constructor.
|
void |
removeProducer(String ID) |
void |
requestProducerCredits(SimpleString address,
int credits) |
void |
resetTX(Transaction transaction)
Some protocols may chose to hold their transactions outside of the ServerSession.
|
void |
rollback(boolean considerLastMessageAsDelivered) |
RoutingStatus |
send(Message message,
boolean direct) |
RoutingStatus |
send(Message message,
boolean direct,
boolean noAutoCreateQueue) |
RoutingStatus |
send(Transaction tx,
Message msg,
boolean direct,
boolean noAutoCreateQueue) |
RoutingStatus |
send(Transaction tx,
Message messageParameter,
boolean direct,
boolean noAutoCreateQueue,
RoutingContext routingContext) |
void |
setTransferring(boolean transferring) |
void |
start() |
void |
stop() |
String |
toString() |
void |
xaCommit(Xid xid,
boolean onePhase) |
void |
xaEnd(Xid xid) |
void |
xaFailed(Xid xid) |
void |
xaForget(Xid xid) |
List<Xid> |
xaGetInDoubtXids() |
int |
xaGetTimeout() |
void |
xaJoin(Xid xid) |
void |
xaPrepare(Xid xid) |
void |
xaResume(Xid xid) |
void |
xaRollback(Xid xid) |
void |
xaSetTimeout(int timeout) |
void |
xaStart(Xid xid) |
void |
xaSuspend() |
protected final String username
protected final String password
protected final String validatedUser
protected boolean autoCommitSends
protected boolean autoCommitAcks
protected final boolean preAcknowledge
protected final boolean strictUpdateDeliveryCount
protected final RemotingConnection remotingConnection
protected final Map<Long,ServerConsumer> consumers
protected final Map<String,ServerProducer> producers
protected Transaction tx
protected boolean xa
protected final PagingManager pagingManager
protected final StorageManager storageManager
public final PostOffice postOffice
protected final ManagementService managementService
protected volatile boolean started
protected final Map<SimpleString,ServerSessionImpl.TempQueueCleanerUpper> tempQueueCleannerUppers
protected final String name
protected final ActiveMQServer server
protected final RoutingContext routingContext
protected final SessionCallback callback
protected final Map<SimpleString,Pair<Object,AtomicLong>> targetAddressInfos
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) throws Exception
Exception
public void enableSecurity()
ServerSession
enableSecurity
in interface ServerSession
public void addCloseable(Closeable closeable)
addCloseable
in interface ServerSession
public Map<SimpleString,ServerSessionImpl.TempQueueCleanerUpper> getTempQueueCleanUppers()
public Executor getSessionExecutor()
getSessionExecutor
in interface ServerSession
public void disableSecurity()
disableSecurity
in interface ServerSession
public boolean isClosed()
isClosed
in interface ServerSession
public OperationContext getSessionContext()
getSessionContext
in interface ServerSession
public String getUsername()
getUsername
in interface SecurityAuth
public String getPassword()
getPassword
in interface SecurityAuth
public int getMinLargeMessageSize()
getMinLargeMessageSize
in interface ServerSession
public String getName()
getName
in interface ServerSession
public Object getConnectionID()
getConnectionID
in interface ServerSession
public Set<ServerConsumer> getServerConsumers()
getServerConsumers
in interface ServerSession
public void markTXFailed(Throwable e)
markTXFailed
in interface ServerSession
public boolean removeConsumer(long consumerID) throws Exception
removeConsumer
in interface ServerSession
Exception
public ServerConsumer createConsumer(long consumerID, SimpleString queueName, SimpleString filterString, boolean browseOnly) throws Exception
createConsumer
in interface ServerSession
Exception
public ServerConsumer createConsumer(long consumerID, SimpleString queueName, SimpleString filterString, boolean browseOnly, boolean supportLargeMessage, Integer credits) throws Exception
createConsumer
in interface ServerSession
Exception
public ServerConsumer createConsumer(long consumerID, SimpleString queueName, SimpleString filterString, int priority, boolean browseOnly, boolean supportLargeMessage, Integer credits) throws Exception
createConsumer
in interface ServerSession
Exception
public void resetTX(Transaction transaction)
resetTX
in interface ServerSession
public Queue createQueue(SimpleString address, SimpleString name, SimpleString filterString, boolean temporary, boolean durable) throws Exception
ServerSession
createQueue
in interface ServerSession
Exception
public Queue createQueue(SimpleString address, SimpleString name, RoutingType routingType, SimpleString filterString, boolean temporary, boolean durable) throws Exception
createQueue
in interface ServerSession
Exception
public Queue createQueue(AddressInfo addressInfo, SimpleString name, SimpleString filterString, boolean temporary, boolean durable) throws Exception
createQueue
in interface ServerSession
Exception
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) throws Exception
Exception
public Queue createQueue(SimpleString address, SimpleString name, RoutingType routingType, SimpleString filterString, boolean temporary, boolean durable, int maxConsumers, boolean purgeOnNoConsumers, boolean autoCreated) throws Exception
createQueue
in interface ServerSession
Exception
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
createQueue
in interface ServerSession
Exception
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
createQueue
in interface ServerSession
Exception
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
createQueue
in interface ServerSession
Exception
public Queue createQueue(SimpleString address, SimpleString name, RoutingType routingType, SimpleString filterString, boolean temporary, boolean durable, boolean autoCreated) throws Exception
createQueue
in interface ServerSession
Exception
public Queue createQueue(AddressInfo addressInfo, SimpleString name, SimpleString filterString, boolean temporary, boolean durable, boolean autoCreated) throws Exception
createQueue
in interface ServerSession
Exception
public Queue createQueue(AddressInfo addressInfo, SimpleString name, SimpleString filterString, boolean temporary, boolean durable, Boolean exclusive, Boolean lastValue, boolean autoCreated) throws Exception
createQueue
in interface ServerSession
Exception
public AddressInfo createAddress(SimpleString address, EnumSet<RoutingType> routingTypes, boolean autoCreated) throws Exception
createAddress
in interface ServerSession
Exception
public AddressInfo createAddress(SimpleString address, RoutingType routingType, boolean autoCreated) throws Exception
createAddress
in interface ServerSession
Exception
public AddressInfo createAddress(AddressInfo addressInfo, boolean autoCreated) throws Exception
createAddress
in interface ServerSession
Exception
public void createSharedQueue(SimpleString address, SimpleString name, RoutingType routingType, SimpleString filterString, boolean durable, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, Boolean lastValue) throws Exception
createSharedQueue
in interface ServerSession
Exception
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
createSharedQueue
in interface ServerSession
Exception
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
createSharedQueue
in interface ServerSession
Exception
public void createSharedQueue(SimpleString address, SimpleString name, RoutingType routingType, boolean durable, SimpleString filterString) throws Exception
createSharedQueue
in interface ServerSession
Exception
public void createSharedQueue(SimpleString address, SimpleString name, boolean durable, SimpleString filterString) throws Exception
createSharedQueue
in interface ServerSession
Exception
public RemotingConnection getRemotingConnection()
getRemotingConnection
in interface SecurityAuth
getRemotingConnection
in interface ServerSession
public void deleteQueue(SimpleString queueToDelete) throws Exception
deleteQueue
in interface ServerSession
Exception
public QueueQueryResult executeQueueQuery(SimpleString name) throws Exception
executeQueueQuery
in interface ServerSession
Exception
public AddressQueryResult executeAddressQuery(SimpleString name) throws Exception
executeAddressQuery
in interface ServerSession
Exception
public BindingQueryResult executeBindingQuery(SimpleString address) throws Exception
executeBindingQuery
in interface ServerSession
Exception
public void forceConsumerDelivery(long consumerID, long sequence) throws Exception
forceConsumerDelivery
in interface ServerSession
Exception
public void acknowledge(long consumerID, long messageID) throws Exception
acknowledge
in interface ServerSession
Exception
public ServerConsumer locateConsumer(long consumerID)
locateConsumer
in interface ServerSession
public void individualAcknowledge(long consumerID, long messageID) throws Exception
individualAcknowledge
in interface ServerSession
Exception
public void individualCancel(long consumerID, long messageID, boolean failed) throws Exception
individualCancel
in interface ServerSession
Exception
public void expire(long consumerID, long messageID) throws Exception
expire
in interface ServerSession
Exception
public void commit() throws Exception
commit
in interface ServerSession
Exception
public void rollback(boolean considerLastMessageAsDelivered) throws Exception
rollback
in interface ServerSession
Exception
public Transaction newTransaction()
newTransaction
in interface ServerSession
public void xaCommit(Xid xid, boolean onePhase) throws Exception
xaCommit
in interface ServerSession
Exception
public void xaEnd(Xid xid) throws Exception
xaEnd
in interface ServerSession
Exception
public void xaForget(Xid xid) throws Exception
xaForget
in interface ServerSession
Exception
public void xaJoin(Xid xid) throws Exception
xaJoin
in interface ServerSession
Exception
public void xaResume(Xid xid) throws Exception
xaResume
in interface ServerSession
Exception
public void xaRollback(Xid xid) throws Exception
xaRollback
in interface ServerSession
Exception
public void xaStart(Xid xid) throws Exception
xaStart
in interface ServerSession
Exception
public void xaFailed(Xid xid) throws Exception
xaFailed
in interface ServerSession
Exception
public void xaSuspend() throws Exception
xaSuspend
in interface ServerSession
Exception
public void xaPrepare(Xid xid) throws Exception
xaPrepare
in interface ServerSession
Exception
public List<Xid> xaGetInDoubtXids()
xaGetInDoubtXids
in interface ServerSession
public int xaGetTimeout()
xaGetTimeout
in interface ServerSession
public void xaSetTimeout(int timeout)
xaSetTimeout
in interface ServerSession
public void start()
start
in interface ServerSession
public void stop()
stop
in interface ServerSession
public void close(boolean failed)
close
in interface ServerSession
public void closeConsumer(long consumerID) throws Exception
closeConsumer
in interface ServerSession
Exception
public void receiveConsumerCredits(long consumerID, int credits) throws Exception
receiveConsumerCredits
in interface ServerSession
Exception
public Transaction getCurrentTransaction()
getCurrentTransaction
in interface ServerSession
public RoutingStatus send(Message message, boolean direct) throws Exception
send
in interface ServerSession
Exception
public RoutingStatus send(Message message, boolean direct, boolean noAutoCreateQueue) throws Exception
send
in interface ServerSession
Exception
public RoutingStatus send(Transaction tx, Message msg, boolean direct, boolean noAutoCreateQueue) throws Exception
send
in interface ServerSession
Exception
public RoutingStatus send(Transaction tx, Message messageParameter, boolean direct, boolean noAutoCreateQueue, RoutingContext routingContext) throws Exception
send
in interface ServerSession
Exception
public void requestProducerCredits(SimpleString address, int credits) throws Exception
requestProducerCredits
in interface ServerSession
Exception
public void setTransferring(boolean transferring)
setTransferring
in interface ServerSession
public void addMetaData(String key, String data) throws Exception
addMetaData
in interface ServerSession
Exception
public boolean addUniqueMetaData(String key, String data) throws Exception
addUniqueMetaData
in interface ServerSession
Exception
public String getMetaData(String key)
getMetaData
in interface ServerSession
public Map<String,String> getMetaData()
getMetaData
in interface ServerSession
public String[] getTargetAddresses()
getTargetAddresses
in interface ServerSession
public String getLastSentMessageID(String address)
getLastSentMessageID
in interface ServerSession
public long getCreationTime()
getCreationTime
in interface ServerSession
public StorageManager getStorageManager()
public void describeProducersInfo(JsonArrayBuilder array) throws Exception
ServerSession
describeProducersInfo
in interface ServerSession
Exception
public String getValidatedUser()
getValidatedUser
in interface ServerSession
public SimpleString getMatchingQueue(SimpleString address, RoutingType routingType) throws Exception
getMatchingQueue
in interface ServerSession
Exception
public SimpleString getMatchingQueue(SimpleString address, SimpleString queueName, RoutingType routingType) throws Exception
getMatchingQueue
in interface ServerSession
Exception
public AddressInfo getAddress(SimpleString address)
getAddress
in interface ServerSession
public void connectionFailed(ActiveMQException me, boolean failedOver)
FailureListener
connectionFailed
in interface FailureListener
me
- exception which has caused the connection to failpublic void connectionFailed(ActiveMQException me, boolean failedOver, String scaleDownTargetNodeID)
FailureListener
connectionFailed
in interface FailureListener
me
- exception which has caused the connection to failscaleDownTargetNodeID
- the ID of the node to which messages are scaling downpublic Map<SimpleString,Pair<Object,AtomicLong>> cloneTargetAddresses()
public RoutingStatus doSend(Transaction tx, Message msg, SimpleString originalAddress, boolean direct, boolean noAutoCreateQueue) throws Exception
doSend
in interface ServerSession
Exception
public RoutingStatus doSend(Transaction tx, Message msg, SimpleString originalAddress, boolean direct, boolean noAutoCreateQueue, RoutingContext routingContext) throws Exception
doSend
in interface ServerSession
Exception
public List<MessageReference> getInTXMessagesForConsumer(long consumerId)
getInTXMessagesForConsumer
in interface ServerSession
public SimpleString removePrefix(SimpleString address)
ServerSession
removePrefix
in interface ServerSession
address
- the address to inspectpublic SimpleString getPrefix(SimpleString address)
ServerSession
getPrefix
in interface ServerSession
address
- the address to inspectpublic AddressInfo getAddressAndRoutingType(AddressInfo addressInfo)
ServerSession
getAddressAndRoutingType
in interface ServerSession
addressInfo
- the address to inspectorg.apache.activemq.artemis.api.core.Pair
representing the canonical (i.e. non-prefixed) address
name and the org.apache.activemq.artemis.api.core.RoutingType
corresponding to the that prefix.public Pair<SimpleString,EnumSet<RoutingType>> getAddressAndRoutingTypes(SimpleString address, EnumSet<RoutingType> defaultRoutingTypes)
ServerSession
getAddressAndRoutingTypes
in interface ServerSession
address
- the address to inspectdefaultRoutingTypes
- a the java.util.Set
of org.apache.activemq.artemis.api.core.RoutingType
objects to return if no prefix match is found.org.apache.activemq.artemis.api.core.Pair
representing the canonical (i.e. non-prefixed) address
name and the java.util.Set
of org.apache.activemq.artemis.api.core.RoutingType
objects
corresponding to the that prefix.public void addProducer(ServerProducer serverProducer)
addProducer
in interface ServerSession
public void removeProducer(String ID)
removeProducer
in interface ServerSession
public Map<String,ServerProducer> getServerProducers()
getServerProducers
in interface ServerSession
public String getDefaultAddress()
getDefaultAddress
in interface ServerSession
public int getConsumerCount()
getConsumerCount
in interface ServerSession
public int getProducerCount()
getProducerCount
in interface ServerSession
public int getDefaultConsumerWindowSize(SimpleString address)
getDefaultConsumerWindowSize
in interface ServerSession
Copyright © 2019 JBoss by Red Hat. All rights reserved.