de.jw.cloud42.core.eventing.subscriptionProcessor
Class GenericSubscriptionProcessor

java.lang.Object
  extended by de.jw.cloud42.core.eventing.subscriptionProcessor.GenericSubscriptionProcessor
All Implemented Interfaces:
SubscriptionProcessor
Direct Known Subclasses:
SOAPSubscriptionProcessor

public class GenericSubscriptionProcessor
extends java.lang.Object
implements SubscriptionProcessor

A generic implementation of a subscription processor. Getting the subscriber form the subscription message is delegated to more specific implementations.

Author:
fbitzer

Constructor Summary
GenericSubscriptionProcessor()
           
 
Method Summary
static java.lang.String generateId()
          Generates an Id for a subscription.
 Subscription getSubscriberFromMessage(org.apache.axiom.om.OMElement message)
          Read subscriber informations from subscription message.
 java.lang.String subscribe(org.apache.axiom.om.OMElement subscriptionMessage, java.lang.String topic)
          Processes a subscription request message.
 void unsubscribe(java.lang.String subscriptionId)
          Processes a unsubscribe request message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericSubscriptionProcessor

public GenericSubscriptionProcessor()
Method Detail

subscribe

public java.lang.String subscribe(org.apache.axiom.om.OMElement subscriptionMessage,
                                  java.lang.String topic)
                           throws EventingException
Processes a subscription request message.

Specified by:
subscribe in interface SubscriptionProcessor
Parameters:
subscriptionMessage -
Returns:
Id of subscription, if processed successfully.
Throws:
EventingException

unsubscribe

public void unsubscribe(java.lang.String subscriptionId)
                 throws EventingException
Processes a unsubscribe request message.

Specified by:
unsubscribe in interface SubscriptionProcessor
Parameters:
subscriptionId - id of the subscription to cancel.
Throws:
EventingException

getSubscriberFromMessage

public Subscription getSubscriberFromMessage(org.apache.axiom.om.OMElement message)
                                      throws EventingException
Read subscriber informations from subscription message. Inherited classes must implement this method by themselves.

Parameters:
body - the SOAP body of the subscription message.
Returns:
Throws:
EventingException

generateId

public static java.lang.String generateId()
                                   throws EventingException
Generates an Id for a subscription.

Returns:
the generated Id as String
Throws:
EventingException


Copyright © 2010 just works! Software. All Rights Reserved.