org.globus.ogsa.impl.ogsi
Class JMSNotificationSourceProvider

java.lang.Object
  extended byorg.globus.ogsa.impl.ogsi.JMSNotificationSourceProvider
All Implemented Interfaces:
NotificationProvider, OperationProvider, ServiceDataListener, ServiceDataValueCallback

public class JMSNotificationSourceProvider
extends java.lang.Object
implements NotificationProvider, ServiceDataListener, OperationProvider, ServiceDataValueCallback

Notification source implementation used to subscribe and notify a collection of external sinks


Field Summary
protected  GridServiceBase base
           
 
Constructor Summary
JMSNotificationSourceProvider()
           
 
Method Summary
 java.lang.String addSubscription(QName[] sdeNames, HandleType handle)
           
 java.lang.String addSubscription(QName[] sdeNames, HandleType handle, java.lang.String subscriptionID)
           
 void addTopic(java.lang.String topic, QName messageType)
           
 QName[] getOperations()
          Called during initialization when the Grid service needs to find out what operations are supported by this provider.
 java.util.Collection getServiceDataValues(QName qname)
          Gets service data values requested for a service data element qname.
 java.lang.String getSubscriptionID()
           
 void initialize(GridServiceBase base)
          Called when the operation provider is added to a grid service.
 void notify(QName topic, java.lang.Object messageData, java.util.Map properties, boolean ack)
           
 void notify(java.lang.String topic, java.lang.Object messageData)
           
 void notify(java.lang.String topic, java.lang.Object messageData, java.util.Map properties)
           
 void notifyWithAck(QName topic, java.lang.Object messageData, java.util.Map properties)
           
 void notifyWithAck(java.lang.String topic, java.lang.Object messageData)
           
 void removeSubscription(java.lang.String id)
           
 void serviceDataChanged(ServiceData data, boolean ack)
          notifies the listener that a service data element has changed
 void subscribe(ExtensibilityType subscriptionExpression, LocatorType sink, ExtendedDateTimeType expirationTime, LocatorTypeHolder subscriptionInstanceLocator, TerminationTimeTypeHolder currentTerminationTime)
          Deprecated. TODO: the subcribe has a hard coded type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.globus.ogsa.NotificationProvider
addSubscription
 

Field Detail

base

protected GridServiceBase base
Constructor Detail

JMSNotificationSourceProvider

public JMSNotificationSourceProvider()
Method Detail

getOperations

public QName[] getOperations()
Description copied from interface: OperationProvider
Called during initialization when the Grid service needs to find out what operations are supported by this provider.

Specified by:
getOperations in interface OperationProvider
Returns:
an array of operation qnames as defined in WSDL. An OperationProvider can use the empty string "" to denote that all operations with a certain local name are implemented. Similarly the wildcard "*" can be used in the local part of the qname to denote that all operations within a certain namespace are implemented. Combining these two approaches and returning: new QName[] {new QName("","*")}, will result in all incoming operations being redirected to this provider (apart from the OGSI defined GridService interface operations provided by the GridServiceBase implementation. Note that individual operations in the OGSI namespace could still be overridded with this approach, but not using the 'all namespaces and all operation' wildcard.

initialize

public void initialize(GridServiceBase base)
                throws GridServiceException
Description copied from interface: OperationProvider
Called when the operation provider is added to a grid service.

Specified by:
initialize in interface OperationProvider
Parameters:
base - the service this provider is being associated with
Throws:
GridServiceException - if the initialization (and service creation is to be aborted)

getServiceDataValues

public java.util.Collection getServiceDataValues(QName qname)
Description copied from interface: ServiceDataValueCallback
Gets service data values requested for a service data element qname.

Specified by:
getServiceDataValues in interface ServiceDataValueCallback
Parameters:
qname - name of service data element (all values will be wrapped inside of element tags with this qname)
Returns:
a collection of service data values, if the collection is empty or null, the evaluator will ignore this service data element.

getSubscriptionID

public java.lang.String getSubscriptionID()

addSubscription

public java.lang.String addSubscription(QName[] sdeNames,
                                        HandleType handle)
                                 throws TargetInvalidFaultType
Specified by:
addSubscription in interface NotificationProvider
Throws:
TargetInvalidFaultType

addSubscription

public java.lang.String addSubscription(QName[] sdeNames,
                                        HandleType handle,
                                        java.lang.String subscriptionID)
                                 throws TargetInvalidFaultType
Throws:
TargetInvalidFaultType

removeSubscription

public void removeSubscription(java.lang.String id)
                        throws TargetInvalidFaultType
Specified by:
removeSubscription in interface NotificationProvider
Throws:
TargetInvalidFaultType

addTopic

public void addTopic(java.lang.String topic,
                     QName messageType)
              throws TopicAlreadyExistsException,
                     GridServiceException
Specified by:
addTopic in interface NotificationProvider
Throws:
TopicAlreadyExistsException
GridServiceException

serviceDataChanged

public void serviceDataChanged(ServiceData data,
                               boolean ack)
Description copied from interface: ServiceDataListener
notifies the listener that a service data element has changed

Specified by:
serviceDataChanged in interface ServiceDataListener
Parameters:
data - service data element that has changed
ack - a hint whether the notifier expects notifications sent off as a result of this notificaiton to be acknowledged

notify

public void notify(java.lang.String topic,
                   java.lang.Object messageData)
Specified by:
notify in interface NotificationProvider

notifyWithAck

public void notifyWithAck(java.lang.String topic,
                          java.lang.Object messageData)

notify

public void notify(java.lang.String topic,
                   java.lang.Object messageData,
                   java.util.Map properties)
Specified by:
notify in interface NotificationProvider

notifyWithAck

public void notifyWithAck(QName topic,
                          java.lang.Object messageData,
                          java.util.Map properties)

notify

public void notify(QName topic,
                   java.lang.Object messageData,
                   java.util.Map properties,
                   boolean ack)

subscribe

public void subscribe(ExtensibilityType subscriptionExpression,
                      LocatorType sink,
                      ExtendedDateTimeType expirationTime,
                      LocatorTypeHolder subscriptionInstanceLocator,
                      TerminationTimeTypeHolder currentTerminationTime)
               throws java.rmi.RemoteException,
                      FaultType,
                      TargetInvalidFaultType,
                      ExtensibilityNotSupportedFaultType,
                      ExtensibilityTypeFaultType
Deprecated. TODO: the subcribe has a hard coded type

Throws:
java.rmi.RemoteException
FaultType
TargetInvalidFaultType
ExtensibilityNotSupportedFaultType
ExtensibilityTypeFaultType