com.bea.wlevs.management.configuration
Interface EPLProcessorMBean


public interface EPLProcessorMBean
extends StageMBean

This MBean will manage instances of epl processor whose configuration has been derived from com.bea.wlevs.configuration.application.DefaultProcessorConfig schema. All the attributes and operations of this MBean wraps around this schema type.

An example of using this MBean is given below


  ObjectName eplName =
         ObjectName.getInstance("com.bea.wlevs:Name=myprocessor,Type=EPLProcessor,Application=myapplication");


  EPLProcessorMBean eplMBean = (EPLProcessorMBean)
         MBeanServerInvocationHandler.newProxyInstance(
                          mbsc,
                          ObjectName.getInstance(eplName),
                          EPLProcessorMBean.class,
                          true);

  Map rules =  eplMBean.getAllRules();

  //other operations
     ...
     ...
 


Field Summary
static java.lang.String MBEAN_TYPE
           
 
Method Summary
 void addDatabase(java.lang.String databaseName, java.lang.String datasourceName)
          This method add a database to this processor's configuration.
 void addParams(java.lang.String ruleId, java.lang.String values)
          This method adds a new set of unnamed parameter values to be bound against a parameterized query.
 void addParams(java.lang.String ruleId, java.lang.String values, java.lang.String paramsName)
          This method adds a new set or replaces an existing set of named parameter values to be bound against a parameterized query.
 java.lang.String addRule(java.lang.String query)
          This method will add an EPL rule to the designated EPL Processor.
 void addRule(java.lang.String id, java.lang.String query)
          This method will add an EPL rule with a name to the designated EPL Processor.
 java.util.Map addRules(java.util.Map rules)
          This method adds a set of EPL queries to the designated EPL Processor.
 void deleteAllRules()
          This methods deletes all rules that has been configured in the EPL Processor.
 void deleteDatabase(java.lang.String databaseName)
          This method delete a database from this processor's configuration.
 void deleteParams(java.lang.String ruleId)
          This method deletes all parameter values for the parameterized query identified by the ruleId argument.
 void deleteParams(java.lang.String ruleId, java.lang.String paramsName)
          This method deletes the named set of parameter values for the parameterized query identified by the ruleId argument.
 void deleteRule(java.lang.String id)
          This method deletes a rule from the EPL Processor with the given rule id.
 void deleteRules(java.lang.String[] ids)
          This method deletes all rules with the given ids.
 java.lang.String downloadRules()
          This method returns in XML format all rules and any parameter values associated with parameterized queries in the designated EPL Proessor.
 java.util.Map getAllRules()
          This method fetches all the rules that has been configured in the designated EPL Proessor.
 java.util.Map getDatabases()
          This method retrieve the databases configured with this processor.
 java.lang.String[] getParams(java.lang.String ruleId)
          This method retrieves all parameter values for a parameterized query identified by the ruleId argument.
 java.lang.String getParams(java.lang.String ruleId, java.lang.String paramsName)
          This method retrieves the set of parameter values with the given name for a parameterized query identified by the ruleId argument.
 int getParamsCount(java.lang.String ruleId)
          This method returns the number of parameters which must be bound for the rule identified by the ruleId argument.
 java.lang.String getRule(java.lang.String id)
          This method fetches a rule with the given id.
 java.util.Map getRules(java.lang.String[] ids)
          This method fetches the rules for ids that are in the array.
 void replaceParams(java.lang.String ruleId, java.lang.String[] values)
          This method replaces all parameter values for a parameterized query identified by the ruleId argument with the parameter values provided.
 void replaceParams(java.lang.String ruleId, java.lang.String[] values, java.lang.String[] paramsNames)
          This method replaces all parameter values for a parameterized query identified by the ruleId argument.
 void replaceRule(java.lang.String id, java.lang.String query)
          This method will replace an existing EPL rule by another rule.
 java.util.Map replaceRules(java.util.Map rules)
          This method will replace several existing EPL rules.
 java.util.Map uploadRules(java.util.Map rules)
          This method uploads a collection of EPL queries to the designated EPL processor.
 java.util.Map uploadRules(java.lang.String configXML)
          This method uploads a collection of EPL queries and associated parameter value bindings to the designated EPL processor.
 
Methods inherited from interface com.bea.wlevs.management.configuration.StageMBean
configurePlayback, configurePlaybackWithDuration, configureRecord, configureRecordWithDuration, getPlaybackConfiguration, getRecordConfiguration, isPlayingBack, isRecording, startPlayback, startRecording, stopPlayback, stopRecording
 
Methods inherited from interface com.bea.wlevs.management.WebLogicMBean
getName, getObjectName, getType
 
Methods inherited from interface javax.management.NotificationEmitter
removeNotificationListener
 
