org.objectweb.cjdbc.controller.monitoring
Class SQLMonitoringRule

java.lang.Object
  extended byorg.objectweb.cjdbc.controller.monitoring.SQLMonitoringRule

public class SQLMonitoringRule
extends java.lang.Object

This class implements a SQL monitoring rule.

Version:
1.0
Author:
Emmanuel Cecchet

Field Summary
private  boolean applyToSkeleton
           
private  boolean isCaseSentive
           
private  boolean monitoring
           
private  org.apache.regexp.RE queryPattern
           
 
Constructor Summary
SQLMonitoringRule(java.lang.String queryPattern, boolean isCaseSentive, boolean applyToSkeleton, boolean monitoring)
          Creates a new SQL Monitoring rule
 
Method Summary
 java.lang.String getQueryPattern()
          Get query pattern
 java.lang.String getXml()
           
 boolean isApplyToSkeleton()
          If the pattern apply to the skeleton ot the instanciated query.
 boolean isCaseSentive()
          If matching is case sensitive or not
 boolean isMonitoring()
          If monitoring is activated or not.
 java.lang.String matches(AbstractRequest request)
          Returns true if the given query matches the pattern of this rule.
 void setApplyToSkeleton(boolean b)
          Set to true if the pattern apply to the query skeleton
 void setCaseSentive(boolean b)
          Set the matching case sensitiveness
 void setMonitoring(boolean b)
          Set the monitoring on or off
 void setQueryPattern(java.lang.String queryPattern)
          Sets the query pattern
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

queryPattern

private org.apache.regexp.RE queryPattern

isCaseSentive

private boolean isCaseSentive

applyToSkeleton

private boolean applyToSkeleton

monitoring

private boolean monitoring
Constructor Detail

SQLMonitoringRule

public SQLMonitoringRule(java.lang.String queryPattern,
                         boolean isCaseSentive,
                         boolean applyToSkeleton,
                         boolean monitoring)
Creates a new SQL Monitoring rule

Parameters:
queryPattern - the query pattern to match
isCaseSentive - true if matching is case sensitive
applyToSkeleton - true if matching applies to the query skeleton
monitoring - true if the request must be monitored
Method Detail

isCaseSentive

public boolean isCaseSentive()
If matching is case sensitive or not

Returns:
true if the matching is case sensitive

isMonitoring

public boolean isMonitoring()
If monitoring is activated or not.

Returns:
true if monitoring is activated for this pattern

getQueryPattern

public java.lang.String getQueryPattern()
Get query pattern

Returns:
the query pattern

setCaseSentive

public void setCaseSentive(boolean b)
Set the matching case sensitiveness

Parameters:
b - true if matching is case sensitive

setMonitoring

public void setMonitoring(boolean b)
Set the monitoring on or off

Parameters:
b - true if monitoring must be activated for this rule

setQueryPattern

public void setQueryPattern(java.lang.String queryPattern)
Sets the query pattern

Parameters:
queryPattern - the queryPattern

isApplyToSkeleton

public boolean isApplyToSkeleton()
If the pattern apply to the skeleton ot the instanciated query.

Returns:
true if the pattern apply to the query skeleton

setApplyToSkeleton

public void setApplyToSkeleton(boolean b)
Set to true if the pattern apply to the query skeleton

Parameters:
b - true if the pattern apply to the query skeleton

matches

public java.lang.String matches(AbstractRequest request)
Returns true if the given query matches the pattern of this rule. This function applies the applytoSkeleton rule.

Parameters:
request - the query
Returns:
the SQL that matches the rule or null if it does not match

getXml

public java.lang.String getXml()
See Also:
XmlComponent.getXml()


Copyright © 2002, 2005 - ObjectWeb Consortium - All Rights Reserved.