Class MethodInvocationStream

java.lang.Object
com.espertech.esper.common.client.soda.Stream
com.espertech.esper.common.client.soda.MethodInvocationStream
All Implemented Interfaces:
Serializable

public class MethodInvocationStream extends Stream
An stream that polls from a method.
See Also:
  • Constructor Details

    • MethodInvocationStream

      public MethodInvocationStream()
      Ctor.
    • MethodInvocationStream

      public MethodInvocationStream(String className, String methodName, String optStreamName)
      Ctor.
      Parameters:
      className - is the name of the class providing the method
      methodName - is the name of the public static method
      optStreamName - is the optional as-name of the stream, or null if unnamed
  • Method Details

    • create

      public static MethodInvocationStream create(String className, String methodName)
      Creates a new method-invocation-based stream without parameters.
      Parameters:
      className - is the name of the class providing the method
      methodName - is the name of the public static method
      Returns:
      stream
    • create

      public static MethodInvocationStream create(String className, String methodName, String optStreamName)
      Creates a new method-invocation-based stream without parameters.
      Parameters:
      className - is the name of the class providing the method
      methodName - is the name of the public static method
      optStreamName - is the optional as-name of the stream, or null if unnamed
      Returns:
      stream
    • getClassName

      public String getClassName()
      Returns the name of the class providing the method.
      Returns:
      class name
    • setClassName

      public void setClassName(String className)
      Sets the name of the class providing the method.
      Parameters:
      className - class name
    • getMethodName

      public String getMethodName()
      Returns the name of the static method to invoke in the from-clause.
      Returns:
      method name
    • setMethodName

      public void setMethodName(String methodName)
      Sets the name of the static method to invoke in the from-clause.
      Parameters:
      methodName - method name
    • getParameterExpressions

      public List<Expression> getParameterExpressions()
      Returns a list of expressions that are parameters to the method.
      Returns:
      list of parameter expressions
    • setParameterExpressions

      public void setParameterExpressions(List<Expression> parameterExpressions)
      Sets a list of expressions that are parameters to the method.
      Parameters:
      parameterExpressions - list of parameter expressions
    • getOptionalEventTypeName

      public String getOptionalEventTypeName()
      Returns the optional event type name
      Returns:
      event type name name
    • setOptionalEventTypeName

      public void setOptionalEventTypeName(String optionalEventTypeName)
      Sets the optional event type name
      Parameters:
      optionalEventTypeName - event type name name
    • addParameter

      public MethodInvocationStream addParameter(Expression parameterExpression)
      Adds a parameters to the method invocation.
      Parameters:
      parameterExpression - is the expression to add
      Returns:
      stream
    • toEPLStream

      public void toEPLStream(StringWriter writer, EPStatementFormatter formatter)
      Description copied from class: Stream
      Renders the stream in textual representation.
      Specified by:
      toEPLStream in class Stream
      Parameters:
      writer - to output to
      formatter - for newline-whitespace formatting
    • toEPLStreamType

      public void toEPLStreamType(StringWriter writer)
      Description copied from class: Stream
      Renders the stream type under a non-complete textual representation for tool use
      Specified by:
      toEPLStreamType in class Stream
      Parameters:
      writer - to output to
    • toEPLStreamOptions

      public void toEPLStreamOptions(StringWriter writer)
      Description copied from class: Stream
      Renders the stream in textual representation any stream options, if present.
      Specified by:
      toEPLStreamOptions in class Stream
      Parameters:
      writer - to output to