org.globus.ogsa.impl.core.notification.framework.jms
Class JMSXSLQueryEvaluator

java.lang.Object
  extended byorg.globus.ogsa.impl.core.notification.framework.jms.JMSQueryEvaluator
      extended byorg.globus.ogsa.impl.core.notification.framework.jms.JMSXSLQueryEvaluator
All Implemented Interfaces:
QueryEvaluator, RegisterSubscriptionMessageReceiver, ServiceDataChangeMessageReceiver, UnregisterSubscriptionMessageReceiver

public class JMSXSLQueryEvaluator
extends JMSQueryEvaluator

The JMSServiceDataNameQueryEvaluator class This class is used to query the SubscriptionExpression defined by the SubscriptionExpressionType -- SubscribeByXSL


Field Summary
 
Fields inherited from class org.globus.ogsa.impl.core.notification.framework.jms.JMSQueryEvaluator
theSubscriptionCriteriaMap
 
Constructor Summary
JMSXSLQueryEvaluator(java.lang.String aSubscriptionExpressionType)
          The constructor of the class.
 
Method Summary
 boolean evaluateCriteria(java.lang.String aCriteria, java.lang.String aSubscriptionID)
          The evaluateCriteria Method This mehtod evaluates to see if the message has to be sent to the sink
 java.lang.String getXSLQueryResults(java.lang.String aSubscriptionID, java.lang.String aTxtMsg)
           
static boolean isDOMEmpty(javax.xml.transform.dom.DOMResult dom)
          The isDOMEmpty method.
 void receiveRegisterSubscriptionMessage(Message aMessage)
          The receiveRegisterSubscriotionMessage method.
 void receiveServiceDataChangeMessage(Message aMessage)
          The receiveServiceDataChangeMessage method.
 void receiveUnregisterSubscriptionMessage(Message aMessage)
          The receiveUnregisterSubscriptionMessage method.
 
Methods inherited from class org.globus.ogsa.impl.core.notification.framework.jms.JMSQueryEvaluator
formatNotifyMessage, getJMSAdapter, getSubscriptionInfo, publishNotifyMessage, publishRefreshServiceDataMessage, registerSubscription, unregisterSubscription
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JMSXSLQueryEvaluator

public JMSXSLQueryEvaluator(java.lang.String aSubscriptionExpressionType)
                     throws java.lang.Exception
The constructor of the class.

Parameters:
aSubscriptionExpressionType - - The expressionType used to create the query evaluator.
Throws:
java.lang.Exception - if the class can not be initialized.
Method Detail

evaluateCriteria

public boolean evaluateCriteria(java.lang.String aCriteria,
                                java.lang.String aSubscriptionID)
The evaluateCriteria Method This mehtod evaluates to see if the message has to be sent to the sink

Parameters:
aCriteria - - The subscription expression to be evaluated
aSubscriptionID - - The Subscription ID
Returns:
boolean --true, if message is to be sent to the sink --false, if message is not to be sent to the sink

receiveServiceDataChangeMessage

public void receiveServiceDataChangeMessage(Message aMessage)
The receiveServiceDataChangeMessage method. This method is executed when there is a servide data change notification

Specified by:
receiveServiceDataChangeMessage in interface ServiceDataChangeMessageReceiver
Specified by:
receiveServiceDataChangeMessage in class JMSQueryEvaluator
Parameters:
aMessage - - The service data change message.

receiveRegisterSubscriptionMessage

public void receiveRegisterSubscriptionMessage(Message aMessage)
The receiveRegisterSubscriotionMessage method. This method is executed when there is a message to the Register Subscription topic.

Specified by:
receiveRegisterSubscriptionMessage in interface RegisterSubscriptionMessageReceiver
Specified by:
receiveRegisterSubscriptionMessage in class JMSQueryEvaluator
Parameters:
aMessage - - The register subscription message.

receiveUnregisterSubscriptionMessage

public void receiveUnregisterSubscriptionMessage(Message aMessage)
The receiveUnregisterSubscriptionMessage method. This method is executed when there is a message to the Unregister Subscription topic.

Specified by:
receiveUnregisterSubscriptionMessage in interface UnregisterSubscriptionMessageReceiver
Specified by:
receiveUnregisterSubscriptionMessage in class JMSQueryEvaluator
Parameters:
aMessage - - The unregister subscription message.

getXSLQueryResults

public java.lang.String getXSLQueryResults(java.lang.String aSubscriptionID,
                                           java.lang.String aTxtMsg)
                                    throws javax.xml.transform.TransformerException,
                                           javax.xml.transform.TransformerConfigurationException,
                                           javax.xml.parsers.ParserConfigurationException,
                                           org.xml.sax.SAXException,
                                           java.lang.Exception
Parameters:
aSubscriptionID - - the subsription id.
aTxtMsg - - The message to be evaluated.
Returns:
String a formatted message based on the XSL criteria provided by the subcriber which may be published to the notify topic or null if message should not be published
Throws:
TranformerException
javax.xml.transform.TransformerConfigurationException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.lang.Exception
javax.xml.transform.TransformerException

isDOMEmpty

public static boolean isDOMEmpty(javax.xml.transform.dom.DOMResult dom)
The isDOMEmpty method. This method checks the given DOM object to see if it is empty.

Parameters:
dom - - The DOM structure
Returns:
true if contains no elements false otherwise