net.esper.core
Class EPStatementStartMethod

java.lang.Object
  extended by net.esper.core.EPStatementStartMethod

public class EPStatementStartMethod
extends Object

Starts and provides the stop method for EQL statements.


Constructor Summary
EPStatementStartMethod(String statementId, String statementName, StatementSpecCompiled statementSpec, String eqlStatement, EPServicesContext services, EPStatementHandle epStatementHandle)
          Ctor.
 
Method Summary
protected static String[] determineStreamNames(List<StreamSpecCompiled> streams)
          Returns a stream name assigned for each stream, generated if none was supplied.
 Pair<Viewable,EPStatementStopMethod> start()
          Starts the EQL statement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EPStatementStartMethod

public EPStatementStartMethod(String statementId,
                              String statementName,
                              StatementSpecCompiled statementSpec,
                              String eqlStatement,
                              EPServicesContext services,
                              EPStatementHandle epStatementHandle)
Ctor.

Parameters:
statementId - is the statement is assigned to the statement
statementName - is the statement name assigned
statementSpec - is a container for the definition of all statement constructs that may have been used in the statement, i.e. if defines the select clauses, insert into, outer joins etc.
eqlStatement - is the expression text
services - is the service instances for dependency injection
epStatementHandle - is the statements-own handle for use in registering callbacks with services
Method Detail

start

public Pair<Viewable,EPStatementStopMethod> start()
                                           throws ExprValidationException,
                                                  ViewProcessingException
Starts the EQL statement.

Returns:
a viewable to attach to for listening to events, and a stop method to invoke to clean up
Throws:
ExprValidationException - when the expression validation fails
ViewProcessingException - when views cannot be started

determineStreamNames

protected static String[] determineStreamNames(List<StreamSpecCompiled> streams)
Returns a stream name assigned for each stream, generated if none was supplied.

Parameters:
streams - - stream specifications
Returns:
array of stream names