Class EngineConfiguration
- java.lang.Object
-
- org.opennms.netmgt.correlation.drools.config.EngineConfiguration
-
- All Implemented Interfaces:
java.io.Serializable
public class EngineConfiguration extends java.lang.Object implements java.io.Serializable
The top-level element of the drools-engine.xml configuration file.- Version:
- $Revision$ $Date$
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EngineConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addRuleSet(int index, RuleSet vRuleSet)
void
addRuleSet(RuleSet vRuleSet)
CorrelationEngine
constructEngine(org.springframework.core.io.Resource basePath, org.springframework.context.ApplicationContext appContext, EventIpcManager eventIpcManager, com.codahale.metrics.MetricRegistry metricRegistry, java.lang.String engineName)
CorrelationEngine[]
constructEngines(org.springframework.core.io.Resource basePath, org.springframework.context.ApplicationContext appContext, EventIpcManager eventIpcManager, com.codahale.metrics.MetricRegistry metricRegistry)
java.util.Enumeration<RuleSet>
enumerateRuleSet()
Method enumerateRuleSet.boolean
equals(java.lang.Object obj)
RuleSet[]
getRuleSet()
Method getRuleSet.Returns the contents of the collection in an Array.RuleSet
getRuleSet(int index)
Method getRuleSet.java.util.List<RuleSet>
getRuleSetCollection()
Method getRuleSetCollection.Returns a reference to '_ruleSetList'.int
getRuleSetCount()
Method getRuleSetCount.int
hashCode()
java.util.Iterator<RuleSet>
iterateRuleSet()
Method iterateRuleSet.void
removeAllRuleSet()
boolean
removeRuleSet(RuleSet vRuleSet)
Method removeRuleSet.RuleSet
removeRuleSetAt(int index)
Method removeRuleSetAt.void
setRuleSet(int index, RuleSet vRuleSet)
void
setRuleSet(java.util.List<RuleSet> vRuleSetList)
Sets the value of '_ruleSetList' by copying the given Vector.void
setRuleSet(RuleSet[] vRuleSetArray)
void
setRuleSetCollection(java.util.List<RuleSet> ruleSetList)
Deprecated.
-
-
-
Method Detail
-
addRuleSet
public void addRuleSet(RuleSet vRuleSet) throws java.lang.IndexOutOfBoundsException
- Parameters:
vRuleSet
-- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
addRuleSet
public void addRuleSet(int index, RuleSet vRuleSet) throws java.lang.IndexOutOfBoundsException
- Parameters:
index
-vRuleSet
-- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
enumerateRuleSet
public java.util.Enumeration<RuleSet> enumerateRuleSet()
Method enumerateRuleSet.- Returns:
- an Enumeration over all possible elements of this collection
-
getRuleSet
public RuleSet getRuleSet(int index) throws java.lang.IndexOutOfBoundsException
Method getRuleSet.- Parameters:
index
-- Returns:
- the value of the RuleSet at the given index
- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
getRuleSet
public RuleSet[] getRuleSet()
Method getRuleSet.Returns the contents of the collection in an Array.Note: Just in case the collection contents are changing in another thread, we pass a 0-length Array of the correct type into the API call. This way we know that the Array returned is of exactly the correct length.
- Returns:
- this collection as an Array
-
getRuleSetCollection
public java.util.List<RuleSet> getRuleSetCollection()
Method getRuleSetCollection.Returns a reference to '_ruleSetList'. No type checking is performed on any modifications to the Vector.- Returns:
- a reference to the Vector backing this class
-
getRuleSetCount
public int getRuleSetCount()
Method getRuleSetCount.- Returns:
- the size of this collection
-
iterateRuleSet
public java.util.Iterator<RuleSet> iterateRuleSet()
Method iterateRuleSet.- Returns:
- an Iterator over all possible elements in this collection
-
removeAllRuleSet
public void removeAllRuleSet()
-
removeRuleSet
public boolean removeRuleSet(RuleSet vRuleSet)
Method removeRuleSet.- Parameters:
vRuleSet
-- Returns:
- true if the object was removed from the collection.
-
removeRuleSetAt
public RuleSet removeRuleSetAt(int index)
Method removeRuleSetAt.- Parameters:
index
-- Returns:
- the element removed from the collection
-
setRuleSet
public void setRuleSet(int index, RuleSet vRuleSet) throws java.lang.IndexOutOfBoundsException
- Parameters:
index
-vRuleSet
-- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
setRuleSet
public void setRuleSet(RuleSet[] vRuleSetArray)
- Parameters:
vRuleSetArray
-
-
setRuleSet
public void setRuleSet(java.util.List<RuleSet> vRuleSetList)
Sets the value of '_ruleSetList' by copying the given Vector. All elements will be checked for type safety.- Parameters:
vRuleSetList
- the Vector to copy.
-
setRuleSetCollection
public void setRuleSetCollection(java.util.List<RuleSet> ruleSetList)
Deprecated.Sets the value of '_ruleSetList' by setting it to the given Vector. No type checking is performed.- Parameters:
ruleSetList
- the Vector to set.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
constructEngines
public CorrelationEngine[] constructEngines(org.springframework.core.io.Resource basePath, org.springframework.context.ApplicationContext appContext, EventIpcManager eventIpcManager, com.codahale.metrics.MetricRegistry metricRegistry)
-
constructEngine
public CorrelationEngine constructEngine(org.springframework.core.io.Resource basePath, org.springframework.context.ApplicationContext appContext, EventIpcManager eventIpcManager, com.codahale.metrics.MetricRegistry metricRegistry, java.lang.String engineName)
-
-