Methods inherited from interface javax.management.NotificationBroadcaster
addNotificationListener, getNotificationInfo, removeNotificationListener
 

Field Detail

MBEAN_TYPE

public static final java.lang.String MBEAN_TYPE
Method Detail

addRule

public java.lang.String addRule(java.lang.String query)
                         throws javax.management.JMException
This method will add an EPL rule to the designated EPL Processor.

Parameters:
query - - An epl rule
Returns:
- rule name - The name of the rule will be generated and returned
Throws:
javax.management.JMException -  

addRule

public void addRule(java.lang.String id,
                    java.lang.String query)
             throws javax.management.JMException
This method will add an EPL rule with a name to the designated EPL Processor.

Parameters:
id- - A String which has the name of the query
query- - A String representing a query in EPL Syntax
Throws:
javax.management.OperationsException - - if rule with the same id already exists

addRules

public java.util.Map addRules(java.util.Map rules)
                       throws javax.management.JMException
This method adds a set of EPL queries to the designated EPL Processor.

Parameters:
rules - - A Map containg the queries with their names.
Returns:
- A Map of queries that was added successfully. If the name of the query was not provided the return Map will have the auto-generated name of the query.
Throws:
javax.management.OperationsException - - if rule with the same id already exists

replaceRule

public void replaceRule(java.lang.String id,
                        java.lang.String query)
                 throws javax.management.JMException
This method will replace an existing EPL rule by another rule. The original rule will be destroyed, and the new one inserted in its place. If the original rule is parameterized, any existing bindings will be moved to the new rule.

Parameters:
id- - A String which has the name of the query
query- - A String representing a query in EPL Syntax
Throws:
javax.management.OperationsException - - if rule with the same id does not exist

replaceRules

public java.util.Map replaceRules(java.util.Map rules)
                           throws javax.management.JMException
This method will replace several existing EPL rules. The original rules will be destroyed, and the new ones inserted in their places. If the original rules are parameterized, any existing bindings will be moved to the new rules.

Parameters:
rules - - A Map containg the queries with their names.
Returns:
- A Map of queries that was added successfully. If the name of the query was not provided the return Map will have the auto-generated name of the query.
Throws:
javax.management.OperationsException - - if rule with the same id does not exist

uploadRules

public java.util.Map uploadRules(java.util.Map rules)
                          throws javax.management.JMException
This method uploads a collection of EPL queries to the designated EPL processor. The queries uploaded will completely replace existing rules.

Parameters:
rules - - A Map containing queries with their names
Returns:
- A Map of queries that was uploaded successfully.
Throws:
javax.management.JMException -  

uploadRules

public java.util.Map uploadRules(java.lang.String configXML)
                          throws javax.management.JMException
This method uploads a collection of EPL queries and associated parameter value bindings to the designated EPL processor. The queries and bindings uploaded will completely replace existing rules and bindings. The XML must be valid against the schema of the processor configuration.

Parameters:
configXML - - A String in XML format of all all rules and associated parameter bindings valid against the processor configuration schema.
Returns:
- The map of queries that was uploaded successfully.
Throws:
javax.management.JMException -  

downloadRules

public java.lang.String downloadRules()
                               throws javax.management.JMException
This method returns in XML format all rules and any parameter values associated with parameterized queries in the designated EPL Proessor.

Returns:
- A String in XML format of all rules and parameter value bindings.
Throws:
javax.management.JMException -  

getRule

public java.lang.String getRule(java.lang.String id)
                         throws javax.management.JMException
This method fetches a rule with the given id.

Parameters:
id - - A string which represents the id of the rule
Returns:
 
Throws:
javax.management.JMException -  

getRules

public java.util.Map getRules(java.lang.String[] ids)
                       throws javax.management.JMException
This method fetches the rules for ids that are in the array.

Parameters:
ids - - An array of rule ids.
Returns:
- A Map containing the ruleids and rules.
Throws:
javax.management.JMException -  

getAllRules

public java.util.Map getAllRules()
                          throws javax.management.JMException
This method fetches all the rules that has been configured in the designated EPL Proessor.

Returns:
- A Map consisting of rules names and rules
Throws:
javax.management.JMException -  

deleteRule

public void deleteRule(java.lang.String id)
                throws javax.management.JMException
This method deletes a rule from the EPL Processor with the given rule id.

Parameters:
id- - A String which represents the rule-id
Throws:
javax.management.JMException -  

deleteRules

public void deleteRules(java.lang.String[] ids)
                 throws javax.management.JMException
This method deletes all rules with the given ids.

Parameters:
ids- - A String array of ids to be deleted from the EPL Processor
Throws:
javax.management.JMException -  

deleteAllRules

public void deleteAllRules()
                    throws javax.management.JMException
