public class MemorySubscriptionManager extends java.lang.Object implements SubscriptionManager
Constructor and Description |
---|
MemorySubscriptionManager() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the subscriptions so they cannot be re-subscribed upon reconnect.
|
static long |
getDefaultResubscriptionTimeout()
Gets the Default Resubscription Timeout for all instances of
this class in milliseconds.
|
long |
getResubscriptionTimeout()
Gets the Resubscription timeout in milliseconds .
|
void |
resubscribe(Client client)
Resubscribes to a subscription.
|
static void |
setDefaultResubscriptionTimeout(long timeout)
Sets the Default Resubscription Timeout for all instances of
this class in milliseconds.
|
void |
setResubscriptionTimeout(long timeout)
Sets the Resubscription timeout in milliseconds.
|
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 failedpublic static void setDefaultResubscriptionTimeout(long timeout)
timeout
- The default timeout for resubscription calls.public static long getDefaultResubscriptionTimeout()
public void setResubscriptionTimeout(long timeout)
timeout
- The timeout for resubscription calls.public long getResubscriptionTimeout()