|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opencredo.esper.EsperTemplate
public class EsperTemplate
The main workhorse of Esper. The template is configured with a set of statements that query the flow of events. Each statement is then associated with a number of listeners who will be notified when there is a result from the statement.
Once setup the template is then used to inform esper of any events of interest by calling sendEvent(Object).
| Constructor Summary | |
|---|---|
EsperTemplate()
|
|
| Method Summary | |
|---|---|
void |
addStatement(EsperStatement statement)
Adds an EsperStatement to the template. |
void |
cleanup()
Deallocated all resources associated with this template when it is finished with. |
com.espertech.esper.client.EPRuntime |
getEsperNativeRuntime()
Retrieve the configured esper native runtime. |
java.lang.String |
getName()
|
java.util.Set<EsperStatement> |
getStatements()
Return the currently configured and registered set of EsperStatement objects. |
void |
initialize()
Sets up and allocated all resources associated with this template prior to its use. |
void |
sendEvent(java.lang.Object event)
Instructs the template to send an event to Esper. |
void |
setConfiguration(org.springframework.core.io.Resource configuration)
Set the location of the XML Esper configuration resource. |
void |
setName(java.lang.String name)
Sets the name used to identify this template and its resources within Esper. |
void |
setStatements(java.util.Set<EsperStatement> statements)
Add a collection of EsperStatement to the template. |
void |
setUnmatchedListener(com.espertech.esper.client.UnmatchedListener unmatchedListener)
Specify the listener that should be notified of any unmatched events. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EsperTemplate()
| Method Detail |
|---|
public void setName(java.lang.String name)
EsperTemplateOperations
setName in interface EsperTemplateOperationsname - The name associated with this templatepublic java.lang.String getName()
public void setStatements(java.util.Set<EsperStatement> statements)
EsperTemplateOperationsEsperStatement to the template.
setStatements in interface EsperTemplateOperationspublic void setConfiguration(org.springframework.core.io.Resource configuration)
EsperTemplateOperations
setConfiguration in interface EsperTemplateOperationspublic void setUnmatchedListener(com.espertech.esper.client.UnmatchedListener unmatchedListener)
EsperTemplateOperations
setUnmatchedListener in interface EsperTemplateOperationsunmatchedListener - The listener that is notified of events that are not matchedpublic com.espertech.esper.client.EPRuntime getEsperNativeRuntime()
EsperTemplateOperations
getEsperNativeRuntime in interface EsperTemplateOperationspublic java.util.Set<EsperStatement> getStatements()
EsperTemplateOperationsEsperStatement objects.
getStatements in interface EsperTemplateOperationsEsperStatement objects.public void addStatement(EsperStatement statement)
EsperTemplateOperationsEsperStatement to the template.
addStatement in interface EsperTemplateOperationsstatement - The EsperStatement to add to the template.
public void sendEvent(java.lang.Object event)
throws InvalidEsperConfigurationException
EsperTemplateOperations
sendEvent in interface EsperTemplateOperationsevent - The event that Esper is to be informed of.
InvalidEsperConfigurationException - thrown if any runtime configuration problems occur
public void initialize()
throws InvalidEsperConfigurationException
EsperTemplateOperations
initialize in interface EsperTemplateOperationsInvalidEsperConfigurationException - thrown if any configuration errors have been madepublic void cleanup()
EsperTemplateOperations
cleanup in interface EsperTemplateOperations
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||