
Package ca.uhn.fhir.jaxrs.server.util
Class JaxRsRequest
java.lang.Object
ca.uhn.fhir.rest.api.server.RequestDetails
ca.uhn.fhir.jaxrs.server.util.JaxRsRequest
- All Implemented Interfaces:
ca.uhn.fhir.rest.api.server.IHasServletAttributes
public class JaxRsRequest
extends ca.uhn.fhir.rest.api.server.RequestDetails
implements ca.uhn.fhir.rest.api.server.IHasServletAttributes
The JaxRsRequest is a jax-rs specific implementation of the RequestDetails.
- Author:
- Peter Van Houte | peter.vanhoute@agfa.com | Agfa Healthcare
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAn implementation of the builder pattern for the JaxRsRequest -
Field Summary
Fields inherited from class ca.uhn.fhir.rest.api.server.RequestDetails
BAD_STREAM_PLACEHOLDER -
Constructor Summary
ConstructorsConstructorDescriptionJaxRsRequest(AbstractJaxRsProvider server, String resourceString, ca.uhn.fhir.rest.api.RequestTypeEnum requestType, ca.uhn.fhir.rest.api.RestOperationTypeEnum restOperation) Utility Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidgetAttribute(String theAttributeName) Deprecated.protected byte[]ca.uhn.fhir.context.FhirContextgetHeaders(String name) ca.uhn.fhir.rest.api.server.IRestfulResponsegetServletAttribute(String theAttributeName) Gets an attribute from the servlet request.voidsetAttribute(String theAttributeName, Object theAttributeValue) Deprecated.UseRequestDetails.getUserData().voidsetHeaders(String theName, List<String> theValue) voidsetServer(AbstractJaxRsProvider theServer) Set the servervoidsetServletAttribute(String theAttributeName, Object theAttributeValue) Sets an attribute on the servlet request.Methods inherited from class ca.uhn.fhir.rest.api.server.RequestDetails
addParameter, getCompartmentName, getCompleteUrl, getConditionalUrl, getFhirServerBase, getFixedConditionalUrl, getId, getInterceptorBroadcaster, getMaxRetries, getOperation, getParameters, getRequestContentsIfLoaded, getRequestId, getRequestPath, getRequestStopwatch, getRequestType, getResource, getResourceName, getRestOperationType, getSecondaryOperation, getTenantId, getTransactionGuid, getUnqualifiedToQualifiedNames, getUserData, isPreferAsync, isRespondGzip, isRetry, isRewriteHistory, isSubRequest, loadRequestContents, removeParameter, setCompartmentName, setCompleteUrl, setFhirServerBase, setFixedConditionalUrl, setId, setMaxRetries, setOperation, setParameters, setRequestContents, setRequestId, setRequestPath, setRequestType, setResource, setResourceName, setRespondGzip, setResponse, setRestOperationType, setRetry, setRewriteHistory, setSecondaryOperation, setSubRequest, setTenantId, setTransactionGuid
-
Constructor Details
-
JaxRsRequest
public JaxRsRequest(AbstractJaxRsProvider server, String resourceString, ca.uhn.fhir.rest.api.RequestTypeEnum requestType, ca.uhn.fhir.rest.api.RestOperationTypeEnum restOperation) Utility Constructor- Parameters:
server- the serverresourceString- the resource bodyrequestType- the request typerestOperation- the operation type
-
-
Method Details
-
getByteStreamRequestContents
- Specified by:
getByteStreamRequestContentsin classca.uhn.fhir.rest.api.server.RequestDetails
-
getCharset
- Specified by:
getCharsetin classca.uhn.fhir.rest.api.server.RequestDetails
-
getFhirContext
- Specified by:
getFhirContextin classca.uhn.fhir.rest.api.server.RequestDetails
-
getHeader
- Specified by:
getHeaderin classca.uhn.fhir.rest.api.server.RequestDetails
-
getHeaders
- Specified by:
getHeadersin classca.uhn.fhir.rest.api.server.RequestDetails
-
addHeader
- Specified by:
addHeaderin classca.uhn.fhir.rest.api.server.RequestDetails
-
setHeaders
- Specified by:
setHeadersin classca.uhn.fhir.rest.api.server.RequestDetails
-
getServletAttribute
Gets an attribute from the servlet request. Attributes are used for interacting with servlet request attributes to communicate between servlet filters. These methods should not be used to pass information between interceptor methods. UseRequestDetails.getUserData()instead to pass information between interceptor methods.- Specified by:
getServletAttributein interfaceca.uhn.fhir.rest.api.server.IHasServletAttributes- Parameters:
theAttributeName- The attribute name- Returns:
- The attribute value, or null if the attribute is not set
-
setServletAttribute
Sets an attribute on the servlet request. Attributes are used for interacting with servlet request attributes to communicate between servlet filters. These methods should not be used to pass information between interceptor methods. UseRequestDetails.getUserData()instead to pass information between interceptor methods.- Specified by:
setServletAttributein interfaceca.uhn.fhir.rest.api.server.IHasServletAttributes- Parameters:
theAttributeName- The attribute nametheAttributeValue- The attribute value
-
getAttribute
Deprecated.UseRequestDetails.getUserData(). If servlet attributes are truly required, then useIHasServletAttributes.getServletAttribute(String).- Overrides:
getAttributein classca.uhn.fhir.rest.api.server.RequestDetails
-
setAttribute
Deprecated.UseRequestDetails.getUserData(). If servlet attributes are truly required, then useIHasServletAttributes.setServletAttribute(String, Object).- Overrides:
setAttributein classca.uhn.fhir.rest.api.server.RequestDetails
-
getInputStream
- Specified by:
getInputStreamin classca.uhn.fhir.rest.api.server.RequestDetails
-
getReader
- Specified by:
getReaderin classca.uhn.fhir.rest.api.server.RequestDetails
-
getResponse
- Overrides:
getResponsein classca.uhn.fhir.rest.api.server.RequestDetails
-
getServer
- Specified by:
getServerin classca.uhn.fhir.rest.api.server.RequestDetails
-
setServer
Set the server- Parameters:
theServer- the server to set
-
getServerBaseForRequest
- Specified by:
getServerBaseForRequestin classca.uhn.fhir.rest.api.server.RequestDetails
-
RequestDetails.getUserData().