net.esper.client
Interface EPStatement

All Superinterfaces:
EPIterable, EPListenable
All Known Subinterfaces:
EPStatementSPI
All Known Implementing Classes:
EPStatementImpl

public interface EPStatement
extends EPListenable, EPIterable

Statement interface that provides methods to start, stop and destroy a statement as well as get statement information such as statement name, expression text and current state.

Statements have 3 states: STARTED, STOPPED and DESTROYED.

In started state, statements are actively evaluating event streams according to the statement expression. Started statements can be stopped and destroyed.

In stopped state, statements are inactive. Stopped statements can either be started, in which case they begin to actively evaluate event streams, or destroyed.

Destroyed statements have relinguished all statement resources and cannot be started or stopped.


Method Summary
 void destroy()
          Destroy the statement releasing all statement resources.
 String getName()
          Returns the statement name.
 EPStatementState getState()
          Returns the statement's current state.
 String getText()
          Returns the underlying expression text.
 void start()
          Start the statement.
 void stop()
          Stop the statement.
 
Methods inherited from interface net.esper.client.EPListenable
addListener, removeAllListeners, removeListener
 
Methods inherited from interface net.esper.client.EPIterable
getEventType, iterator
 

Method Detail

start

void start()
Start the statement.


stop

void stop()
Stop the statement.


destroy

void destroy()
Destroy the statement releasing all statement resources.

A destroyed statement cannot be started again.


getState

EPStatementState getState()
Returns the statement's current state.

Returns:
state enum

getText

String getText()
Returns the underlying expression text.

Returns:
expression text

getName

String getName()
Returns the statement name.

Returns:
statement name