org.globus.mds.trigger.impl
Class TriggerResource

java.lang.Object
  extended byorg.globus.mds.aggregator.impl.AggregatorServiceGroupResource
      extended byorg.globus.mds.trigger.impl.TriggerResource
All Implemented Interfaces:
AggregatorSink, Resource, ResourceProperties, ServiceGroupRegistrationResource, ServiceGroupResource, TopicListAccessor

public class TriggerResource
extends AggregatorServiceGroupResource
implements AggregatorSink, TopicListAccessor

Implementation of a Trigger ServiceGroup resource. Each resource is also an aggregator sink, in order to match trigger rules against received data.


Nested Class Summary
 
Nested classes inherited from class org.globus.mds.aggregator.impl.AggregatorServiceGroupResource
 
Field Summary
private  java.lang.String baseDir
           
static javax.xml.namespace.QName FIRE_COUNT_RP
           
(package private)  org.globus.mds.usefulrp.AccumulatorResourceProperty fireCountRP
           
private  int fooctr
           
private static org.globus.util.I18n i18n
           
private static org.apache.commons.logging.Log logger
           
private  ResourcePropertySet propSet
           
private  ResourceKey resourceKey
           
static javax.xml.namespace.QName RP_SET
           
private  java.lang.String[] strings
           
protected  java.util.Calendar terminationTime
           
private  TopicList topicList
           
private  TriggerConfiguration triggerConfig
           
static javax.xml.namespace.QName TRIGGERSTATUS
           
private  java.util.Hashtable triggerTable
           
 
Fields inherited from class org.globus.mds.aggregator.impl.AggregatorServiceGroupResource
DEFAULT_SWEEP_PERIOD, REGISTRATION_COUNT_RP
 
Constructor Summary
TriggerResource()
           
 
Method Summary
private  void collectNamespaces(org.w3c.dom.Node node, java.util.Map namespaces, java.util.Map prefixes)
           
private  org.w3c.dom.Document createErrorDocument(java.lang.String error)
           
 void deliver(org.apache.axis.encoding.AnyContentType messageObj, AggregatorServiceGroupEntryResource entry)
          Takes delivery of a message from an AggregatorSource and applies the appropriate rules to it.
 org.w3c.dom.Document evaluateXPath(org.w3c.dom.Document inputDoc, java.lang.String xPathExpression)
           
private static java.lang.String getBaseDirectory()
           
 java.util.Calendar getCurrentTime()
           
 ResourceKey getResourceKey()
           
 AggregatorSource getSource()
           
 java.util.Calendar getTerminationTime()
           
 TopicList getTopicList()
           
 TriggerConfiguration getTriggerConfiguration()
           
 void initialize(java.lang.Object parameters)
           
(package private)  org.w3c.dom.Element runAction(TriggerRuleType rule, org.apache.axis.encoding.AnyContentType message, AggregatorServiceGroupEntryResource entry, AggregatorConfig config)
          Performs the appropriate action.
private  void setNamespaces(org.w3c.dom.Element node, java.util.Map namespaces)
           
 void setResourceKey(ResourceKey k)
          Used to inform the resource of its key.
 void setSource(AggregatorSource source)
           
 void setTerminationTime(java.util.Calendar time)
           
 void terminate()
           
 
Methods inherited from class org.globus.mds.aggregator.impl.AggregatorServiceGroupResource
addAggregatorSource, getConfiguration, getKey, getResourcePropertySet, init, iterateEntryKeys, iterateEntryValues, loadCompatibleSources, notifyChange, serviceGroupAdd, setVersion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static org.apache.commons.logging.Log logger

resourceKey

private ResourceKey resourceKey

RP_SET

public static final javax.xml.namespace.QName RP_SET

TRIGGERSTATUS

public static final javax.xml.namespace.QName TRIGGERSTATUS

FIRE_COUNT_RP

public static final javax.xml.namespace.QName FIRE_COUNT_RP

i18n

private static org.globus.util.I18n i18n

terminationTime

protected java.util.Calendar terminationTime

triggerTable

private java.util.Hashtable triggerTable

propSet

private ResourcePropertySet propSet

topicList

private TopicList topicList

strings

private java.lang.String[] strings

fooctr

private int fooctr

triggerConfig

private TriggerConfiguration triggerConfig

baseDir

private java.lang.String baseDir

fireCountRP

org.globus.mds.usefulrp.AccumulatorResourceProperty fireCountRP
Constructor Detail

TriggerResource

public TriggerResource()
Method Detail

getTriggerConfiguration

public TriggerConfiguration getTriggerConfiguration()

setResourceKey

public void setResourceKey(ResourceKey k)
                    throws java.lang.Exception
Used to inform the resource of its key.

Throws:
java.lang.Exception

getResourceKey

public ResourceKey getResourceKey()

setTerminationTime

public void setTerminationTime(java.util.Calendar time)

getTerminationTime

public java.util.Calendar getTerminationTime()

getCurrentTime

public java.util.Calendar getCurrentTime()

getTopicList

public TopicList getTopicList()
Specified by:
getTopicList in interface TopicListAccessor

deliver

public void deliver(org.apache.axis.encoding.AnyContentType messageObj,
                    AggregatorServiceGroupEntryResource entry)
Takes delivery of a message from an AggregatorSource and applies the appropriate rules to it.

Specified by:
deliver in interface AggregatorSink

evaluateXPath

public org.w3c.dom.Document evaluateXPath(org.w3c.dom.Document inputDoc,
                                          java.lang.String xPathExpression)
                                   throws java.lang.Exception
Throws:
java.lang.Exception

collectNamespaces

private void collectNamespaces(org.w3c.dom.Node node,
                               java.util.Map namespaces,
                               java.util.Map prefixes)

setNamespaces

private void setNamespaces(org.w3c.dom.Element node,
                           java.util.Map namespaces)

runAction

org.w3c.dom.Element runAction(TriggerRuleType rule,
                              org.apache.axis.encoding.AnyContentType message,
                              AggregatorServiceGroupEntryResource entry,
                              AggregatorConfig config)
Performs the appropriate action.


createErrorDocument

private org.w3c.dom.Document createErrorDocument(java.lang.String error)
                                          throws java.lang.Exception
Throws:
java.lang.Exception

getBaseDirectory

private static java.lang.String getBaseDirectory()

initialize

public void initialize(java.lang.Object parameters)
Specified by:
initialize in interface AggregatorSink

terminate

public void terminate()
Specified by:
terminate in interface AggregatorSink

setSource

public void setSource(AggregatorSource source)
Specified by:
setSource in interface AggregatorSink

getSource

public AggregatorSource getSource()
Specified by:
getSource in interface AggregatorSink