java.lang.Object
com.espertech.esper.common.client.module.Module
All Implemented Interfaces:
Serializable

public class Module extends Object implements Serializable
Represent a deployment unit consisting of deployment declarative information (module name, uses and imports) as well as EPL statements represented by ModuleItem. May have an additional user object and archive name and uri pointing to the module source attached.

The module URI gets initialized with the filename, resource or URL being read, however may be overridden and has not further meaning to the deployment.

The archive name and user object are opportunities to attach additional deployment information.

See Also:
  • Constructor Details

    • Module

      public Module(String name, String uri, Set<String> uses, Set<String> imports, List<ModuleItem> items, String moduleText)
      Ctor.
      Parameters:
      name - module name
      uri - module uri
      uses - names of modules that this module depends on
      imports - the Java class imports
      items - EPL statements
      moduleText - text of module
    • Module

      public Module()
      Ctor.
  • Method Details

    • getArchiveName

      public String getArchiveName()
      Returns the name of the archive this module originated from, or null if not applicable.
      Returns:
      archive name
    • setArchiveName

      public void setArchiveName(String archiveName)
      Set the name of the archive this module originated from, or null if not applicable.
      Parameters:
      archiveName - archive name
    • getModuleUserObjectCompileTime

      public Object getModuleUserObjectCompileTime()
      Returns the optional user object that may be attached to the module.
      Returns:
      user object
    • setModuleUserObjectCompileTime

      public void setModuleUserObjectCompileTime(Serializable moduleUserObjectCompileTime)
      Sets an optional user object that may be attached to the module.
      Parameters:
      moduleUserObjectCompileTime - user object
    • getName

      public String getName()
      Returns the module name, if provided.
      Returns:
      module name
    • setName

      public void setName(String name)
      Sets the module name or null if none provided.
      Parameters:
      name - module name
    • getUri

      public String getUri()
      Returns the module URI if provided.
      Returns:
      module URI
    • setUri

      public void setUri(String uri)
      Sets the module URI or null if none provided.
      Parameters:
      uri - of module
    • getUses

      public Set<String> getUses()
      Returns the dependencies the module may have on other modules.
      Returns:
      module dependencies
    • setUses

      public void setUses(Set<String> uses)
      Sets the dependencies the module may have on other modules.
      Parameters:
      uses - module dependencies
    • getItems

      public List<ModuleItem> getItems()
      Returns a list of statements (some may be comments only) that make up the module.
      Returns:
      statements
    • setItems

      public void setItems(List<ModuleItem> items)
      Sets a list of statements (some may be comments only) that make up the module.
      Parameters:
      items - statements
    • getImports

      public Set<String> getImports()
      Returns the imports defined by the module.
      Returns:
      module imports
    • setImports

      public void setImports(Set<String> imports)
      Sets the imports defined by the module.
      Parameters:
      imports - module imports
    • getModuleText

      public String getModuleText()
      Returns module text.
      Returns:
      text
    • setModuleText

      public void setModuleText(String moduleText)
      Sets module text.
      Parameters:
      moduleText - text to set
    • toString

      public String toString()
      Overrides:
      toString in class Object