Class PatternStream

All Implemented Interfaces:
Serializable

public class PatternStream extends ProjectedStream
A stream of events that is generated by pattern matches.

Patterns matches are events that match pattern expressions. Pattern expressions are built using Patterns.

See Also:
  • Constructor Details

    • PatternStream

      public PatternStream()
      Ctor.
    • PatternStream

      public PatternStream(PatternExpr expression)
      Ctor.
      Parameters:
      expression - pattern expression
    • PatternStream

      public PatternStream(PatternExpr expression, String optStreamName)
      Ctor.
      Parameters:
      expression - pattern expression
      optStreamName - is the pattern stream name (as-name)
    • PatternStream

      public PatternStream(PatternExpr expression, String optStreamName, AnnotationPart[] annotations)
      Ctor.
      Parameters:
      expression - pattern expression
      optStreamName - is the pattern stream name (as-name)
      annotations - annotations on pattern-level, if any
  • Method Details

    • create

      public static PatternStream create(PatternExpr expression)
      Creates a pattern stream from a pattern expression.
      Parameters:
      expression - pattern expression
      Returns:
      stream
    • create

      public static PatternStream create(PatternExpr expression, String optStreamName)
      Creates a named pattern stream from a pattern expression.
      Parameters:
      expression - pattern expression
      optStreamName - is the pattern stream name (as-name)
      Returns:
      stream
    • getExpression

      public PatternExpr getExpression()
      Returns the pattern expression providing events to the stream.
      Returns:
      pattern expression
    • setExpression

      public void setExpression(PatternExpr expression)
      Sets the pattern expression providing events to the stream.
      Parameters:
      expression - is the pattern expression
    • getAnnotations

      public AnnotationPart[] getAnnotations()
      Returns the pattern-level annotations, if any
      Returns:
      pattern-level annotations
    • setAnnotations

      public void setAnnotations(AnnotationPart[] annotations)
      Sets the pattern-level annotations, if any
      Parameters:
      annotations - pattern-level annotations
    • toEPLProjectedStream

      public void toEPLProjectedStream(StringWriter writer, EPStatementFormatter formatter)
      Description copied from class: ProjectedStream
      Represent as textual.
      Specified by:
      toEPLProjectedStream in class ProjectedStream
      Parameters:
      writer - to output to
      formatter - for newline-whitespace formatting
    • toEPLProjectedStreamType

      public void toEPLProjectedStreamType(StringWriter writer)
      Description copied from class: ProjectedStream
      Represent type as textual non complete.
      Specified by:
      toEPLProjectedStreamType in class ProjectedStream
      Parameters:
      writer - to output to