Class Request

  • All Implemented Interfaces:
    java.lang.Cloneable

    public class Request
    extends java.lang.Object
    implements java.lang.Cloneable
    The Class Request.
    Author:
    Alejandro Galue
    • Constructor Detail

      • Request

        public Request()
      • Request

        public Request​(Request copy)
    • Method Detail

      • getMethod

        public java.lang.String getMethod()
        Gets the method.
        Returns:
        the method
      • getParameters

        public java.util.List<Parameter> getParameters()
        Gets the parameters.
        Returns:
        the parameters
      • getParameter

        public java.lang.String getParameter​(java.lang.String name)
        Gets the value of a specific parameter.
        Parameters:
        name - the name
        Returns:
        the parameter
      • getParameterAsInt

        public int getParameterAsInt​(java.lang.String name)
        Gets the parameter as integer.
        Parameters:
        name - the name
        Returns:
        the parameter value as integer
      • getParameterAsBoolean

        public boolean getParameterAsBoolean​(java.lang.String name)
      • getHeaders

        public java.util.List<Header> getHeaders()
        Gets the headers.
        Returns:
        the headers
      • getHeader

        public java.lang.String getHeader​(java.lang.String name)
        Gets the value of a specific header.
        Parameters:
        name - the name
        Returns:
        the header value
      • getContent

        public Content getContent()
        Gets the content.
        Returns:
        the content
      • setMethod

        public void setMethod​(java.lang.String method)
        Sets the method.
        Parameters:
        method - the new method
      • setParameters

        public void setParameters​(java.util.List<Parameter> parameters)
        Sets the parameters.
        Parameters:
        parameters - the new parameters
      • addParameter

        public void addParameter​(java.lang.String name,
                                 java.lang.String value)
        Adds the parameter.
        Parameters:
        name - the name
        value - the value
      • setHeaders

        public void setHeaders​(java.util.List<Header> headers)
        Sets the headers.
        Parameters:
        headers - the new headers
      • addHeader

        public void addHeader​(java.lang.String name,
                              java.lang.String value)
        Adds the header.
        Parameters:
        name - the name
        value - the value
      • setContent

        public void setContent​(Content content)
        Sets the content.
        Parameters:
        content - the new content
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • clone

        public Request clone()
        Overrides:
        clone in class java.lang.Object