public interface SyncSubscription extends Subscription
SyncSubscription object to receive messages from a subject
synchronously.| Modifier and Type | Method and Description |
|---|---|
Message |
nextMessage()
Receives the next
Message that becomes available for this Subscription,
waiting if necessary until a Message becomes available. |
Message |
nextMessage(long timeout)
Receives the next
Message that arrives for this Subscription, waiting up to
the specified wait time if necessary for a Message to become available. |
Message |
nextMessage(long timeout,
TimeUnit unit)
Receives the next
Message that arrives for this Subscription, waiting up to
the specified wait time if necessary for a Message to become available. |
autoUnsubscribe, clearMaxPending, close, getDelivered, getDropped, getPendingBytes, getPendingBytesLimit, getPendingBytesMax, getPendingMsgs, getPendingMsgsLimit, getPendingMsgsMax, getQueue, getQueuedMessageCount, getSubject, isValid, setPendingLimits, unsubscribeMessage nextMessage() throws IOException, InterruptedException
Message that becomes available for this Subscription,
waiting if necessary until a Message becomes available.Connection is closed concurrently. InterruptedException - if interrupted while waiting, e.g. because the
Subscription was closed in another threadIOException - if the Subscription has been unsubscribed due to reaching its
autoUnsubscribe limit, or if the Subscription has been marked a slow
consumer.IllegalStateException - if the Subscription is not valid, e.g. it was closed
prior to this invocationSubscription.autoUnsubscribe(int)Message nextMessage(long timeout) throws IOException, TimeoutException, InterruptedException
Message that arrives for this Subscription, waiting up to
the specified wait time if necessary for a Message to become available.timeout - how long to wait before giving up, in millisecondsTimeoutException - if the timeout expires before a Message becomes availableInterruptedException - if interrupted while waiting, e.g. because the
Subscription was closed in another threadIOException - if the Subscription has been unsubscribed due to reaching its
autoUnsubscribe limit, or if the Subscription has been marked a slow
consumer.IllegalStateException - if the Subscription is not valid, e.g. it was closed
prior to this invocationnextMessage(long, TimeUnit),
Subscription.autoUnsubscribe(int)Message nextMessage(long timeout, TimeUnit unit) throws IOException, TimeoutException, InterruptedException
Message that arrives for this Subscription, waiting up to
the specified wait time if necessary for a Message to become available.timeout - how long to wait before giving up, in units of unitunit - a TimeUnit determining how to interpret the timeout parameterTimeoutException - if the timeout expires before a Message becomes availableInterruptedException - if interrupted while waiting, e.g. because the
Subscription was closed in another threadIOException - if the Subscription has been unsubscribed due to reaching its
autoUnsubscribe limit, or if the Subscription has been marked a slow
consumer.IllegalStateException - if the Subscription is not valid, e.g. it was closed
prior to this invocationSubscription.autoUnsubscribe(int)Copyright © 2015-2016 Apcera, Inc.. All Rights Reserved.