private class DefaultStompSession.ReceiptHandler extends java.lang.Object implements StompSession.Receiptable
Modifier and Type | Field and Description |
---|---|
private java.util.concurrent.ScheduledFuture<?> |
future |
private java.util.List<java.lang.Runnable> |
receiptCallbacks |
private java.lang.String |
receiptId |
private java.util.List<java.lang.Runnable> |
receiptLostCallbacks |
private java.lang.Boolean |
result |
Constructor and Description |
---|
ReceiptHandler(java.lang.String receiptId) |
Modifier and Type | Method and Description |
---|---|
void |
addReceiptLostTask(java.lang.Runnable task)
Task to invoke when a receipt is not received in the configured time.
|
void |
addReceiptTask(java.lang.Runnable task)
Task to invoke when a receipt is received.
|
private void |
addTask(java.lang.Runnable task,
boolean successTask) |
java.lang.String |
getReceiptId()
Return the receipt id, or
null if the STOMP frame for which
the handle was returned did not have a "receipt" header. |
private void |
handleInternal(boolean result) |
void |
handleReceiptNotReceived() |
void |
handleReceiptReceived() |
private void |
initReceiptHandling() |
private void |
invoke(java.util.List<java.lang.Runnable> callbacks) |
@Nullable private final java.lang.String receiptId
private final java.util.List<java.lang.Runnable> receiptCallbacks
private final java.util.List<java.lang.Runnable> receiptLostCallbacks
@Nullable private java.util.concurrent.ScheduledFuture<?> future
@Nullable private java.lang.Boolean result
public ReceiptHandler(@Nullable java.lang.String receiptId)
private void initReceiptHandling()
@Nullable public java.lang.String getReceiptId()
StompSession.Receiptable
null
if the STOMP frame for which
the handle was returned did not have a "receipt" header.getReceiptId
in interface StompSession.Receiptable
public void addReceiptTask(java.lang.Runnable task)
StompSession.Receiptable
addReceiptTask
in interface StompSession.Receiptable
public void addReceiptLostTask(java.lang.Runnable task)
StompSession.Receiptable
addReceiptLostTask
in interface StompSession.Receiptable
StompClientSupport.setReceiptTimeLimit(long)
private void addTask(java.lang.Runnable task, boolean successTask)
private void invoke(java.util.List<java.lang.Runnable> callbacks)
public void handleReceiptReceived()
public void handleReceiptNotReceived()
private void handleInternal(boolean result)