001
002
003 package de.jw.cloud42.core.eventing.storage;
004
005
006
007 import java.util.Iterator;
008
009 import de.jw.cloud42.core.eventing.EventingException;
010 import de.jw.cloud42.core.eventing.subscription.Subscription;
011
012 /** Defines the Storage for storing subscribers.
013 * */
014 public interface SubscriberStore {
015
016
017 /**
018 * To store the subscriber.
019 *
020 * @param s
021 * @throws EventingException
022 */
023 void store(Subscription s) throws EventingException;
024
025 /**
026 * To retrieve a previously stored subscriber.
027 *
028 * @param subscriberID
029 * @return
030 * @throws EventingException
031 */
032 Subscription retrieve(String subscriberID) throws EventingException;
033
034 /**
035 * To retrieve all subscribers stored upto now.
036 *
037 * @return
038 * @throws EventingException
039 */
040 Iterator retrieveAllSubscribers(String topic) throws EventingException;
041
042
043 /**
044 * To delete a previously stored subscriber.
045 *
046 * @param subscriberID
047 * @throws EventingException
048 */
049 void delete(String subscriberID) throws EventingException;
050
051
052 }