Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.wlevs.ede.api
Interface Processor

public interface Processor
extends Stage, EventSink

Processors filter, correlate, aggregate, and perform other event processing functions. These functions are specified in some high-level language other than Java, as determined by the returned URI.

Method Summary
`Statement` | `createStatement(String query)` Compile query using the supplied query string parameter.
`Statement` | `createStatement(String query, String queryId)` Compile query using the supplied query string parameter and query id.
`URI` | `getEPL()` Returns unique URI associated with a particular type of Processor.
`EventTypeRepository` | `getEventTypeRepository()` Returns repository for types defined within the application.
`StatementManager` | `getStatementManager()` Returns statement manager for accessing compiled statements defined for this processor.
`List` | `loadStatements(URL location)` Load queries from an XML document located at the specified URL.

Methods inherited from interface com.bea.wlevs.ede.api.EventSink
`onEvent`

Method Detail

### getEPL

    public URI getEPL()

  Returns unique URI associated with a particular type of Processor. This URI would match the type attribute value of the processor element when queries are loaded through a rules file. For example, an EPL Processor would return the following URI: "wlevs:epl".

  Returns:
    unique URI associated with a particular type of Processor.

### loadStatements

    public List loadStatements(URL location)
                        throws MultiStatementException

  Load queries from an XML document located at the specified URL. The schema for the XML document is located META-INF\processor.xsd in the EDE module of WLRT. For example:

          <processor xmlns="http://www.bea.com/ns/wlevs/epl" type="wlevs:epl">
             <rules>
                <rule id="rule1"><![CDATA[
                   select stockSymbol, perc(price) as percentage
                   from StockTick(stockSymbol='BEAS').win:length(2)
                   having perc(price) > 10.0 or perc(price) < -10.0
                ]]></rule>
                <rule id="rule2"><![CDATA[
                   select stockSymbol, perc(price) as percentage
                   from StockTick(stockSymbol='IBM').win:length(2)
                   having perc(price) > 10.0 or perc(price) < -10.0
                ]]></rule>
             </rules>
          </processor>

  Parameters:
    `location` - URL location of queries
  Throws:
    com.bea.wlevs.ede.MultiStatementException - aggregation of any exceptions that occur during query compilation.

### createStatement

    public Statement createStatement(String query)
                              throws StatementException

  Compile query using the supplied query string parameter. A query id will be generated in this case.

  Parameters:
    `query` - query string to compile
  Throws:
    com.bea.wlevs.ede.StatementException - if exception occurs during query compilation.

### createStatement

    public Statement createStatement(String query,
                                     String queryId)
                              throws StatementException

  Compile query using the supplied query string parameter and query id. The query id must be unique for this processor.

  Parameters:
    `query` - query string to compile
    `queryId` - ID for query unique over this procesor
  Throws:
    StatementException - if exception occurs during query compilation.

### getEventTypeRepository

    public EventTypeRepository getEventTypeRepository()

  Returns repository for types defined within the application.

  Returns:
    EventTypeRepository for types defined within the application.

### getStatementManager

    public StatementManager getStatementManager()

  Returns statement manager for accessing compiled statements defined for this processor.

  Returns:
    StatementManager for accessing compiled statements defined for this processor.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD