|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.esper.core.EPStatementImpl
public class EPStatementImpl
Statement implementation for EQL statements.
Constructor Summary | |
---|---|
EPStatementImpl(String statementId,
String statementName,
String expressionText,
boolean isPattern,
DispatchService dispatchService,
StatementLifecycleSvc statementLifecycleSvc)
Ctor. |
Method Summary | |
---|---|
void |
addListener(UpdateListener listener)
Add a listener to the statement. |
void |
destroy()
Destroy the statement releasing all statement resources. |
EventType |
getEventType()
Returns the type of events the iterable returns. |
Set<UpdateListener> |
getListeners()
Returns the set of listeners to the statement. |
String |
getName()
Returns the statement name. |
EPStatementState |
getState()
Returns the statement's current state. |
String |
getStatementId()
Returns the statement id. |
String |
getText()
Returns the underlying expression text. |
Iterator<EventBean> |
iterator()
Returns an iterator over events. |
void |
removeAllListeners()
Remove all listeners to a statement. |
void |
removeListener(UpdateListener listener)
Remove a listeners to a statement. |
void |
setCurrentState(EPStatementState currentState)
Set statement state. |
void |
setListeners(Set<UpdateListener> listeners)
Sets the statement listeners. |
void |
setParentView(Viewable viewable)
Sets the parent view. |
void |
start()
Start the statement. |
void |
stop()
Stop the statement. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EPStatementImpl(String statementId, String statementName, String expressionText, boolean isPattern, DispatchService dispatchService, StatementLifecycleSvc statementLifecycleSvc)
statementId
- is a unique ID assigned by the engine for the statementstatementName
- is the statement name assigned during creation, or the statement id if none was assignedexpressionText
- is the EQL and/or pattern expressionisPattern
- is true to indicate this is a pure pattern expressiondispatchService
- for dispatching events to listeners to the statementstatementLifecycleSvc
- handles lifecycle transitions for the statementMethod Detail |
---|
public String getStatementId()
EPStatementSPI
getStatementId
in interface EPStatementSPI
public void start()
EPStatement
start
in interface EPStatement
public void stop()
EPStatement
stop
in interface EPStatement
public void destroy()
EPStatement
A destroyed statement cannot be started again.
destroy
in interface EPStatement
public EPStatementState getState()
EPStatement
getState
in interface EPStatement
public void setCurrentState(EPStatementState currentState)
EPStatementSPI
setCurrentState
in interface EPStatementSPI
currentState
- new current statepublic void setParentView(Viewable viewable)
EPStatementSPI
setParentView
in interface EPStatementSPI
viewable
- is the statement viewablepublic String getText()
EPStatement
getText
in interface EPStatement
public String getName()
EPStatement
getName
in interface EPStatement
public Iterator<EventBean> iterator()
EPIterable
iterator
in interface EPIterable
public EventType getEventType()
EPIterable
getEventType
in interface EPIterable
public Set<UpdateListener> getListeners()
getListeners
in interface EPStatementSPI
public void setListeners(Set<UpdateListener> listeners)
EPStatementSPI
Care must be taken in the use of this method as unsynchronized modification to the listeners of a statement can yield problems.
setListeners
in interface EPStatementSPI
listeners
- setpublic void addListener(UpdateListener listener)
addListener
in interface EPListenable
listener
- to addpublic void removeListener(UpdateListener listener)
removeListener
in interface EPListenable
listener
- to removepublic void removeAllListeners()
removeAllListeners
in interface EPListenable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |