com.espertech.esper.client.soda
Class MethodInvocationStream

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

public class MethodInvocationStream
extends Stream

An stream that polls from a method.

See Also:
Serialized Form

Constructor Summary
MethodInvocationStream(String className, String methodName, String optStreamName)
          Ctor.
 
Method Summary
 MethodInvocationStream addParameter(Expression parameterExpression)
          Adds a parameters to the method invocation.
static MethodInvocationStream create(String className, String methodName)
          Creates a new method-invocation-based stream without parameters.
static MethodInvocationStream create(String className, String methodName, String optStreamName)
          Creates a new method-invocation-based stream without parameters.
 String getClassName()
          Returns the name of the class providing the method.
 String getMethodName()
          Returns the name of the static method to invoke in the from-clause.
 List<Expression> getParameterExpressions()
          Returns a list of expressions that are parameters to the method.
 void setClassName(String className)
          Sets the name of the class providing the method.
 void setMethodName(String methodName)
          Sets the name of the static method to invoke in the from-clause.
 void setParameterExpressions(List<Expression> parameterExpressions)
          Sets a list of expressions that are parameters to the method.
 void toEPLStream(StringWriter writer)
          Renders the stream in textual representation.
 
Methods inherited from class com.espertech.esper.client.soda.Stream
getStreamName, setStreamName, toEPL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 Detail

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

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)
Description copied from class: Stream
Renders the stream in textual representation.

Specified by:
toEPLStream in class Stream
Parameters:
writer - to output to

© 2007 EsperTech Inc.
All rights reserved.
Visit us at espertech.com