com.espertech.esper.core
Class EPStatementStartMethod

java.lang.Object
  extended by com.espertech.esper.core.EPStatementStartMethod

public class EPStatementStartMethod
extends Object

Starts and provides the stop method for EPL statements.


Constructor Summary
EPStatementStartMethod(StatementSpecCompiled statementSpec, EPServicesContext services, StatementContext statementContext)
          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(boolean isNewStatement)
          Starts the EPL statement.
protected static void validateNodes(StatementSpecCompiled statementSpec, StatementContext statementContext, StreamTypeService typeService, ViewResourceDelegate viewResourceDelegate)
          Validate filter and join expression nodes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EPStatementStartMethod

public EPStatementStartMethod(StatementSpecCompiled statementSpec,
                              EPServicesContext services,
                              StatementContext statementContext)
Ctor.

Parameters:
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.
services - is the service instances for dependency injection
statementContext - is statement-level information and statement services
Method Detail

start

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

Parameters:
isNewStatement - indicator whether the statement is new or a stop-restart 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

validateNodes

protected static void validateNodes(StatementSpecCompiled statementSpec,
                                    StatementContext statementContext,
                                    StreamTypeService typeService,
                                    ViewResourceDelegate viewResourceDelegate)
Validate filter and join expression nodes.

Parameters:
statementSpec - the compiled statement
statementContext - the statement services
typeService - the event types for streams
viewResourceDelegate - the delegate to verify expressions that use view resources

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