001 /**
002 *
003 */
004 package de.jw.cloud42.core.eventing.subscriptionProcessor;
005
006
007
008 import org.apache.axiom.om.OMElement;
009 import org.apache.axiom.soap.SOAPBody;
010
011
012 import de.jw.cloud42.core.eventing.EventingException;
013
014
015 /**
016 * A subscription processor is a class that handles the subscription process for a particular kind of
017 * subscribing endpoint (e.g. a SOAP/HTTP endpoint).
018 *
019 * Concrete implementations of this interface extract endpoint information out of the subscription message
020 * that is contained in the SOAPBody.
021 *
022 * @author fbitzer
023 *
024 */
025 public interface SubscriptionProcessor {
026
027 /**
028 * Processes a subscription request message.
029 *
030 * @param subscriptionMessage
031 * @return Id of subscription, if processed successfully.
032 * @throws EventingException
033 */
034 public String subscribe(OMElement subscriptionMessage, String topic) throws EventingException;
035
036 /**
037 * Handles unsubscribing.
038 * @param subscriptionId the id of the subscription to cancel.
039 * @throws EventingException
040 */
041 public void unsubscribe(String subscriptionId) throws EventingException;
042
043
044
045 }