public class

EsperModule

extends Object
implements MuleContextAware
java.lang.Object
   ↳ org.mule.module.esper.EsperModule
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

A Mule Module for Esper, a GPL licensed complex event processing engine.

Summary

Fields
private String configuration The location of the Esper config file.
private EPServiceProvider esperServiceProvider
private Map<String, EPStatement> filterStatements
protected Log logger
private MuleContext muleContext
Public Constructors
EsperModule()
Public Methods
void connect()
void disconnect()
synchronized void filter(Object eventPayload, String statement, String key, SourceCallback afterChain)
Filters messages that match the supplied EPL query.
String getConfiguration()
void listen(String statement, SourceCallback callback)
Listens for events matching the specified query statement.
void send(Object eventPayload, String eventName)
Sends events to an Esper event stream.
void setConfiguration(String configuration)
void setMuleContext(MuleContext muleContext)
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.mule.api.context.MuleContextAware

Fields

private String configuration

The location of the Esper config file. All event types need to be defined here.

private EPServiceProvider esperServiceProvider

private Map<String, EPStatement> filterStatements

protected Log logger

private MuleContext muleContext

Public Constructors

public EsperModule ()

Public Methods

public void connect ()

Throws
ConnectionException

public void disconnect ()

public synchronized void filter (Object eventPayload, String statement, String key, SourceCallback afterChain)

Filters messages that match the supplied EPL query. The EPL query must return a Boolean value.

Parameters
eventPayload The event to be injected into the event stream. This is useful if your filter statement relies on the event being injected into the stream beforehand.
statement The EPL statement
key The key of the result to evaluate from the query
afterChain The SourceCallback

public String getConfiguration ()

public void listen (String statement, SourceCallback callback)

Listens for events matching the specified query statement.

Parameters
statement The Esper statement to select events from a stream.
callback The callback to be called when a message is received

public void send (Object eventPayload, String eventName)

Sends events to an Esper event stream.

Events can be Java objects, Maps or an XML Node. All event types must be registered in the Esper configuration.

Parameters
eventPayload The event to be injected into the event stream.
eventName The name of the event in the case of a Map payload.

public void setConfiguration (String configuration)

Parameters
configuration

public void setMuleContext (MuleContext muleContext)

Parameters
muleContext