This methods deletes all rules that has been configured in the EPL Processor.

Throws:
javax.management.JMException -  

addParams

public void addParams(java.lang.String ruleId,
                      java.lang.String values,
                      java.lang.String paramsName)
               throws javax.management.JMException
This method adds a new set or replaces an existing set of named parameter values to be bound against a parameterized query. If a set of parameter values already exists for the parameterized query with the same name, then it will be replaced. Otherwise, a new set of parameter values will be added with the given name.

Parameters:
ruleId - identifier of parameterized query.
values - comma separated string of parameter values to bind against parameterized query.
paramsName - name for the set of parameter values.
Throws:
javax.management.JMException -  

addParams

public void addParams(java.lang.String ruleId,
                      java.lang.String values)
               throws javax.management.JMException
This method adds a new set of unnamed parameter values to be bound against a parameterized query. Without a name for the set of parameter values, individual retrieval and deletion is not possible.

Parameters:
ruleId - identifier of parameterized query.
values - comma separated string of parameter values to bind against parameterized query.
Throws:
javax.management.JMException -  

replaceParams

public void replaceParams(java.lang.String ruleId,
                          java.lang.String[] values,
                          java.lang.String[] paramsNames)
                   throws javax.management.JMException
This method replaces all parameter values for a parameterized query identified by the ruleId argument. The paramsNames argument specifies a parallel array of names for each set of parameter values where a null element causes the corresponding set of parameter values to be unnamed.

Parameters:
ruleId - identifier of parameterized query.
values - String array of comma separated parameter value sets to bind against parameterized query.
paramsNames - String array defining the identifier for each parameterized value set.
Throws:
javax.management.JMException -  

replaceParams

public void replaceParams(java.lang.String ruleId,
                          java.lang.String[] values)
                   throws javax.management.JMException
This method replaces all parameter values for a parameterized query identified by the ruleId argument with the parameter values provided. The parameter values will be unnamed.

Parameters:
ruleId - identifier of parameterized query.
values - String array of comma separated parameter value sets to bind against parameterized query.
Throws:
javax.management.JMException -  

deleteParams

public void deleteParams(java.lang.String ruleId,
                         java.lang.String paramsName)
                  throws javax.management.JMException
This method deletes the named set of parameter values for the parameterized query identified by the ruleId argument.

Parameters:
ruleId - identifier of parameterized query.
paramsName - name of parameter values.
Throws:
javax.management.JMException -  

deleteParams

public void deleteParams(java.lang.String ruleId)
                  throws javax.management.JMException
This method deletes all parameter values for the parameterized query identified by the ruleId argument.

Parameters:
ruleId - identifier of parameterized query.
Throws:
javax.management.JMException -  

getParams

public java.lang.String getParams(java.lang.String ruleId,
                                  java.lang.String paramsName)
                           throws javax.management.JMException
This method retrieves the set of parameter values with the given name for a parameterized query identified by the ruleId argument.

Parameters:
ruleId - identifier of parameterized query.
paramsName - name of parameter values.
Returns:
String of comma separated parameter values.
Throws:
javax.management.JMException -  

getParams

public java.lang.String[] getParams(java.lang.String ruleId)
                             throws javax.management.JMException
This method retrieves all parameter values for a parameterized query identified by the ruleId argument.

Parameters:
ruleId - identifier of parameterized query.
Returns:
String array of comma separated parameter values.
Throws:
javax.management.JMException -  

getParamsCount

public int getParamsCount(java.lang.String ruleId)
                   throws javax.management.JMException
This method returns the number of parameters which must be bound for the rule identified by the ruleId argument. If the rule is not parameterized, then a value of zero will be returned.

Parameters:
ruleId - A string which represents the id of the rule
Returns:
the number of parameters which must be bound or zero if the rule is not parameterized.
Throws:
javax.management.JMException -  

addDatabase

public void addDatabase(java.lang.String databaseName,
                        java.lang.String datasourceName)
                 throws javax.management.JMException
This method add a database to this processor's configuration.

Parameters:
databaseName - A string which represents the database name.
datasourceName - A string which represents a datasource name.
Throws:
javax.management.JMException -  

deleteDatabase

public void deleteDatabase(java.lang.String databaseName)
                    throws javax.management.JMException
This method delete a database from this processor's configuration.

Parameters:
databaseName - A string represents the database to be deleted.
Throws:
javax.management.JMException -  

getDatabases

public java.util.Map getDatabases()
                           throws javax.management.JMException
This method retrieve the databases configured with this processor.

Returns:
Key/value pairs of database names and datasource names. key--database name, value--datasource name.
Throws:
javax.management.JMException -  


Copyright © 2007 BEA Systems All Rights Reserved.