public abstract class JMSCallback extends Object
| Constructor and Description |
|---|
JMSCallback(javax.jms.Session session)
Creates a call back initializing the JMS session object and saving caller object to be notified.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
commitSession()
Commits the JMS session.
|
void |
done(boolean success)
Invoke this method to update the status of the message consumption.
|
abstract int |
getAcknowledgementMode()
Get acknowledgement mode of this JMSCallback.
|
boolean |
isOperationComplete()
States whether acknowledgement process has been completed.
|
protected boolean |
isSuccess()
Is this transaction/ack a success.
|
protected void |
recoverSession()
Recover the JMS session.
|
protected void |
rollbackSession()
Rollbacks the JMS session.
|
void |
waitForProcessing() |
public JMSCallback(javax.jms.Session session)
session - JMS Session connected with this callback.public boolean isOperationComplete()
protected void commitSession()
throws JMSConnectorException
JMSConnectorException - if the JMS provider fails to commit the transaction.protected void rollbackSession()
throws JMSConnectorException
JMSConnectorException - if the JMS provider fails to roll back the transaction.protected void recoverSession()
throws JMSConnectorException
JMSConnectorException - if the JMS provider fails to recover the session.public void done(boolean success)
success - status of the message processing.public abstract int getAcknowledgementMode()
protected boolean isSuccess()
public void waitForProcessing()
throws InterruptedException
InterruptedExceptionCopyright © 2019 WSO2. All rights reserved.