public class SubscriptionManager
extends java.lang.Object
| Constructor and Description |
|---|
SubscriptionManager() |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<java.lang.Object> |
getAllGrantedTopics()
Get all topic whose subscription is in granted state.
|
int |
getSubscriptionCount()
Get the number of subscriptions currently registered
|
void |
setSource(java.lang.Object topic,
SubscriptionSource source)
Set a source for a topic.
|
void |
setValidator(SubscriptionValidator validator) |
void |
subscribe(java.lang.Object topic,
SubscriptionListener listener)
Subscribe to a topic.
|
void |
subscribe(java.lang.Object topic,
SubscriptionListener listener,
java.lang.Object hint)
Subscribe to a topic with a hint
|
void |
unsubscribe(java.lang.Object topic,
SubscriptionListener listener) |
void |
unsubscribeAll(SubscriptionListener listener)
Unsibscribe from all subscriptions that the listener has subscribed to
|
public void unsubscribeAll(SubscriptionListener listener)
listener - the listener to unsubscribepublic void subscribe(java.lang.Object topic,
SubscriptionListener listener)
throws ValidationException
topic - The topic to which the subscription should be madelistener - The listener which will receive the eventsValidationException - thrown if the subscription cannot be established (e.g. the
topic is invalid)public void subscribe(java.lang.Object topic,
SubscriptionListener listener,
java.lang.Object hint)
throws ValidationException
topic - The topic to which the subscription should be madelistener - The listener which will receive the eventshint - The hint is specific to the topicValidationException - thrown if the subscription cannot be established (e.g. the
topic is invalid)public void unsubscribe(java.lang.Object topic,
SubscriptionListener listener)
public void setValidator(SubscriptionValidator validator)
public void setSource(java.lang.Object topic,
SubscriptionSource source)
topic - the topicsource - the source to setpublic int getSubscriptionCount()
public java.util.List<java.lang.Object> getAllGrantedTopics()
Copyright (c) IBH SYSTEMS GmbH and others 2010, 2013.
All rights reserved. This program and the accompanying materials
are made available under the terms of the
Eclipse Public License v1.0