net.esper.core
Class EPPatternStatementImpl

java.lang.Object
  extended by net.esper.core.EPStatementSupport
      extended by net.esper.core.EPPatternStatementImpl
All Implemented Interfaces:
EPIterable, EPListenable, EPStatement, PatternMatchCallback

public class EPPatternStatementImpl
extends EPStatementSupport
implements PatternMatchCallback, EPStatement

Statement for patterns.


Constructor Summary
EPPatternStatementImpl(java.lang.String expressionText, EventType eventType, DispatchService dispatchService, EventAdapterService eventAdapterService, EPPatternStmtStartMethod startMethod)
          Constructor.
 
Method Summary
 EventType getEventType()
          Returns the type of events the iterable returns.
 java.lang.String getText()
          Returns the underlying expression text or XML.
 java.util.Iterator<EventBean> iterator()
          Returns an iterator over events.
 void listenerStart()
          Called when the first listener is added.
 void listenerStop()
          Called when the last listener is removed.
 void matchFound(java.util.Map<java.lang.String,EventBean> matchEvent)
          Indicate matching events.
 void start()
          Start the statement.
 void stop()
          Stop the statement.
 
Methods inherited from class net.esper.core.EPStatementSupport
addListener, getListeners, removeAllListeners, removeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.esper.client.EPListenable
addListener, removeAllListeners, removeListener
 

Constructor Detail

EPPatternStatementImpl

public EPPatternStatementImpl(java.lang.String expressionText,
                              EventType eventType,
                              DispatchService dispatchService,
                              EventAdapterService eventAdapterService,
                              EPPatternStmtStartMethod startMethod)
Constructor.

Parameters:
expressionText - - expression
eventType - - event type of events the pattern will fire
dispatchService - - service for dispatching events
eventAdapterService - - service for generating events or event wrappers and types
startMethod - - method to start the pattern
Method Detail

matchFound

public void matchFound(java.util.Map<java.lang.String,EventBean> matchEvent)
Description copied from interface: PatternMatchCallback
Indicate matching events.

Specified by:
matchFound in interface PatternMatchCallback
Parameters:
matchEvent - contains a map of event tags and event objects

stop

public void stop()
Description copied from interface: EPStatement
Stop the statement.

Specified by:
stop in interface EPStatement

start

public void start()
Description copied from interface: EPStatement
Start the statement.

Specified by:
start in interface EPStatement

listenerStop

public void listenerStop()
Description copied from class: EPStatementSupport
Called when the last listener is removed.

Specified by:
listenerStop in class EPStatementSupport

listenerStart

public void listenerStart()
Description copied from class: EPStatementSupport
Called when the first listener is added.

Specified by:
listenerStart in class EPStatementSupport

iterator

public java.util.Iterator<EventBean> iterator()
Description copied from interface: EPIterable
Returns an iterator over events.

Specified by:
iterator in interface EPIterable
Returns:
event iterator

getEventType

public EventType getEventType()
Description copied from interface: EPIterable
Returns the type of events the iterable returns.

Specified by:
getEventType in interface EPIterable
Returns:
event type of events the iterator returns

getText

public java.lang.String getText()
Description copied from interface: EPStatement
Returns the underlying expression text or XML.

Specified by:
getText in interface EPStatement
Returns:
expression text