public final class ClientSessionImpl extends Object implements ClientSessionInternal, FailureListener
ClientSession.AddressQuery, ClientSession.QueueQueryJMS_SESSION_CLIENT_ID_PROPERTY, JMS_SESSION_IDENTIFIER_PROPERTYTMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY| Modifier and Type | Method and Description |
|---|---|
void |
acknowledge(ClientConsumer consumer,
Message message)
Acknowledges all messages received by the consumer so far.
|
void |
addConsumer(ClientConsumerInternal consumer) |
void |
addFailoverListener(FailoverEventListener listener)
Adds a FailoverEventListener to the session which is notified if a failover event occurs on the session.
|
void |
addFailureListener(SessionFailureListener listener)
Adds a FailureListener to the session which is notified if a failure occurs on the session.
|
void |
addMetaData(String key,
String data)
Attach any metadata to the session.
|
void |
addProducer(ClientProducerInternal producer) |
ClientSession.AddressQuery |
addressQuery(SimpleString address)
Queries information on a binding.
|
void |
addUniqueMetaData(String key,
String data)
Attach any metadata to the session.
|
void |
cleanUp(boolean failingOver) |
Set<ClientConsumerInternal> |
cloneConsumers()
Not part of the interface, used on tests only
|
Set<ClientProducerInternal> |
cloneProducers()
Not part of the interface, used on tests only
|
void |
close()
Closes the session.
|
void |
commit()
Commits the current transaction.
|
void |
commit(Xid xid,
boolean onePhase) |
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.
|
static Object |
convert(Xid xid)
If you ever tried to debug XIDs you will know what this is about.
|
ClientConsumer |
createConsumer(SimpleString queueName)
Creates a ClientConsumer to consume message from the queue with the given name.
|
ClientConsumer |
createConsumer(SimpleString queueName,
boolean browseOnly)
Creates a ClientConsumer to consume or browse messages from the queue with the given name.
|
ClientConsumer |
createConsumer(SimpleString queueName,
SimpleString filterString)
Creates a ClientConsumer to consume messages matching the filter from the queue with the given name.
|
ClientConsumer |
createConsumer(SimpleString queueName,
SimpleString filterString,
boolean browseOnly)
Creates a ClientConsumer to consume or browse messages matching the filter from the queue with
the given name.
|
ClientConsumer |
createConsumer(SimpleString queueName,
SimpleString filterString,
int windowSize,
int maxRate,
boolean browseOnly)
Note, we DO NOT currently support direct consumers (i.e.
|
ClientConsumer |
createConsumer(String queueName)
Creates a ClientConsumer to consume messages from the queue with the given name.
|
ClientConsumer |
createConsumer(String queueName,
boolean browseOnly)
Creates a ClientConsumer to consume or browse messages from the queue with the given name.
|
ClientConsumer |
createConsumer(String queueName,
String filterString)
Creates a ClientConsumer to consume messages matching the filter from the queue with the given name.
|
ClientConsumer |
createConsumer(String queueName,
String filterString,
boolean browseOnly)
Creates a ClientConsumer to consume or browse messages matching the filter from the queue with
the given name.
|
ClientConsumer |
createConsumer(String queueName,
String filterString,
int windowSize,
int maxRate,
boolean browseOnly)
Creates a ClientConsumer to consume or browse messages matching the filter from the queue with
the given name.
|
ClientMessage |
createMessage(boolean durable)
Creates a ClientMessage.
|
ClientMessage |
createMessage(byte type,
boolean durable)
Creates a ClientMessage.
|
ClientMessage |
createMessage(byte type,
boolean durable,
long expiration,
long timestamp,
byte priority)
Creates a ClientMessage.
|
ClientProducer |
createProducer()
Creates a producer with no default address.
|
ClientProducer |
createProducer(SimpleString address)
Creates a producer which sends messages to the given address
|
ClientProducer |
createProducer(SimpleString address,
int maxRate)
Creates a producer which sends messages to the given address
|
ClientProducer |
createProducer(String address)
Creates a producer which sends messages to the given address
|
ClientProducer |
createProducer(String address,
int rate) |
void |
createQueue(SimpleString address,
SimpleString queueName)
Creates a non-temporary queue non-durable queue.
|
void |
createQueue(SimpleString address,
SimpleString queueName,
boolean durable)
Creates a non-temporary queue.
|
void |
createQueue(SimpleString address,
SimpleString queueName,
SimpleString filterString,
boolean durable)
Creates a non-temporary queue.
|
void |
createQueue(String address,
String queueName)
Creates a non-temporary queue non-durable queue.
|
void |
createQueue(String address,
String queueName,
boolean durable)
Creates a non-temporary queue.
|
void |
createQueue(String address,
String queueName,
String filterString,
boolean durable)
Creates a non-temporaryqueue.
|
void |
createSharedQueue(SimpleString address,
SimpleString queueName,
boolean durable)
Creates a transient queue.
|
void |
createSharedQueue(SimpleString address,
SimpleString queueName,
SimpleString filterString,
boolean durable)
Creates a transient queue.
|
void |
createTemporaryQueue(SimpleString address,
SimpleString queueName)
Creates a temporary queue.
|
void |
createTemporaryQueue(SimpleString address,
SimpleString queueName,
SimpleString filter)
Creates a temporary queue with a filter.
|
void |
createTemporaryQueue(String address,
String queueName)
Creates a temporary queue.
|
void |
createTemporaryQueue(String address,
String queueName,
String filter)
Creates a temporary queue with a filter.
|
void |
deleteQueue(SimpleString queueName)
Deletes the queue.
|
void |
deleteQueue(String queueName)
Deletes the queue.
|
void |
end(Xid xid,
int flags) |
void |
endCall() |
void |
expire(ClientConsumer consumer,
Message message) |
void |
forget(Xid xid) |
RemotingConnection |
getConnection() |
ClientProducerCredits |
getCredits(SimpleString address,
boolean anon) |
int |
getMinLargeMessageSize() |
String |
getName() |
String |
getNodeId() |
ClientProducerCreditManager |
getProducerCreditManager() |
SessionContext |
getSessionContext() |
ClientSessionFactory |
getSessionFactory()
Return the sessionFactory used to created this Session.
|
int |
getTransactionTimeout() |
int |
getVersion()
Returns the server's incrementingVersion.
|
XAResource |
getXAResource()
Returns the XAResource associated to the session.
|
void |
handleConsumerDisconnect(ConsumerContext context) |
void |
handleFailover(RemotingConnection backupConnection,
ActiveMQException cause) |
void |
handleReceiveContinuation(ConsumerContext consumerID,
byte[] chunk,
int flowControlSize,
boolean isContinues) |
void |
handleReceiveLargeMessage(ConsumerContext consumerID,
ClientLargeMessageInternal clientLargeMessage,
long largeMessageSize) |
void |
handleReceiveMessage(ConsumerContext consumerID,
ClientMessageInternal message) |
void |
handleReceiveProducerCredits(SimpleString address,
int credits) |
void |
handleReceiveProducerFailCredits(SimpleString address,
int credits) |
void |
individualAcknowledge(ClientConsumer consumer,
Message message) |
boolean |
isAutoCommitAcks()
Returns whether the session will automatically commit its transaction every time a message is acknowledged
by a ClientConsumer created by this session,
false else |
boolean |
isAutoCommitSends()
Returns whether the session will automatically commit its transaction every time a message is sent
by a ClientProducer created by this session,
false else |
boolean |
isBlockOnAcknowledge()
Returns whether the ClientConsumer created by the session will block when they acknowledge a message.
|
boolean |
isCacheLargeMessageClient() |
boolean |
isClosed()
Returns whether the session is closed or not.
|
boolean |
isClosing() |
boolean |
isCompressLargeMessages() |
boolean |
isConfirmationWindowEnabled() |
boolean |
isRollbackOnly()
Returns
true if the current transaction has been flagged to rollback, false else. |
boolean |
isSameRM(XAResource xares) |
boolean |
isWritable(ReadyListener callback) |
boolean |
isXA()
Return
true if the session supports XA, false else. |
void |
markRollbackOnly() |
void |
preHandleFailover(RemotingConnection connection) |
int |
prepare(Xid xid) |
ClientSession.QueueQuery |
queueQuery(SimpleString queueName)
Queries information on a queue.
|
Xid[] |
recover(int flags) |
void |
removeConsumer(ClientConsumerInternal consumer) |
boolean |
removeFailoverListener(FailoverEventListener listener)
Removes a FailoverEventListener to the session.
|
boolean |
removeFailureListener(SessionFailureListener listener)
Removes a FailureListener to the session.
|
void |
removeProducer(ClientProducerInternal producer) |
void |
resetIfNeeded() |
void |
returnCredits(SimpleString address) |
void |
rollback()
Rolls back the current transaction.
|
void |
rollback(boolean isLastMessageAsDelivered)
Rolls back the current transaction.
|
void |
rollback(boolean isLastMessageAsDelivered,
boolean waitConsumers) |
void |
rollback(Xid xid) |
void |
scheduleConfirmation(SendAcknowledgementHandler handler,
Message message) |
void |
sendProducerCreditsMessage(int credits,
SimpleString address) |
void |
setAddress(Message message,
SimpleString address)
This will set the address at the message
|
void |
setForceNotSameRM(boolean force) |
void |
setPacketSize(int packetSize) |
ClientSessionImpl |
setSendAcknowledgementHandler(SendAcknowledgementHandler handler)
Sets a
SendAcknowledgementHandler for this session. |
void |
setStopSignal()
Sets a stop signal to true.
|
boolean |
setTransactionTimeout(int seconds) |
ClientSessionImpl |
start()
Starts the session.
|
void |
start(Xid xid,
int flags) |
void |
startCall()
This is used internally to control and educate the user
about using the thread boundaries properly.
|
void |
stop()
Stops the session.
|
void |
stop(boolean waitForOnMessage) |
String |
toString() |
void |
workDone() |
public void createQueue(SimpleString address, SimpleString queueName) throws ActiveMQException
ClientSessioncreateQueue in interface ClientSessionaddress - the queue will be bound to this addressqueueName - the name of the queueActiveMQException - in an exception occurs while creating the queuepublic void createQueue(SimpleString address, SimpleString queueName, boolean durable) throws ActiveMQException
ClientSessioncreateQueue in interface ClientSessionaddress - the queue will be bound to this addressqueueName - the name of the queuedurable - whether the queue is durable or notActiveMQException - in an exception occurs while creating the queuepublic void createQueue(String address, String queueName, boolean durable) throws ActiveMQException
ClientSessioncreateQueue in interface ClientSessionaddress - the queue will be bound to this addressqueueName - the name of the queuedurable - whether the queue is durable or notActiveMQException - in an exception occurs while creating the queuepublic void createSharedQueue(SimpleString address, SimpleString queueName, boolean durable) throws ActiveMQException
ClientSessionNotice: you will get an exception if the address or the filter doesn't match to an already existent queue
createSharedQueue in interface ClientSessionaddress - the queue will be bound to this addressqueueName - the name of the queuedurable - if the queue is durableActiveMQException - in an exception occurs while creating the queuepublic void createSharedQueue(SimpleString address, SimpleString queueName, SimpleString filterString, boolean durable) throws ActiveMQException
ClientSessionNotice: you will get an exception if the address or the filter doesn't match to an already existent queue
createSharedQueue in interface ClientSessionaddress - the queue will be bound to this addressqueueName - the name of the queuefilterString - whether the queue is durable or notdurable - if the queue is durableActiveMQException - in an exception occurs while creating the queuepublic void createQueue(SimpleString address, SimpleString queueName, SimpleString filterString, boolean durable) throws ActiveMQException
ClientSessioncreateQueue in interface ClientSessionaddress - the queue will be bound to this addressqueueName - the name of the queuefilterString - only messages which match this filter will be put in the queuedurable - whether the queue is durable or notActiveMQException - in an exception occurs while creating the queuepublic void createQueue(String address, String queueName, String filterString, boolean durable) throws ActiveMQException
ClientSessioncreateQueue in interface ClientSessionaddress - the queue will be bound to this addressqueueName - the name of the queuefilterString - only messages which match this filter will be put in the queuedurable - whether the queue is durable or notActiveMQException - in an exception occurs while creating the queuepublic void createTemporaryQueue(SimpleString address, SimpleString queueName) throws ActiveMQException
ClientSessioncreateTemporaryQueue in interface ClientSessionaddress - the queue will be bound to this addressqueueName - the name of the queueActiveMQException - in an exception occurs while creating the queuepublic void createTemporaryQueue(String address, String queueName) throws ActiveMQException
ClientSessioncreateTemporaryQueue in interface ClientSessionaddress - the queue will be bound to this addressqueueName - the name of the queueActiveMQException - in an exception occurs while creating the queuepublic void createTemporaryQueue(SimpleString address, SimpleString queueName, SimpleString filter) throws ActiveMQException
ClientSessioncreateTemporaryQueue in interface ClientSessionaddress - the queue will be bound to this addressqueueName - the name of the queuefilter - only messages which match this filter will be put in the queueActiveMQException - in an exception occurs while creating the queuepublic void createTemporaryQueue(String address, String queueName, String filter) throws ActiveMQException
ClientSessioncreateTemporaryQueue in interface ClientSessionaddress - the queue will be bound to this addressqueueName - the name of the queuefilter - only messages which match this filter will be put in the queueActiveMQException - in an exception occurs while creating the queuepublic void deleteQueue(SimpleString queueName) throws ActiveMQException
ClientSessiondeleteQueue in interface ClientSessionqueueName - the name of the queue to deleteActiveMQException - if there is no queue for the given name or if the queue has consumerspublic void deleteQueue(String queueName) throws ActiveMQException
ClientSessiondeleteQueue in interface ClientSessionqueueName - the name of the queue to deleteActiveMQException - if there is no queue for the given name or if the queue has consumerspublic ClientSession.QueueQuery queueQuery(SimpleString queueName) throws ActiveMQException
ClientSessionqueueQuery in interface ClientSessionqueueName - the name of the queue to queryActiveMQException - if an exception occurs while querying the queuepublic ClientSession.AddressQuery addressQuery(SimpleString address) throws ActiveMQException
ClientSessionaddressQuery in interface ClientSessionaddress - the address of the biding to queryActiveMQException - if an exception occurs while querying the bindingpublic ClientConsumer createConsumer(SimpleString queueName) throws ActiveMQException
ClientSessioncreateConsumer in interface ClientSessionqueueName - name of the queue to consume messages fromActiveMQException - if an exception occurs while creating the ClientConsumerpublic ClientConsumer createConsumer(String queueName) throws ActiveMQException
ClientSessioncreateConsumer in interface ClientSessionqueueName - name of the queue to consume messages fromActiveMQException - if an exception occurs while creating the ClientConsumerpublic ClientConsumer createConsumer(SimpleString queueName, SimpleString filterString) throws ActiveMQException
ClientSessioncreateConsumer in interface ClientSessionqueueName - name of the queue to consume messages fromfilterString - only messages which match this filter will be consumedActiveMQException - if an exception occurs while creating the ClientConsumerpublic void createQueue(String address, String queueName) throws ActiveMQException
ClientSessioncreateQueue in interface ClientSessionaddress - the queue will be bound to this addressqueueName - the name of the queueActiveMQException - in an exception occurs while creating the queuepublic ClientConsumer createConsumer(String queueName, String filterString) throws ActiveMQException
ClientSessioncreateConsumer in interface ClientSessionqueueName - name of the queue to consume messages fromfilterString - only messages which match this filter will be consumedActiveMQException - if an exception occurs while creating the ClientConsumerpublic ClientConsumer createConsumer(SimpleString queueName, SimpleString filterString, boolean browseOnly) throws ActiveMQException
ClientSession
If browseOnly is true, the ClientConsumer will receive the messages
from the queue but they will not be consumed (the messages will remain in the queue). Note
that paged messages will not be in the queue, and will therefore not be visible if
browseOnly is true.
If browseOnly is false, the ClientConsumer will behave like consume
the messages from the queue and the messages will effectively be removed from the queue.
createConsumer in interface ClientSessionqueueName - name of the queue to consume messages fromfilterString - only messages which match this filter will be consumedbrowseOnly - whether the ClientConsumer will only browse the queue or consume messages.ActiveMQException - if an exception occurs while creating the ClientConsumerpublic ClientConsumer createConsumer(SimpleString queueName, boolean browseOnly) throws ActiveMQException
ClientSession
If browseOnly is true, the ClientConsumer will receive the messages
from the queue but they will not be consumed (the messages will remain in the queue). Note
that paged messages will not be in the queue, and will therefore not be visible if
browseOnly is true.
If browseOnly is false, the ClientConsumer will behave like consume
the messages from the queue and the messages will effectively be removed from the queue.
createConsumer in interface ClientSessionqueueName - name of the queue to consume messages frombrowseOnly - whether the ClientConsumer will only browse the queue or consume messages.ActiveMQException - if an exception occurs while creating the ClientConsumerpublic ClientConsumer createConsumer(String queueName, String filterString, boolean browseOnly) throws ActiveMQException
ClientSession
If browseOnly is true, the ClientConsumer will receive the messages
from the queue but they will not be consumed (the messages will remain in the queue). Note
that paged messages will not be in the queue, and will therefore not be visible if
browseOnly is true.
If browseOnly is false, the ClientConsumer will behave like consume
the messages from the queue and the messages will effectively be removed from the queue.
createConsumer in interface ClientSessionqueueName - name of the queue to consume messages fromfilterString - only messages which match this filter will be consumedbrowseOnly - whether the ClientConsumer will only browse the queue or consume messages.ActiveMQException - if an exception occurs while creating the ClientConsumerpublic ClientConsumer createConsumer(String queueName, boolean browseOnly) throws ActiveMQException
ClientSession
If browseOnly is true, the ClientConsumer will receive the messages
from the queue but they will not be consumed (the messages will remain in the queue). Note
that paged messages will not be in the queue, and will therefore not be visible if
browseOnly is true.
If browseOnly is false, the ClientConsumer will behave like consume
the messages from the queue and the messages will effectively be removed from the queue.
createConsumer in interface ClientSessionqueueName - name of the queue to consume messages frombrowseOnly - whether the ClientConsumer will only browse the queue or consume messages.ActiveMQException - if an exception occurs while creating the ClientConsumerpublic boolean isWritable(ReadyListener callback)
isWritable in interface ClientSessionInternalpublic ClientConsumer createConsumer(SimpleString queueName, SimpleString filterString, int windowSize, int maxRate, boolean browseOnly) throws ActiveMQException
Direct consumers have issues with blocking and failover. E.g. if direct then inside MessageHandler call a blocking method like rollback or acknowledge (blocking) This can block until failover completes, which disallows the thread to be used to deliver any responses to the client during that period, so failover won't occur. If we want direct consumers we need to rethink how they work.
createConsumer in interface ClientSessionqueueName - name of the queue to consume messages fromfilterString - only messages which match this filter will be consumedwindowSize - the consumer window sizemaxRate - the maximum rate to consume messagesbrowseOnly - whether the ClientConsumer will only browse the queue or consume messages.ActiveMQException - if an exception occurs while creating the ClientConsumerpublic ClientConsumer createConsumer(String queueName, String filterString, int windowSize, int maxRate, boolean browseOnly) throws ActiveMQException
ClientSession
If browseOnly is true, the ClientConsumer will receive the messages
from the queue but they will not be consumed (the messages will remain in the queue). Note
that paged messages will not be in the queue, and will therefore not be visible if
browseOnly is true.
If browseOnly is false, the ClientConsumer will behave like consume
the messages from the queue and the messages will effectively be removed from the queue.
createConsumer in interface ClientSessionqueueName - name of the queue to consume messages fromfilterString - only messages which match this filter will be consumedwindowSize - the consumer window sizemaxRate - the maximum rate to consume messagesbrowseOnly - whether the ClientConsumer will only browse the queue or consume messages.ActiveMQException - if an exception occurs while creating the ClientConsumerpublic ClientProducer createProducer() throws ActiveMQException
ClientSessioncreateProducer in interface ClientSessionActiveMQExceptionClientProducer.send(SimpleString, org.apache.activemq.artemis.api.core.Message)public ClientProducer createProducer(SimpleString address) throws ActiveMQException
ClientSessioncreateProducer in interface ClientSessionaddress - the address to send messages toActiveMQException - if an exception occurs while creating the ClientProducerpublic ClientProducer createProducer(String address) throws ActiveMQException
ClientSessioncreateProducer in interface ClientSessionaddress - the address to send messages toActiveMQException - if an exception occurs while creating the ClientProducerpublic ClientProducer createProducer(SimpleString address, int maxRate) throws ActiveMQException
ClientSessioncreateProducer in interface ClientSessionaddress - the address to send messages tomaxRate - the producer rateActiveMQException - if an exception occurs while creating the ClientProducerpublic ClientProducer createProducer(String address, int rate) throws ActiveMQException
ActiveMQExceptionpublic XAResource getXAResource()
ClientSessiongetXAResource in interface ClientSessionpublic void commit()
throws ActiveMQException
ClientSessioncommit in interface ClientSessionActiveMQException - if an exception occurs while committing the transactionpublic boolean isRollbackOnly()
ClientSessiontrue if the current transaction has been flagged to rollback, false else.isRollbackOnly in interface ClientSessiontrue if the current transaction has been flagged to rollback, false else.public void rollback()
throws ActiveMQException
ClientSessionrollback in interface ClientSessionActiveMQException - if an exception occurs while rolling back the transactionpublic void rollback(boolean isLastMessageAsDelivered)
throws ActiveMQException
ClientSessionrollback in interface ClientSessionisLastMessageAsDelivered - the first message on deliveringMessage Buffer is considered as deliveredActiveMQException - if an exception occurs while rolling back the transactionpublic void rollback(boolean isLastMessageAsDelivered,
boolean waitConsumers)
throws ActiveMQException
ActiveMQExceptionpublic void markRollbackOnly()
markRollbackOnly in interface ClientSessionInternalpublic ClientMessage createMessage(byte type, boolean durable, long expiration, long timestamp, byte priority)
ClientSessioncreateMessage in interface ClientSessiontype - type of the messagedurable - whether the created message is durable or notexpiration - the message expirationtimestamp - the message timestamppriority - the message priority (between 0 and 9 inclusive)public ClientMessage createMessage(byte type, boolean durable)
ClientSessioncreateMessage in interface ClientSessiontype - type of the messagedurable - whether the created message is durable or notpublic ClientMessage createMessage(boolean durable)
ClientSessioncreateMessage in interface ClientSessiondurable - whether the created message is durable or notpublic boolean isClosed()
ClientSessionisClosed in interface ClientSessiontrue if the session is closed, false elsepublic boolean isAutoCommitSends()
ClientSessionfalse elseisAutoCommitSends in interface ClientSessiontrue if the session automatically commit its transaction every time a message is sent, false elsepublic boolean isAutoCommitAcks()
ClientSessionfalse elseisAutoCommitAcks in interface ClientSessiontrue if the session automatically commit its transaction every time a message is acknowledged, false elsepublic boolean isBlockOnAcknowledge()
ClientSessionisBlockOnAcknowledge in interface ClientSessiontrue if the session's ClientConsumer block when they acknowledge a message, false elsepublic boolean isXA()
ClientSessiontrue if the session supports XA, false else.isXA in interface ClientSessiontrue if the session supports XA, false else.public void resetIfNeeded()
throws ActiveMQException
resetIfNeeded in interface ClientSessionInternalActiveMQExceptionpublic ClientSessionImpl start() throws ActiveMQException
ClientSessionstart in interface ClientSessionActiveMQException - if an exception occurs while starting the sessionpublic void stop()
throws ActiveMQException
ClientSessionstop in interface ClientSessionActiveMQException - if an exception occurs while stopping the sessionpublic void stop(boolean waitForOnMessage)
throws ActiveMQException
ActiveMQExceptionpublic void addFailureListener(SessionFailureListener listener)
ClientSessionaddFailureListener in interface ClientSessionlistener - the listener to addpublic boolean removeFailureListener(SessionFailureListener listener)
ClientSessionremoveFailureListener in interface ClientSessionlistener - the listener to removetrue if the listener was removed, false elsepublic void addFailoverListener(FailoverEventListener listener)
ClientSessionaddFailoverListener in interface ClientSessionlistener - the listener to addpublic boolean removeFailoverListener(FailoverEventListener listener)
ClientSessionremoveFailoverListener in interface ClientSessionlistener - the listener to removetrue if the listener was removed, false elsepublic int getVersion()
ClientSessiongetVersion in interface ClientSessionincrementingVersionpublic boolean isClosing()
isClosing in interface ClientSessionInternalpublic String getNodeId()
getNodeId in interface ClientSessionInternalpublic int getMinLargeMessageSize()
getMinLargeMessageSize in interface ClientSessionInternalpublic boolean isCompressLargeMessages()
isCompressLargeMessages in interface ClientSessionInternalpublic boolean isCacheLargeMessageClient()
isCacheLargeMessageClient in interface ClientSessionInternalpublic String getName()
getName in interface ClientSessionInternalpublic void acknowledge(ClientConsumer consumer, Message message) throws ActiveMQException
acknowledge in interface ClientSessionInternalActiveMQExceptionpublic void individualAcknowledge(ClientConsumer consumer, Message message) throws ActiveMQException
individualAcknowledge in interface ClientSessionInternalActiveMQExceptionpublic void expire(ClientConsumer consumer, Message message) throws ActiveMQException
expire in interface ClientSessionInternalActiveMQExceptionpublic void addConsumer(ClientConsumerInternal consumer)
addConsumer in interface ClientSessionInternalpublic void addProducer(ClientProducerInternal producer)
addProducer in interface ClientSessionInternalpublic void removeConsumer(ClientConsumerInternal consumer) throws ActiveMQException
removeConsumer in interface ClientSessionInternalActiveMQExceptionpublic void removeProducer(ClientProducerInternal producer)
removeProducer in interface ClientSessionInternalpublic void handleReceiveMessage(ConsumerContext consumerID, ClientMessageInternal message) throws Exception
handleReceiveMessage in interface ClientSessionInternalExceptionpublic void handleReceiveLargeMessage(ConsumerContext consumerID, ClientLargeMessageInternal clientLargeMessage, long largeMessageSize) throws Exception
handleReceiveLargeMessage in interface ClientSessionInternalExceptionpublic void handleReceiveContinuation(ConsumerContext consumerID, byte[] chunk, int flowControlSize, boolean isContinues) throws Exception
handleReceiveContinuation in interface ClientSessionInternalExceptionpublic void handleConsumerDisconnect(ConsumerContext context) throws ActiveMQException
handleConsumerDisconnect in interface ClientSessionInternalActiveMQExceptionpublic void close()
throws ActiveMQException
ClientSessionclose in interface AutoCloseableclose in interface ClientSessionActiveMQException - if an exception occurs while closing the sessionpublic void cleanUp(boolean failingOver)
throws ActiveMQException
cleanUp in interface ClientSessionInternalActiveMQExceptionpublic ClientSessionImpl setSendAcknowledgementHandler(SendAcknowledgementHandler handler)
ClientSessionSendAcknowledgementHandler for this session.setSendAcknowledgementHandler in interface ClientSessionhandler - a SendAcknowledgementHandlerpublic void preHandleFailover(RemotingConnection connection)
preHandleFailover in interface ClientSessionInternalpublic void handleFailover(RemotingConnection backupConnection, ActiveMQException cause)
handleFailover in interface ClientSessionInternalpublic void addMetaData(String key, String data) throws ActiveMQException
ClientSessionaddMetaData in interface ClientSessionActiveMQExceptionpublic void addUniqueMetaData(String key, String data) throws ActiveMQException
ClientSessionaddUniqueMetaData in interface ClientSessionActiveMQExceptionpublic ClientSessionFactory getSessionFactory()
ClientSessiongetSessionFactory in interface ClientSessionpublic void setAddress(Message message, SimpleString address)
ClientSessionInternalsetAddress in interface ClientSessionInternalpublic void setPacketSize(int packetSize)
setPacketSize in interface ClientSessionInternalpublic void workDone()
workDone in interface ClientSessionInternalpublic void sendProducerCreditsMessage(int credits,
SimpleString address)
sendProducerCreditsMessage in interface ClientSessionInternalpublic ClientProducerCredits getCredits(SimpleString address, boolean anon)
getCredits in interface ClientSessionInternalpublic void returnCredits(SimpleString address)
returnCredits in interface ClientSessionInternalpublic void handleReceiveProducerCredits(SimpleString address, int credits)
handleReceiveProducerCredits in interface ClientSessionInternalpublic void handleReceiveProducerFailCredits(SimpleString address, int credits)
handleReceiveProducerFailCredits in interface ClientSessionInternalpublic ClientProducerCreditManager getProducerCreditManager()
getProducerCreditManager in interface ClientSessionInternalpublic void startCall()
ClientSessionInternalstartCall in interface ClientSessionInternalpublic void endCall()
endCall in interface ClientSessionInternalClientSessionInternal.startCall()public void commit(Xid xid, boolean onePhase) throws XAException
commit in interface XAResourceXAExceptionpublic void end(Xid xid, int flags) throws XAException
end in interface XAResourceXAExceptionpublic void forget(Xid xid) throws XAException
forget in interface XAResourceXAExceptionpublic int getTransactionTimeout()
throws XAException
getTransactionTimeout in interface XAResourceXAExceptionpublic boolean setTransactionTimeout(int seconds)
throws XAException
setTransactionTimeout in interface XAResourceXAExceptionpublic boolean isSameRM(XAResource xares) throws XAException
isSameRM in interface XAResourceXAExceptionpublic int prepare(Xid xid) throws XAException
prepare in interface XAResourceXAExceptionpublic Xid[] recover(int flags) throws XAException
recover in interface XAResourceXAExceptionpublic void rollback(Xid xid) throws XAException
rollback in interface XAResourceXAExceptionpublic void start(Xid xid, int flags) throws XAException
start in interface XAResourceXAExceptionpublic 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 setForceNotSameRM(boolean force)
setForceNotSameRM in interface ClientSessionInternalpublic RemotingConnection getConnection()
getConnection in interface ClientSessionInternalpublic Set<ClientProducerInternal> cloneProducers()
public Set<ClientConsumerInternal> cloneConsumers()
public static Object convert(Xid xid)
This will convert to the same XID deserialized on the Server, hence we will be able to debug eventual stuff
xid - public void setStopSignal()
ClientSessionInternalsetStopSignal in interface ClientSessionInternalpublic boolean isConfirmationWindowEnabled()
isConfirmationWindowEnabled in interface ClientSessionInternalpublic void scheduleConfirmation(SendAcknowledgementHandler handler, Message message)
scheduleConfirmation in interface ClientSessionInternalpublic SessionContext getSessionContext()
getSessionContext in interface ClientSessionInternalCopyright © 2018 JBoss by Red Hat. All rights reserved.