EventStream inputStream = EventStreamProxy.getAuditProxy(agentInstanceContext.getStatementContext().getEngineURI(), agentInstanceContext.getEpStatementAgentInstanceHandle().getStatementHandle().getStatementName(), annotations, filterSpec, zeroDepthStream);
final EventStream eventStream = inputStream;
final String statementId = agentInstanceContext.getStatementContext().getStatementId();
FilterHandleCallback filterCallback;
if (filterSpec.getOptionalPropertyEvaluator() != null)
{
filterCallback = new FilterHandleCallback()
{
public String getStatementId()
{
return statementId;
}
public void matchFound(EventBean theEvent, Collection<FilterHandleCallback> allStmtMatches)
{
EventBean[] result = filterSpec.getOptionalPropertyEvaluator().getProperty(theEvent, agentInstanceContext);
if (result == null)
{
return;
}
eventStream.insert(result);
}
public boolean isSubSelect()
{
return isSubSelect;
}
};
}
else
{
filterCallback = new FilterHandleCallback()
{
public String getStatementId()
{
return statementId;
}