Nitido Inc.

com.nitido.nimbox.http.enhanced
Class Expression

java.lang.Object
  extended by com.nitido.nimbox.http.enhanced.Expression

public class Expression
extends java.lang.Object

Data object for expression. An expression must contain httpheader, relation and matchHolder.for the given type. Expression is a complex element from rules file. Snippet from XML schema: Sample from a rules.xml file User-Agent startswith windows The above expression translated: if the User-Agent Http header from request starts with windows then the expression is true.


Constructor Summary
Expression(java.lang.String httpHeader, java.lang.String relation, java.lang.String matchHolder)
          Default constructor.
 
Method Summary
 java.lang.String getHttpHeader()
          Get httpHeader field of expression.
 java.lang.String getMatchHolder()
          Get matchHolder field of expression.
 java.lang.String getRelation()
          Get relation field of expression.
 java.lang.String toDebugString()
          This method convert the information into string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Expression

public Expression(java.lang.String httpHeader,
                  java.lang.String relation,
                  java.lang.String matchHolder)
Default constructor.

Parameters:
httpHeader - A string for http header
relation - A string for the relation
matchHolder - A string for the match holder
Method Detail

getHttpHeader

public java.lang.String getHttpHeader()
Get httpHeader field of expression. Two http headers are accepted at this time:
  • EnhancedDispatcherConstants.USER_AGENT
  • EnhancedDispatcherConstants.ACCEPT
  • Above constants map the restricted values from rules XML Schema

    Returns:
    Http header to be evaluated in expression.

    getRelation

    public java.lang.String getRelation()
    Get relation field of expression. Three types of relation are accepted at this time:
  • EnhancedDispatcherConstants.IS
  • EnhancedDispatcherConstants.CONTAINS
  • EnhancedDispatcherConstants.START_WITH
  • Above constants map the restricted values from rules XML Schema. Snippet from rule.xsd.

    Returns:
    String that represents the relation for the expression object.

    getMatchHolder

    public java.lang.String getMatchHolder()
    Get matchHolder field of expression.

    Returns:
    A string that is the the value to compare the http header to, the match holder for the expression.

    toDebugString

    public java.lang.String toDebugString()
    This method convert the information into string. The format of the result string is "httpHeader:relation:matchHolder".


    Nitido NiM 2.5 Java API

    These JavaDoc pages are generated for release/nim_2_5-2.5.44

    Copyright © 1999-2009 Nitido Inc.    Proprietary and Confidential.    All Rights Reserved.