Package org.jboss.resteasy.specimpl
Class ResteasyUriInfo
- java.lang.Object
-
- org.jboss.resteasy.specimpl.ResteasyUriInfo
-
- All Implemented Interfaces:
jakarta.ws.rs.core.UriInfo
public class ResteasyUriInfo extends Object implements jakarta.ws.rs.core.UriInfo
UriInfo implementation with some added extra methods to help process requests.- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ResteasyUriInfo.InitData
Holds the data that is needed to initialize ResteasyUriInfo The reason to extract this data into a separate class is that it's expensive to produce and can be cached under certain circumstances
-
Constructor Summary
Constructors Constructor Description ResteasyUriInfo(String absoluteUri, String contextPath)
ResteasyUriInfo(String absoluteUri, String contextPath, ResteasyUriInfo.InitData initData)
Meant to be called by a layer that know that the absoluteUri will result in the successful invocation of a JAX-RS endpoint.ResteasyUriInfo(URI requestURI)
ResteasyUriInfo(URI base, URI relative)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEncodedPathParameter(String name, String value)
protected void
extractParameters()
URI
getAbsolutePath()
jakarta.ws.rs.core.UriBuilder
getAbsolutePathBuilder()
URI
getBaseUri()
jakarta.ws.rs.core.UriBuilder
getBaseUriBuilder()
String
getContextPath()
i.e.List<String>
getEncodedMatchedPaths()
jakarta.ws.rs.core.MultivaluedMap<String,jakarta.ws.rs.core.PathSegment[]>
getEncodedPathParameterPathSegments()
protected jakarta.ws.rs.core.MultivaluedMap<String,String>
getEncodedQueryParameters()
List<Object>
getMatchedResources()
List<String>
getMatchedURIs()
List<String>
getMatchedURIs(boolean decode)
String
getMatchingPath()
Encoded path without matrix parameters.String
getPath()
String
getPath(boolean decode)
jakarta.ws.rs.core.MultivaluedMap<String,jakarta.ws.rs.core.PathSegment[]>
getPathParameterPathSegments()
jakarta.ws.rs.core.MultivaluedMap<String,String>
getPathParameters()
jakarta.ws.rs.core.MultivaluedMap<String,String>
getPathParameters(boolean decode)
List<jakarta.ws.rs.core.PathSegment>
getPathSegments()
List<jakarta.ws.rs.core.PathSegment>
getPathSegments(boolean decode)
jakarta.ws.rs.core.MultivaluedMap<String,String>
getQueryParameters()
jakarta.ws.rs.core.MultivaluedMap<String,String>
getQueryParameters(boolean decode)
URI
getRequestUri()
jakarta.ws.rs.core.UriBuilder
getRequestUriBuilder()
protected void
initialize(CharSequence absoluteUri, String queryString, String contextPath)
protected void
initialize(String absoluteUri, String contextPath, ResteasyUriInfo.InitData initData)
void
initializeFromRequest(URI requestURI)
void
popMatchedPath()
protected void
processPath()
void
pushCurrentResource(Object resource)
void
pushMatchedPath(String encoded)
void
pushMatchedURI(String encoded)
URI
relativize(URI uri)
URI
resolve(URI uri)
void
setRequestUri(URI relative)
Create a UriInfo from the baseURI.void
setUri(URI base, URI relative)
-
-
-
Constructor Detail
-
ResteasyUriInfo
public ResteasyUriInfo(String absoluteUri, String contextPath, ResteasyUriInfo.InitData initData)
Meant to be called by a layer that know that the absoluteUri will result in the successful invocation of a JAX-RS endpoint. The caller is also expected to ensure that InitData is cacheable
-
ResteasyUriInfo
public ResteasyUriInfo(URI requestURI)
-
-
Method Detail
-
initialize
protected void initialize(String absoluteUri, String contextPath, ResteasyUriInfo.InitData initData)
-
initialize
protected void initialize(CharSequence absoluteUri, String queryString, String contextPath)
-
processPath
protected void processPath()
-
initializeFromRequest
public void initializeFromRequest(URI requestURI)
-
getContextPath
public String getContextPath()
i.e. servlet context path. May not be set.- Returns:
-
getMatchingPath
public String getMatchingPath()
Encoded path without matrix parameters.- Returns:
- matching path
-
setRequestUri
public void setRequestUri(URI relative)
Create a UriInfo from the baseURI.- Parameters:
relative
- relative uri
-
getPath
public String getPath()
- Specified by:
getPath
in interfacejakarta.ws.rs.core.UriInfo
-
getPath
public String getPath(boolean decode)
- Specified by:
getPath
in interfacejakarta.ws.rs.core.UriInfo
-
getPathSegments
public List<jakarta.ws.rs.core.PathSegment> getPathSegments()
- Specified by:
getPathSegments
in interfacejakarta.ws.rs.core.UriInfo
-
getPathSegments
public List<jakarta.ws.rs.core.PathSegment> getPathSegments(boolean decode)
- Specified by:
getPathSegments
in interfacejakarta.ws.rs.core.UriInfo
-
getRequestUri
public URI getRequestUri()
- Specified by:
getRequestUri
in interfacejakarta.ws.rs.core.UriInfo
-
getRequestUriBuilder
public jakarta.ws.rs.core.UriBuilder getRequestUriBuilder()
- Specified by:
getRequestUriBuilder
in interfacejakarta.ws.rs.core.UriInfo
-
getAbsolutePath
public URI getAbsolutePath()
- Specified by:
getAbsolutePath
in interfacejakarta.ws.rs.core.UriInfo
-
getAbsolutePathBuilder
public jakarta.ws.rs.core.UriBuilder getAbsolutePathBuilder()
- Specified by:
getAbsolutePathBuilder
in interfacejakarta.ws.rs.core.UriInfo
-
getBaseUri
public URI getBaseUri()
- Specified by:
getBaseUri
in interfacejakarta.ws.rs.core.UriInfo
-
getBaseUriBuilder
public jakarta.ws.rs.core.UriBuilder getBaseUriBuilder()
- Specified by:
getBaseUriBuilder
in interfacejakarta.ws.rs.core.UriInfo
-
getPathParameters
public jakarta.ws.rs.core.MultivaluedMap<String,String> getPathParameters()
- Specified by:
getPathParameters
in interfacejakarta.ws.rs.core.UriInfo
-
getEncodedPathParameterPathSegments
public jakarta.ws.rs.core.MultivaluedMap<String,jakarta.ws.rs.core.PathSegment[]> getEncodedPathParameterPathSegments()
-
getPathParameterPathSegments
public jakarta.ws.rs.core.MultivaluedMap<String,jakarta.ws.rs.core.PathSegment[]> getPathParameterPathSegments()
-
getPathParameters
public jakarta.ws.rs.core.MultivaluedMap<String,String> getPathParameters(boolean decode)
- Specified by:
getPathParameters
in interfacejakarta.ws.rs.core.UriInfo
-
getQueryParameters
public jakarta.ws.rs.core.MultivaluedMap<String,String> getQueryParameters()
- Specified by:
getQueryParameters
in interfacejakarta.ws.rs.core.UriInfo
-
getEncodedQueryParameters
protected jakarta.ws.rs.core.MultivaluedMap<String,String> getEncodedQueryParameters()
-
getQueryParameters
public jakarta.ws.rs.core.MultivaluedMap<String,String> getQueryParameters(boolean decode)
- Specified by:
getQueryParameters
in interfacejakarta.ws.rs.core.UriInfo
-
extractParameters
protected void extractParameters()
-
getMatchedURIs
public List<String> getMatchedURIs(boolean decode)
- Specified by:
getMatchedURIs
in interfacejakarta.ws.rs.core.UriInfo
-
getMatchedURIs
public List<String> getMatchedURIs()
- Specified by:
getMatchedURIs
in interfacejakarta.ws.rs.core.UriInfo
-
getMatchedResources
public List<Object> getMatchedResources()
- Specified by:
getMatchedResources
in interfacejakarta.ws.rs.core.UriInfo
-
pushCurrentResource
public void pushCurrentResource(Object resource)
-
pushMatchedPath
public void pushMatchedPath(String encoded)
-
popMatchedPath
public void popMatchedPath()
-
pushMatchedURI
public void pushMatchedURI(String encoded)
-
-