org.globus.mds.trigger.impl
Class TriggerResource
java.lang.Object
org.globus.mds.aggregator.impl.AggregatorServiceGroupResource
org.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.
| 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 |
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
TriggerResource
public TriggerResource()
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.
- TODO: feed in something on stdin (XPATH transformed XML)
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