Interface Request


  • public interface Request
    • Method Detail

      • getFromAddress

        String getFromAddress()
        equivalent to Servlet Request getRemoteHost Returns the fully qualified name of the client or the last proxy that sent the request.
        Returns:
      • getLockTokenHeader

        String getLockTokenHeader()
      • getAuthorization

        Auth getAuthorization()
      • setAuthorization

        void setAuthorization​(Auth auth)
        Maybe called by the milton framework after successful non-http authentication
        Parameters:
        auth - - the new auth object
      • getRefererHeader

        String getRefererHeader()
      • getTimeoutHeader

        String getTimeoutHeader()
      • getIfHeader

        String getIfHeader()
      • getIfRangeHeader

        String getIfRangeHeader()
      • getIfMatchHeader

        String getIfMatchHeader()
      • getIfNoneMatchHeader

        String getIfNoneMatchHeader()
      • getIfModifiedHeader

        Date getIfModifiedHeader()
      • getDepthHeader

        int getDepthHeader()
      • getAbsoluteUrl

        String getAbsoluteUrl()
        Return the complete URL, including protocol, host and port (if specified) and path
      • getAbsolutePath

        String getAbsolutePath()
        Return the path portion of the url. This is everything following the host and port. Will always begin with a leading slash
      • getHostHeader

        String getHostHeader()
      • getDestinationHeader

        String getDestinationHeader()
      • getExpectHeader

        String getExpectHeader()
      • getContentTypeHeader

        String getContentTypeHeader()
      • getContentLengthHeader

        Long getContentLengthHeader()
      • getAcceptHeader

        String getAcceptHeader()
      • getAcceptEncodingHeader

        String getAcceptEncodingHeader()
      • getAcceptLanguage

        String getAcceptLanguage()
        Get the user-agents preferred languages. Eg: en-ca,en;q=0.8,en-us;q=0.6,de-de;q=0.4,de;q=0.2
        Returns:
      • getRangeHeader

        String getRangeHeader()
        Returns:
        a range header, for partial gets
      • getContentRangeHeader

        String getContentRangeHeader()
        Used for partial PUTs
        Returns:
      • getOverwriteHeader

        Boolean getOverwriteHeader()
        Used for MOVE and COPY methods. If true it indicates that any existing resource should be deleted before the move.
        Returns:
        - null if no value, true indicates that any existing resource should be deleted
      • getOriginHeader

        String getOriginHeader()
      • getUserAgentHeader

        String getUserAgentHeader()
        Returns:
        - the user agent header field
      • getAttributes

        Map<String,​Object> getAttributes()
        Return a writable map of arbitrary values to be associated with the request
        Returns:
        a writable map of arbitrary values to be associated with the request
      • getParams

        Map<String,​String> getParams()
        Note to implementors: the parameters will be created by the core handler classes and added to the attributes map. If you're extending AbstractRequest this method will already be implemented for you by returning that attribute If you are not extending AbstractRequest you should implement this as: return attributes.get( "_params");
        Returns:
        - map of querystring or POST parameters, keyed by name
      • getFiles

        Map<String,​FileItem> getFiles()
        Note to implementors: the parameters will be created by the core handler classes and added to the attributes map. If you're extending AbstractRequest this method will already be implemented for you by returning that attribute If you are not extending AbstractRequest you should return implement this as: return attributes.get( "_files");
        Returns:
        - a map of files from an upload request, keyed by file name
      • getCookie

        Cookie getCookie​(String name)
        This is used to acquire a cookie using the name of that cookie. If the cookie exists within the HTTP header then it is returned as a Cookie object. Otherwise this method will return null. Each cookie object will contain the name, value and path of the cookie as well as the optional domain part.
        Parameters:
        name - this is the name of the cookie object to acquire
        Returns:
        this returns a cookie object from the header or null
      • getCookies

        List<Cookie> getCookies()
        This is used to acquire all cookies that were sent in the header. If any cookies exists within the HTTP header they are returned as Cookie objects. Otherwise this method will an empty list. Each cookie object will contain the name, value and path of the cookie as well as the optional domain part.
        Returns:
        this returns all cookie objects from the HTTP header
      • getRemoteAddr

        String getRemoteAddr()
        Returns the IP of the remote client. This attempts to find the originating client, ie not the last proxy, by using X-Forwarded-For etc
        Returns:
      • getLocale

        Locale getLocale()
        Use the Accept-Language header to derive a java Locale
        Returns: