public class DefaultSubscriptionManager extends java.lang.Object implements SubscriptionManager
SubscriptionManager
interface that does
nothing.Constructor and Description |
---|
DefaultSubscriptionManager() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the subscriptions so they cannot be re-subscribed upon reconnect.
|
void |
resubscribe(Client client)
Resubscribes to a subscription.
|
void |
subscribe(MessageHandler messageHandler,
Message message)
Creates a subscription.
|
void |
unsubscribe(CommandId subId)
Unsubscribes from a subscription.
|
public void subscribe(MessageHandler messageHandler, Message message)
SubscriptionManager
subscribe
in interface SubscriptionManager
messageHandler
- The message handler for the subscription.message
- The message for the subscription.public void unsubscribe(CommandId subId)
SubscriptionManager
unsubscribe
in interface SubscriptionManager
subId
- The subscription ID to identify the subscription.public void clear()
SubscriptionManager
clear
in interface SubscriptionManager
public void resubscribe(Client client) throws AMPSException
SubscriptionManager
resubscribe
in interface SubscriptionManager
client
- The client object for re-subscription.AMPSException
- resubscription failed