Package org.serviceconnector.registry
Class SubscriptionRegistry
java.lang.Object
org.serviceconnector.registry.Registry<String,Subscription>
org.serviceconnector.registry.SubscriptionRegistry
- All Implemented Interfaces:
IRegistryMXBean
The Class SubscriptionRegistry. Registry stores entries for properly created subscriptions.
- Author:
- JTraber
-
Field Summary
Fields inherited from class org.serviceconnector.registry.Registry
registryMap -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSubscription(String key, Subscription subscription) Adds the subscription.voiddump(XMLDumpWriter writer) Dump the su8bscriptions into the xml writer.getSubscription(String key) Gets the subscription.Gets all subscriptions.getSubscriptions(String serviceName) Gets all subscriptions for given service name.voidremoveSubscription(String key) Removes the subscription.voidremoveSubscription(Subscription subscription) Removes the subscription.voidresetSubscriptionTimeout(Subscription subscription, double newTimeoutMillis) Cancel subscription timeout.Methods inherited from class org.serviceconnector.registry.Registry
containsKey, get, getEntries, getSize, keySet, keySetArray, put, remove, toString
-
Constructor Details
-
SubscriptionRegistry
public SubscriptionRegistry()Instantiates a new subscription registry.
-
-
Method Details
-
addSubscription
Adds the subscription.- Parameters:
key- the keysubscription- the subscription
-
removeSubscription
Removes the subscription.- Parameters:
subscription- the subscription
-
removeSubscription
Removes the subscription.- Parameters:
key- the key
-
getSubscription
Gets the subscription.- Parameters:
key- the key- Returns:
- the subscription
-
getSubscriptions
Gets all subscriptions.- Returns:
- the subscriptions
-
getSubscriptions
Gets all subscriptions for given service name.- Parameters:
serviceName- the service name- Returns:
- the subscriptions
-
resetSubscriptionTimeout
Cancel subscription timeout.- Parameters:
subscription- the subscriptionnewTimeoutMillis- the new timeout in milliseconds
-
dump
Dump the su8bscriptions into the xml writer.- Parameters:
writer- the writer- Throws:
Exception- the exception
-