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 RemotingConnection |
remotingConnection |
protected RoutingContext |
routingContext |
protected ActiveMQServer |
server |
protected boolean |
started |
protected StorageManager |
storageManager |
protected boolean |
strictUpdateDeliveryCount |
protected Map<SimpleString,Pair<UUID,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,
QueueCreator queueCreator,
PagingManager pagingManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
acknowledge(long consumerID,
long messageID) |
void |
addMetaData(String key,
String data) |
boolean |
addUniqueMetaData(String key,
String data) |
void |
clearLargeMessage() |
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.
|
ServerConsumer |
createConsumer(long consumerID,
SimpleString queueName,
SimpleString filterString,
boolean browseOnly) |
ServerConsumer |
createConsumer(long consumerID,
SimpleString queueName,
SimpleString filterString,
boolean browseOnly,
boolean supportLargeMessage,
Integer credits) |
Queue |
createQueue(SimpleString address,
SimpleString name,
SimpleString filterString,
boolean temporary,
boolean durable) |
void |
createSharedQueue(SimpleString address,
SimpleString name,
boolean durable,
SimpleString filterString) |
void |
deleteQueue(SimpleString queueToDelete) |
void |
describeProducersInfo(javax.json.JsonArrayBuilder array)
Add all the producers detail to the JSONArray object.
|
void |
disableSecurity() |
protected void |
doClose(boolean failed) |
RoutingStatus |
doSend(Transaction tx,
ServerMessage msg,
boolean direct,
boolean noAutoCreateQueue) |
void |
enableSecurity()
Certain protocols may create an internal session that shouldn't go through security checks.
|
BindingQueryResult |
executeBindingQuery(SimpleString address) |
QueueQueryResult |
executeQueueQuery(SimpleString name) |
void |
expire(long consumerID,
long messageID) |
void |
forceConsumerDelivery(long consumerID,
long sequence) |
Object |
getConnectionID() |
long |
getCreationTime() |
Transaction |
getCurrentTransaction() |
List<MessageReference> |
getInTXMessagesForConsumer(long consumerId) |
String |
getLastSentMessageID(String address) |
String |
getMetaData(String key) |
int |
getMinLargeMessageSize() |
String |
getName() |
String |
getPassword() |
QueueCreator |
getQueueCreator() |
RemotingConnection |
getRemotingConnection() |
Set<ServerConsumer> |
getServerConsumers() |
OperationContext |
getSessionContext() |
StorageManager |
getStorageManager() |
String[] |
getTargetAddresses() |
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) |
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) |
protected void |
securityCheck(SimpleString address,
CheckType checkType,
SecurityAuth auth) |
RoutingStatus |
send(ServerMessage message,
boolean direct) |
RoutingStatus |
send(ServerMessage message,
boolean direct,
boolean noAutoCreateQueue) |
RoutingStatus |
send(Transaction tx,
ServerMessage message,
boolean direct,
boolean noAutoCreateQueue) |
void |
sendContinuations(int packetSize,
long messageBodySize,
byte[] body,
boolean continues) |
void |
sendLarge(MessageInternal message) |
void |
setTransferring(boolean transferring) |
void |
start() |
void |
stop() |
String |
toString() |
void |
waitContextCompletion() |
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 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<UUID,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, QueueCreator queueCreator, PagingManager pagingManager) throws Exception
Exceptionpublic void enableSecurity()
ServerSessionenableSecurity in interface ServerSessionpublic void disableSecurity()
disableSecurity in interface ServerSessionpublic boolean isClosed()
isClosed in interface ServerSessionpublic OperationContext getSessionContext()
getSessionContext in interface ServerSessionpublic String getUsername()
getUsername in interface SecurityAuthpublic String getPassword()
getPassword in interface SecurityAuthpublic int getMinLargeMessageSize()
getMinLargeMessageSize in interface ServerSessionpublic String getName()
getName in interface ServerSessionpublic Object getConnectionID()
getConnectionID in interface ServerSessionpublic Set<ServerConsumer> getServerConsumers()
getServerConsumers in interface ServerSessionpublic void markTXFailed(Throwable e)
markTXFailed in interface ServerSessionpublic boolean removeConsumer(long consumerID)
throws Exception
removeConsumer in interface ServerSessionExceptionpublic QueueCreator getQueueCreator()
getQueueCreator in interface ServerSessionprotected void securityCheck(SimpleString address, CheckType checkType, SecurityAuth auth) throws Exception
Exceptionpublic ServerConsumer createConsumer(long consumerID, SimpleString queueName, SimpleString filterString, boolean browseOnly) throws Exception
createConsumer in interface ServerSessionExceptionpublic ServerConsumer createConsumer(long consumerID, SimpleString queueName, SimpleString filterString, boolean browseOnly, boolean supportLargeMessage, Integer credits) throws Exception
createConsumer in interface ServerSessionExceptionpublic void resetTX(Transaction transaction)
resetTX in interface ServerSessionpublic Queue createQueue(SimpleString address, SimpleString name, SimpleString filterString, boolean temporary, boolean durable) throws Exception
createQueue in interface ServerSessionExceptionpublic void createSharedQueue(SimpleString address, SimpleString name, boolean durable, SimpleString filterString) throws Exception
createSharedQueue in interface ServerSessionExceptionpublic RemotingConnection getRemotingConnection()
getRemotingConnection in interface SecurityAuthgetRemotingConnection in interface ServerSessionpublic void deleteQueue(SimpleString queueToDelete) throws Exception
deleteQueue in interface ServerSessionExceptionpublic QueueQueryResult executeQueueQuery(SimpleString name) throws Exception
executeQueueQuery in interface ServerSessionExceptionpublic BindingQueryResult executeBindingQuery(SimpleString address) throws Exception
executeBindingQuery in interface ServerSessionExceptionpublic void forceConsumerDelivery(long consumerID,
long sequence)
throws Exception
forceConsumerDelivery in interface ServerSessionExceptionpublic void acknowledge(long consumerID,
long messageID)
throws Exception
acknowledge in interface ServerSessionExceptionpublic ServerConsumer locateConsumer(long consumerID)
locateConsumer in interface ServerSessionpublic void individualAcknowledge(long consumerID,
long messageID)
throws Exception
individualAcknowledge in interface ServerSessionExceptionpublic void individualCancel(long consumerID,
long messageID,
boolean failed)
throws Exception
individualCancel in interface ServerSessionExceptionpublic void expire(long consumerID,
long messageID)
throws Exception
expire in interface ServerSessionExceptionpublic void commit()
throws Exception
commit in interface ServerSessionExceptionpublic void rollback(boolean considerLastMessageAsDelivered)
throws Exception
rollback in interface ServerSessionExceptionpublic Transaction newTransaction()
newTransaction in interface ServerSessionpublic void xaCommit(Xid xid, boolean onePhase) throws Exception
xaCommit in interface ServerSessionExceptionpublic void xaEnd(Xid xid) throws Exception
xaEnd in interface ServerSessionExceptionpublic void xaForget(Xid xid) throws Exception
xaForget in interface ServerSessionExceptionpublic void xaJoin(Xid xid) throws Exception
xaJoin in interface ServerSessionExceptionpublic void xaResume(Xid xid) throws Exception
xaResume in interface ServerSessionExceptionpublic void xaRollback(Xid xid) throws Exception
xaRollback in interface ServerSessionExceptionpublic void xaStart(Xid xid) throws Exception
xaStart in interface ServerSessionExceptionpublic void xaFailed(Xid xid) throws Exception
xaFailed in interface ServerSessionExceptionpublic void xaSuspend()
throws Exception
xaSuspend in interface ServerSessionExceptionpublic void xaPrepare(Xid xid) throws Exception
xaPrepare in interface ServerSessionExceptionpublic List<Xid> xaGetInDoubtXids()
xaGetInDoubtXids in interface ServerSessionpublic int xaGetTimeout()
xaGetTimeout in interface ServerSessionpublic void xaSetTimeout(int timeout)
xaSetTimeout in interface ServerSessionpublic void start()
start in interface ServerSessionpublic void stop()
stop in interface ServerSessionpublic void waitContextCompletion()
waitContextCompletion in interface ServerSessionpublic void close(boolean failed)
close in interface ServerSessionpublic void closeConsumer(long consumerID)
throws Exception
closeConsumer in interface ServerSessionExceptionpublic void receiveConsumerCredits(long consumerID,
int credits)
throws Exception
receiveConsumerCredits in interface ServerSessionExceptionpublic Transaction getCurrentTransaction()
getCurrentTransaction in interface ServerSessionpublic void sendLarge(MessageInternal message) throws Exception
sendLarge in interface ServerSessionExceptionpublic RoutingStatus send(ServerMessage message, boolean direct) throws Exception
send in interface ServerSessionExceptionpublic RoutingStatus send(ServerMessage message, boolean direct, boolean noAutoCreateQueue) throws Exception
send in interface ServerSessionExceptionpublic RoutingStatus send(Transaction tx, ServerMessage message, boolean direct, boolean noAutoCreateQueue) throws Exception
send in interface ServerSessionExceptionpublic void sendContinuations(int packetSize,
long messageBodySize,
byte[] body,
boolean continues)
throws Exception
sendContinuations in interface ServerSessionExceptionpublic void requestProducerCredits(SimpleString address, int credits) throws Exception
requestProducerCredits in interface ServerSessionExceptionpublic void setTransferring(boolean transferring)
setTransferring in interface ServerSessionpublic void addMetaData(String key, String data)
addMetaData in interface ServerSessionpublic boolean addUniqueMetaData(String key, String data)
addUniqueMetaData in interface ServerSessionpublic String getMetaData(String key)
getMetaData in interface ServerSessionpublic String[] getTargetAddresses()
getTargetAddresses in interface ServerSessionpublic String getLastSentMessageID(String address)
getLastSentMessageID in interface ServerSessionpublic long getCreationTime()
getCreationTime in interface ServerSessionpublic StorageManager getStorageManager()
public void describeProducersInfo(javax.json.JsonArrayBuilder array)
throws Exception
ServerSessiondescribeProducersInfo in interface ServerSessionExceptionpublic String getValidatedUser()
getValidatedUser in interface ServerSessionpublic void connectionFailed(ActiveMQException me, boolean failedOver)
FailureListenerconnectionFailed in interface FailureListenerme - exception which has caused the connection to failpublic void connectionFailed(ActiveMQException me, boolean failedOver, String scaleDownTargetNodeID)
FailureListenerconnectionFailed in interface FailureListenerme - exception which has caused the connection to failscaleDownTargetNodeID - the ID of the node to which messages are scaling downpublic void clearLargeMessage()
public RoutingStatus doSend(Transaction tx, ServerMessage msg, boolean direct, boolean noAutoCreateQueue) throws Exception
Exceptionpublic List<MessageReference> getInTXMessagesForConsumer(long consumerId)
getInTXMessagesForConsumer in interface ServerSessionCopyright © 2018 JBoss by Red Hat. All rights reserved.