Class ForwardedUriInfo

  • All Implemented Interfaces:
    javax.ws.rs.core.UriInfo

    public final class ForwardedUriInfo
    extends Object
    implements javax.ws.rs.core.UriInfo
    Custom implementation of UriInfo that is aware of X-Forwarded-For HTTP header.

    The class is mutable and NOT thread-safe.

    Version:
    $Id: ForwardedUriInfo.java 2226 2012-11-13 08:27:20Z guard $
    Author:
    Yegor Bugayenko (yegor@tpc2.com)
    See Also:
    IETF Forwarded HTTP Extension
    • Constructor Detail

      • ForwardedUriInfo

        public ForwardedUriInfo​(javax.ws.rs.core.UriInfo inf,
                                AtomicReference<javax.ws.rs.core.HttpHeaders> hdrs)
        Public ctor.
        Parameters:
        inf - The original UriInfo
        hdrs - HTTP headers
    • Method Detail

      • getAbsolutePath

        public URI getAbsolutePath()
        Specified by:
        getAbsolutePath in interface javax.ws.rs.core.UriInfo
      • getAbsolutePathBuilder

        public javax.ws.rs.core.UriBuilder getAbsolutePathBuilder()
        Specified by:
        getAbsolutePathBuilder in interface javax.ws.rs.core.UriInfo
      • getBaseUri

        public URI getBaseUri()
        Specified by:
        getBaseUri in interface javax.ws.rs.core.UriInfo
      • getBaseUriBuilder

        public javax.ws.rs.core.UriBuilder getBaseUriBuilder()
        Specified by:
        getBaseUriBuilder in interface javax.ws.rs.core.UriInfo
      • getRequestUri

        public URI getRequestUri()
        Specified by:
        getRequestUri in interface javax.ws.rs.core.UriInfo
      • getRequestUriBuilder

        public javax.ws.rs.core.UriBuilder getRequestUriBuilder()
        Specified by:
        getRequestUriBuilder in interface javax.ws.rs.core.UriInfo
      • getMatchedResources

        public List<Object> getMatchedResources()
        Specified by:
        getMatchedResources in interface javax.ws.rs.core.UriInfo
      • getMatchedURIs

        public List<String> getMatchedURIs()
        Specified by:
        getMatchedURIs in interface javax.ws.rs.core.UriInfo
      • getMatchedURIs

        public List<String> getMatchedURIs​(boolean decode)
        Specified by:
        getMatchedURIs in interface javax.ws.rs.core.UriInfo
      • getPath

        public String getPath()
        Specified by:
        getPath in interface javax.ws.rs.core.UriInfo
      • getPath

        public String getPath​(boolean decode)
        Specified by:
        getPath in interface javax.ws.rs.core.UriInfo
      • getPathParameters

        public javax.ws.rs.core.MultivaluedMap<String,​String> getPathParameters()
        Specified by:
        getPathParameters in interface javax.ws.rs.core.UriInfo
      • getPathParameters

        public javax.ws.rs.core.MultivaluedMap<String,​String> getPathParameters​(boolean decode)
        Specified by:
        getPathParameters in interface javax.ws.rs.core.UriInfo
      • getPathSegments

        public List<javax.ws.rs.core.PathSegment> getPathSegments()
        Specified by:
        getPathSegments in interface javax.ws.rs.core.UriInfo
      • getPathSegments

        public List<javax.ws.rs.core.PathSegment> getPathSegments​(boolean decode)
        Specified by:
        getPathSegments in interface javax.ws.rs.core.UriInfo
      • getQueryParameters

        public javax.ws.rs.core.MultivaluedMap<String,​String> getQueryParameters()
        Specified by:
        getQueryParameters in interface javax.ws.rs.core.UriInfo
      • getQueryParameters

        public javax.ws.rs.core.MultivaluedMap<String,​String> getQueryParameters​(boolean decode)
        Specified by:
        getQueryParameters in interface javax.ws.rs.core.UriInfo
      • resolve

        public URI resolve​(URI uri)
        Specified by:
        resolve in interface javax.ws.rs.core.UriInfo
      • relativize

        public URI relativize​(URI uri)
        Specified by:
        relativize in interface javax.ws.rs.core.UriInfo