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()
Deprecated.
|
autoUnsubscribe, clearMaxPending, close, getDelivered, getDropped, getPendingBytes, getPendingBytesLimit, getPendingBytesMax, getPendingMsgs, getPendingMsgsLimit, getPendingMsgsMax, getQueue, getQueuedMessageCount, getSubject, isValid, setPendingLimits, unsubscribe
@Deprecated void 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.