|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface EPStatement
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. |
Object |
getSubscriber()
Returns the current subscriber instance that receives statement results. |
String |
getText()
Returns the underlying expression text. |
long |
getTimeLastStateChange()
Returns the system time in milliseconds of when the statement last change state. |
boolean |
isDestroyed()
Returns true if the statement state is destroyed. |
boolean |
isStarted()
Returns true if the statement state is started. |
boolean |
isStopped()
Returns true if the statement state is stopped. |
void |
setSubscriber(Object subscriber)
Attaches a subscriber to receive statement results, or removes a previously set subscriber (by providing a null value). |
void |
start()
Start the statement. |
void |
stop()
Stop the statement. |
Methods inherited from interface com.espertech.esper.client.EPListenable |
---|
addListener, addListener, getStatementAwareListeners, getUpdateListeners, removeAllListeners, removeListener, removeListener |
Methods inherited from interface com.espertech.esper.client.EPIterable |
---|
getEventType, iterator, safeIterator |
Method Detail |
---|
void start()
void stop()
void destroy()
A destroyed statement cannot be started again.
EPStatementState getState()
boolean isStarted()
boolean isStopped()
boolean isDestroyed()
String getText()
String getName()
long getTimeLastStateChange()
void setSubscriber(Object subscriber) throws EPSubscriberException
subscriber
- to attach, or null to remove the previously set subscriber
EPSubscriberException
- if the subscriber does not provide the methods
needed to receive statement resultsObject getSubscriber()
EPSubscriberException
- if the subscriber does not provide the methods
needed to receive statement results
|
© 2007 EsperTech Inc. All rights reserved. Visit us at espertech.com |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |