Class EvaluatorContext


  • public class EvaluatorContext
    extends Object
    Holds the information about the HTTP request. Created on per request basis and passed to each and every evaluator.
    • Constructor Detail

      • EvaluatorContext

        public EvaluatorContext​(String url,
                                Map<String,​String> headers)
        Creates the Evalutor context with the URL and the set of HTTP headers
        Parameters:
        url - url
        headers - HTTP header as a Name, Value map
    • Method Detail

      • getUrl

        public String getUrl()
        Get the complete URL
        Returns:
        URL
      • getHeaders

        public Map<String,​String> getHeaders()
        Get all the HTTP headers
        Returns:
        all the HTTP headers as name value pairs
      • getParams

        public Map<String,​String> getParams()
        Get all the HTTP parameters
        Returns:
        all the HTTP parameter as Name Value pairs
      • getHeader

        public String getHeader​(String name)
        Get the HTTP header value for the Header name
        Parameters:
        name - name of the header
        Returns:
        header value
      • getMessageContext

        public org.apache.axis2.context.MessageContext getMessageContext()
        Get the message context associated with this evaluator context
        Returns:
        an Axis2 MessageContext instance or null
      • getProperty

        public Object getProperty​(String name)
        Get the value of the named property
        Parameters:
        name - Name of the property
        Returns:
        A string property value or null
      • setUrl

        public void setUrl​(String url)
        Set the URL
        Parameters:
        url - to be set
      • setHeaders

        public void setHeaders​(Map<String,​String> headers)
        Set the headers
        Parameters:
        headers - as a HeaderName, HeaderValue pair map
      • setParams

        public void setParams​(Map<String,​String> params)
        Set all the HTTP URL parameters
        Parameters:
        params - as a ParameterName, ParameterValue pair map
      • setMessageContext

        public void setMessageContext​(org.apache.axis2.context.MessageContext messageContext)
        Set the current Axis2 MessageContext to this evaluator context
        Parameters:
        messageContext - an Axis2 MessageContext object
      • setProperties

        public void setProperties​(Map<String,​Object> properties)
        Associate a set of properties with this evaluator context
        Parameters:
        properties - a Properties map