public interface SyncSubscription extends Subscription
SyncSubscription object to receive
messages from a subject synchronously.| Modifier and Type | Method and Description |
|---|---|
Message |
nextMessage()
Receive the next message that becomes available for this
Subscription,
waiting if necessary until a Message becomes available. |
Message |
nextMessage(long timeout)
Receive the next
Message that arrives for this Subscription
within the specified timeout interval. |
Message |
nextMessage(long timeout,
TimeUnit unit)
Receive the next
Message that arrives for this Subscription
within the specified timeout interval. |
autoUnsubscribe, clearMaxPending, close, getDelivered, getDropped, getPendingBytes, getPendingBytesLimit, getPendingBytesMax, getPendingMsgs, getPendingMsgsLimit, getPendingMsgsMax, getQueue, getQueuedMessageCount, getSubject, isValid, setPendingLimits, unsubscribeMessage nextMessage() throws IOException
Subscription,
waiting if necessary until a Message becomes available.Connection is closed concurrently.IOException - if an I/O error prevents message deliveryIllegalStateException - if the Subscription has been
removed (unsubscribed)IOException - if the Subscription's has been
unsubscribed due to reaching its autoUnsubscribe limit.Subscription.autoUnsubscribe(int)Message nextMessage(long timeout) throws IOException, TimeoutException
Message that arrives for this Subscription
within the specified timeout interval.timeout - the timeout value (in milliseconds)IOException - if an I/O error prevents message deliveryTimeoutException - if the timeout expires before a message becomes
availableIllegalStateException - if the Subscription has been
removed (unsubscribed)IOException - if the Subscription's has been
unsubscribed due to reaching its autoUnsubscribe limit.nextMessage(long, TimeUnit),
Subscription.autoUnsubscribe(int)Message nextMessage(long timeout, TimeUnit unit) throws IOException, TimeoutException
Message that arrives for this Subscription
within the specified timeout interval.timeout - how long to wait before giving up, in units of unitunit - the timeout valueIOException - if an I/O error prevents message deliveryTimeoutException - if the timeout expires before a message becomes
availableIllegalStateException - if the Subscription has been
removed (unsubscribed)IOException - if the Subscription's has been
unsubscribed due to reaching its autoUnsubscribe limit.Subscription.autoUnsubscribe(int)Copyright © 2015–2016 Apcera, Inc.. All rights reserved.