public interface AsyncSubscription extends Subscription
AsyncSubscription object to receive messages from a subject. It runs
asynchronously (on an Executor), receives one Message at a time, and invokes a
user-defined callback method to process each Message.| Modifier and Type | Method and Description |
|---|---|
void |
setMessageHandler(MessageHandler cb) |
void |
start()
Starts asynchronous message delivery to this subscription
|
autoUnsubscribe, close, getDropped, getMaxPendingBytes, getMaxPendingMsgs, getQueue, getQueuedMessageCount, getSubject, isValid, setMaxPendingBytes, setMaxPendingMsgs, setPendingLimits, unsubscribevoid start()
IllegalStateException - if the subscription is invalid/closed. Reasons for this could
include reaching the subscription's autoUnsubscribe limit, calling
Subscription.unsubscribe(), or closing the Connection.void setMessageHandler(MessageHandler cb)
cb - the message handler to set for this subscription. When new messages arrive for this
subscription, the MessageHandler.onMessage(Message) method will be invoked.MessageHandler.onMessage(Message)Copyright © 2015–2016 Apcera, Inc.. All rights reserved.