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 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 boolean |
xa |
Constructor and Description |
---|
ServerSessionImpl(String name,
String username,
String password,
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) |
ServerSessionImpl(String name,
String username,
String password,
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,
TransactionFactory transactionFactory,
QueueCreator queueCreator) |
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(JSONArray array)
Add all the producers detail to the JSONArray object.
|
protected void |
doClose(boolean failed) |
protected void |
doSend(ServerMessage msg,
boolean direct) |
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() |
void |
individualAcknowledge(long consumerID,
long messageID) |
void |
individualCancel(long consumerID,
long messageID,
boolean failed) |
void |
markTXFailed(Throwable e) |
protected ServerConsumer |
newConsumer(long consumerID,
ServerSessionImpl serverSessionImpl,
QueueBinding binding,
Filter filter,
boolean started2,
boolean browseOnly,
StorageManager storageManager2,
SessionCallback callback2,
boolean preAcknowledge2,
boolean strictUpdateDeliveryCount2,
ManagementService managementService2,
boolean supportLargeMessage,
Integer credits) |
protected Transaction |
newTransaction() |
void |
promptDelivery(long consumerID) |
void |
receiveConsumerCredits(long consumerID,
int credits) |
boolean |
removeConsumer(long consumerID) |
void |
requestProducerCredits(SimpleString address,
int credits) |
void |
rollback(boolean considerLastMessageAsDelivered) |
void |
send(ServerMessage message,
boolean direct) |
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 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 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, 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) throws Exception
Exception
public ServerSessionImpl(String name, String username, String password, 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, TransactionFactory transactionFactory, QueueCreator queueCreator) throws Exception
Exception
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 QueueCreator getQueueCreator()
getQueueCreator
in interface ServerSession
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
Exception
protected ServerConsumer newConsumer(long consumerID, ServerSessionImpl serverSessionImpl, QueueBinding binding, Filter filter, boolean started2, boolean browseOnly, StorageManager storageManager2, SessionCallback callback2, boolean preAcknowledge2, boolean strictUpdateDeliveryCount2, ManagementService managementService2, boolean supportLargeMessage, Integer credits) throws Exception
Exception
public Queue createQueue(SimpleString address, SimpleString name, SimpleString filterString, boolean temporary, boolean durable) throws Exception
createQueue
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 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 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 promptDelivery(long consumerID)
public void acknowledge(long consumerID, long messageID) throws Exception
acknowledge
in interface ServerSession
Exception
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
protected Transaction newTransaction()
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 waitContextCompletion()
waitContextCompletion
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 void sendLarge(MessageInternal message) throws Exception
sendLarge
in interface ServerSession
Exception
public void send(ServerMessage message, boolean direct) throws Exception
send
in interface ServerSession
Exception
public void sendContinuations(int packetSize, long messageBodySize, byte[] body, boolean continues) throws Exception
sendContinuations
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)
addMetaData
in interface ServerSession
public boolean addUniqueMetaData(String key, String data)
addUniqueMetaData
in interface ServerSession
public String getMetaData(String key)
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(JSONArray array) throws Exception
ServerSession
describeProducersInfo
in interface ServerSession
Exception
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 void clearLargeMessage()
protected void doSend(ServerMessage msg, boolean direct) throws Exception
Exception
public List<MessageReference> getInTXMessagesForConsumer(long consumerId)
getInTXMessagesForConsumer
in interface ServerSession
Copyright © 2016 JBoss by Red Hat. All rights reserved.