Class RuleSet

  • All Implemented Interfaces:
    java.io.Serializable

    public class RuleSet
    extends java.lang.Object
    implements java.io.Serializable
    Class RuleSet.
    Version:
    $Revision$ $Date$
    See Also:
    Serialized Form
    • Constructor Detail

      • RuleSet

        public RuleSet()
    • Method Detail

      • getAssertBehaviour

        public java.lang.String getAssertBehaviour()
      • setAssertBehaviour

        public void setAssertBehaviour​(java.lang.String assertBehaviour)
      • getEventProcessingMode

        public java.lang.String getEventProcessingMode()
      • setEventProcessingMode

        public void setEventProcessingMode​(java.lang.String eventProcessingMode)
      • getPersistState

        public java.lang.Boolean getPersistState()
      • setPersistState

        public void setPersistState​(java.lang.Boolean persistState)
      • addEvent

        public void addEvent​(java.lang.String vEvent)
                      throws java.lang.IndexOutOfBoundsException
        Parameters:
        vEvent -
        Throws:
        java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection
      • addEvent

        public void addEvent​(int index,
                             java.lang.String vEvent)
                      throws java.lang.IndexOutOfBoundsException
        Parameters:
        index -
        vEvent -
        Throws:
        java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection
      • addGlobal

        public void addGlobal​(Global vGlobal)
                       throws java.lang.IndexOutOfBoundsException
        Parameters:
        vGlobal -
        Throws:
        java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection
      • addGlobal

        public void addGlobal​(int index,
                              Global vGlobal)
                       throws java.lang.IndexOutOfBoundsException
        Parameters:
        index -
        vGlobal -
        Throws:
        java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection
      • addRuleFile

        public void addRuleFile​(java.lang.String vRuleFile)
                         throws java.lang.IndexOutOfBoundsException
        Parameters:
        vRuleFile -
        Throws:
        java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection
      • addRuleFile

        public void addRuleFile​(int index,
                                java.lang.String vRuleFile)
                         throws java.lang.IndexOutOfBoundsException
        Parameters:
        index -
        vRuleFile -
        Throws:
        java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection
      • enumerateEvent

        public java.util.Enumeration<java.lang.String> enumerateEvent()
        Method enumerateEvent.
        Returns:
        an Enumeration over all possible elements of this collection
      • enumerateGlobal

        public java.util.Enumeration<Global> enumerateGlobal()
        Method enumerateGlobal.
        Returns:
        an Enumeration over all possible elements of this collection
      • enumerateRuleFile

        public java.util.Enumeration<java.lang.String> enumerateRuleFile()
        Method enumerateRuleFile.
        Returns:
        an Enumeration over all possible elements of this collection
      • getAppContext

        public java.lang.String getAppContext()
        Returns the value of field 'appContext'.
        Returns:
        the value of field 'AppContext'.
      • getEvent

        public java.lang.String getEvent​(int index)
                                  throws java.lang.IndexOutOfBoundsException
        Method getEvent.
        Parameters:
        index -
        Returns:
        the value of the String at the given index
        Throws:
        java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection
      • getEvent

        public java.lang.String[] getEvent()
        Method getEvent.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
      • getEventCollection

        public java.util.List<java.lang.String> getEventCollection()
        Method getEventCollection.Returns a reference to '_eventList'. No type checking is performed on any modifications to the Vector.
        Returns:
        a reference to the Vector backing this class
      • getEventCount

        public int getEventCount()
        Method getEventCount.
        Returns:
        the size of this collection
      • getGlobal

        public Global getGlobal​(int index)
                         throws java.lang.IndexOutOfBoundsException
        Method getGlobal.
        Parameters:
        index -
        Returns:
        the value of the Global at the given index
        Throws:
        java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection
      • getGlobal

        public Global[] getGlobal()
        Method getGlobal.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
      • getGlobalCollection

        public java.util.List<Global> getGlobalCollection()
        Method getGlobalCollection.Returns a reference to '_globalList'. No type checking is performed on any modifications to the Vector.
        Returns:
        a reference to the Vector backing this class
      • getGlobalCount

        public int getGlobalCount()
        Method getGlobalCount.
        Returns:
        the size of this collection
      • getName

        public java.lang.String getName()
        Returns the value of field 'name'.
        Returns:
        the value of field 'Name'.
      • getRuleFile

        public java.lang.String getRuleFile​(int index)
                                     throws java.lang.IndexOutOfBoundsException
        Method getRuleFile.
        Parameters:
        index -
        Returns:
        the value of the String at the given index
        Throws:
        java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection
      • getRuleFile

        public java.lang.String[] getRuleFile()
        Method getRuleFile.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
      • getRuleFileCollection

        public java.util.List<java.lang.String> getRuleFileCollection()
        Method getRuleFileCollection.Returns a reference to '_ruleFileList'. No type checking is performed on any modifications to the Vector.
        Returns:
        a reference to the Vector backing this class
      • getRuleFileCount

        public int getRuleFileCount()
        Method getRuleFileCount.
        Returns:
        the size of this collection
      • iterateEvent

        public java.util.Iterator<java.lang.String> iterateEvent()
        Method iterateEvent.
        Returns:
        an Iterator over all possible elements in this collection
      • iterateGlobal

        public java.util.Iterator<Global> iterateGlobal()
        Method iterateGlobal.
        Returns:
        an Iterator over all possible elements in this collection
      • iterateRuleFile

        public java.util.Iterator<java.lang.String> iterateRuleFile()
        Method iterateRuleFile.
        Returns:
        an Iterator over all possible elements in this collection
      • removeAllEvent

        public void removeAllEvent()
      • removeAllGlobal

        public void removeAllGlobal()
      • removeAllRuleFile

        public void removeAllRuleFile()
      • removeEvent

        public boolean removeEvent​(java.lang.String vEvent)
        Method removeEvent.
        Parameters:
        vEvent -
        Returns:
        true if the object was removed from the collection.
      • removeEventAt

        public java.lang.String removeEventAt​(int index)
        Method removeEventAt.
        Parameters:
        index -
        Returns:
        the element removed from the collection
      • removeGlobal

        public boolean removeGlobal​(Global vGlobal)
        Method removeGlobal.
        Parameters:
        vGlobal -
        Returns:
        true if the object was removed from the collection.
      • removeGlobalAt

        public Global removeGlobalAt​(int index)
        Method removeGlobalAt.
        Parameters:
        index -
        Returns:
        the element removed from the collection
      • removeRuleFile

        public boolean removeRuleFile​(java.lang.String vRuleFile)
        Method removeRuleFile.
        Parameters:
        vRuleFile -
        Returns:
        true if the object was removed from the collection.
      • removeRuleFileAt

        public java.lang.String removeRuleFileAt​(int index)
        Method removeRuleFileAt.
        Parameters:
        index -
        Returns:
        the element removed from the collection
      • setAppContext

        public void setAppContext​(java.lang.String appContext)
        Sets the value of field 'appContext'.
        Parameters:
        appContext - the value of field 'appContext'.
      • setEvent

        public void setEvent​(int index,
                             java.lang.String vEvent)
                      throws java.lang.IndexOutOfBoundsException
        Parameters:
        index -
        vEvent -
        Throws:
        java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection
      • setEvent

        public void setEvent​(java.lang.String[] vEventArray)
        Parameters:
        vEventArray -
      • setEvent

        public void setEvent​(java.util.List<java.lang.String> vEventList)
        Sets the value of '_eventList' by copying the given Vector. All elements will be checked for type safety.
        Parameters:
        vEventList - the Vector to copy.
      • setEventCollection

        public void setEventCollection​(java.util.List<java.lang.String> eventList)
        Deprecated.
        Sets the value of '_eventList' by setting it to the given Vector. No type checking is performed.
        Parameters:
        eventList - the Vector to set.
      • setGlobal

        public void setGlobal​(int index,
                              Global vGlobal)
                       throws java.lang.IndexOutOfBoundsException
        Parameters:
        index -
        vGlobal -
        Throws:
        java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection
      • setGlobal

        public void setGlobal​(Global[] vGlobalArray)
        Parameters:
        vGlobalArray -
      • setGlobal

        public void setGlobal​(java.util.List<Global> vGlobalList)
        Sets the value of '_globalList' by copying the given Vector. All elements will be checked for type safety.
        Parameters:
        vGlobalList - the Vector to copy.
      • setGlobalCollection

        public void setGlobalCollection​(java.util.List<Global> globalList)
        Deprecated.
        Sets the value of '_globalList' by setting it to the given Vector. No type checking is performed.
        Parameters:
        globalList - the Vector to set.
      • setName

        public void setName​(java.lang.String name)
        Sets the value of field 'name'.
        Parameters:
        name - the value of field 'name'.
      • setRuleFile

        public void setRuleFile​(int index,
                                java.lang.String vRuleFile)
                         throws java.lang.IndexOutOfBoundsException
        Parameters:
        index -
        vRuleFile -
        Throws:
        java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection
      • setRuleFile

        public void setRuleFile​(java.lang.String[] vRuleFileArray)
        Parameters:
        vRuleFileArray -
      • setRuleFile

        public void setRuleFile​(java.util.List<java.lang.String> vRuleFileList)
        Sets the value of '_ruleFileList' by copying the given Vector. All elements will be checked for type safety.
        Parameters:
        vRuleFileList - the Vector to copy.
      • setRuleFileCollection

        public void setRuleFileCollection​(java.util.List<java.lang.String> ruleFileList)
        Deprecated.
        Sets the value of '_ruleFileList' by setting it to the given Vector. No type checking is performed.
        Parameters:
        ruleFileList - the Vector to set.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • constructEngine

        public CorrelationEngine constructEngine​(org.springframework.core.io.Resource basePath,
                                                 org.springframework.context.ApplicationContext appContext,
                                                 EventIpcManager eventIpcManager,
                                                 com.codahale.metrics.MetricRegistry metricRegistry)
      • getGlobals

        public java.util.Map<java.lang.String,​java.lang.Object> getGlobals​(org.springframework.context.ApplicationContext context)
      • getInterestingEvents

        public java.util.List<java.lang.String> getInterestingEvents()
      • getResource

        public org.springframework.core.io.Resource getResource​(org.springframework.core.io.ResourceLoader resourceLoader,
                                                                java.lang.String resourcePath)
      • getRuleResources

        public java.util.List<org.springframework.core.io.Resource> getRuleResources​(org.springframework.core.io.ResourceLoader resourceLoader)
      • getConfigLocation

        public java.lang.String getConfigLocation()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object