public interface Subscription extends AutoCloseable
Subscription object to receive messages that have been published to a
subject.
Each Subscription object is unique, even if the subscription is to the same subject.
This means that if Connection.subscribe("foo", cb) is called twice in a row, each of the
resulting Subscription objects will be unique, and any message delivered on subject "foo"
will be delivered individually to both Subscription objects.
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Removes interest in the
Subscription's subject immediately. |
SubscriptionOptions |
getOptions()
Returns the
SubscriptionOptions object for this Subscription object. |
String |
getQueue()
Returns the optional queue group name.
|
String |
getSubject()
Retrieves the subject of interest from the
Subscription object. |
void |
unsubscribe()
Removes interest in the
Subscription object's subject immediately. |
String getSubject()
Subscription object.String getQueue()
void unsubscribe()
throws IOException,
TimeoutException
Subscription object's subject immediately.IOException - if an error occurs while notifying the serverTimeoutException - if the unsubscribe request times out without a responsevoid close()
Subscription's subject immediately.close in interface AutoCloseableSubscription.close(),
AutoCloseable.close()SubscriptionOptions getOptions()
SubscriptionOptions object for this Subscription object.Subscription's code SubscriptionOptions} object.SubscriptionOptionsCopyright © 2016 Apcera, Inc.. All rights reserved.