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(String expressionText, EventType eventType, DispatchService dispatchService, EventAdapterService eventAdapterService, EPPatternStmtStartMethod startMethod, ManagedReadWriteLock eventProcessingRWLock)
          Constructor.
 
Method Summary
 EventType getEventType()
          Returns the type of events the iterable returns.
 String getText()
          Returns the underlying expression text or XML.
 Iterator<EventBean> iterator()
          Returns an iterator over events.
 void matchFound(Map<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(String expressionText,
                              EventType eventType,
                              DispatchService dispatchService,
                              EventAdapterService eventAdapterService,
                              EPPatternStmtStartMethod startMethod,
                              ManagedReadWriteLock eventProcessingRWLock)
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
eventProcessingRWLock - - lock for statement create/start/stop across engine instance competing with events
Method Detail

matchFound

public void matchFound(Map<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

iterator

public 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 String getText()
Description copied from interface: EPStatement
Returns the underlying expression text or XML.

Specified by:
getText in interface EPStatement
Returns:
expression text