de.jw.cloud42.webservice
Class Cloud42NotificationService

java.lang.Object
  extended by de.jw.cloud42.webservice.Cloud42NotificationService

public class Cloud42NotificationService
extends java.lang.Object

Web service class for Cloud42 notification service. Provides methods to subscribe and unsubscribe to notification messages coming from AMI instances. Subscription/Unsubscription requests are send as SOAP messages.

Author:
fbitzer

Constructor Summary
Cloud42NotificationService()
           
 
Method Summary
 java.lang.String getEndpointAddress()
          Get current address of Cloud42 message endpoint.
 void setEndpointAddress(java.lang.String address)
          Set address of Cloud42 message endpoint (the endpoint published by Cloud42 for retrieving and dsipatching event messages from AMI instances) and cause its restart.
 java.lang.String subscribe(java.lang.String subscriptionProcessor, java.lang.String topic, org.apache.axiom.om.OMElement subscriptionMessage)
          Subscribe to notification messages.
 boolean unsubscribe(java.lang.String subscriptionId)
          Unsubscribe.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Cloud42NotificationService

public Cloud42NotificationService()
Method Detail

subscribe

public java.lang.String subscribe(java.lang.String subscriptionProcessor,
                                  java.lang.String topic,
                                  org.apache.axiom.om.OMElement subscriptionMessage)
                           throws java.lang.Exception
Subscribe to notification messages.

Parameters:
subscriptionProcessor - a fully qualified name of the class that handles the subscription request. This class is responsible for parsing the subscription message, to extract endpoint informations out of the subscriptionMessage part etc.
topic - the topic the subscriber wants to subscribe to.
subscriptionMessage - This part of the SOAP message contains endpoint information and is parsed by the subscriptionProcessor.
Returns:
a UUID to identify the subscription.
Throws:
java.lang.Exception

unsubscribe

public boolean unsubscribe(java.lang.String subscriptionId)
                    throws java.lang.Exception
Unsubscribe.

Parameters:
subscriptionId - UUID of subscription to cancel.
Returns:
true if successful (return value is necessary because of Exception handling)
Throws:
java.lang.Exception

getEndpointAddress

public java.lang.String getEndpointAddress()
Get current address of Cloud42 message endpoint.

Returns:
the address of the Cloud42 message endpoint used for sending notifications from AMI instances to Cloud42.

setEndpointAddress

public void setEndpointAddress(java.lang.String address)
Set address of Cloud42 message endpoint (the endpoint published by Cloud42 for retrieving and dsipatching event messages from AMI instances) and cause its restart.

Parameters:
address - HTTP Endpoint address such as http://localhost:8084/messages


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