
Package org.hl7.fhir.dstu2.utils.client
Class ClientUtils
java.lang.Object
org.hl7.fhir.dstu2.utils.client.ClientUtils
Deprecated.
Helper class handling lower level HTTP transport concerns. TODO Document
methods.
- Author:
- Claude Nanjo
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildConnection
(URI baseServiceUri, String tail) Deprecated.Client connection methodsbuildConnection
(URI baseServiceUri, ResourceType resourceType, String id) Deprecated.byte[]
getFeedAsByteArray
(Bundle feed, boolean pretty, boolean isJson) Deprecated.protected Iterable
<org.hl7.fhir.utilities.http.HTTPHeader> getFhirHeaders
(org.hl7.fhir.utilities.http.HTTPRequest httpRequest, String format) Deprecated.Get required headers for FHIR requests.protected Iterable
<org.hl7.fhir.utilities.http.HTTPHeader> getFhirHeaders
(org.hl7.fhir.utilities.http.HTTPRequest httpRequest, String format, Iterable<org.hl7.fhir.utilities.http.HTTPHeader> headers) Deprecated.Get required headers for FHIR requests.getLastModifiedResponseHeaderAsCalendarObject
(URLConnection serverConnection) Deprecated.protected static String
getLocationHeader
(Iterable<org.hl7.fhir.utilities.http.HTTPHeader> headers) Deprecated.protected org.hl7.fhir.utilities.http.ManagedFhirWebAccessor
Deprecated.protected IParser
Deprecated.<T extends Resource>
byte[]getResourceAsByteArray
(T resource, boolean pretty, boolean isJson) Deprecated.Other general helper methodsprotected static List
<org.hl7.fhir.utilities.http.HTTPHeader> getResourceFormatHeaders
(org.hl7.fhir.utilities.http.HTTPRequest httpRequest, String format) Deprecated.protected boolean
Deprecated.boolean
issueDeleteRequest
(URI resourceUri) Deprecated.issueGetFeedRequest
(URI resourceUri, String resourceFormat) Deprecated.<T extends Resource>
ResourceRequest<T> issueGetResourceRequest
(URI resourceUri, String resourceFormat, int timeoutLoading) Deprecated.<T extends Resource>
ResourceRequest<T> issueOptionsRequest
(URI optionsUri, String resourceFormat, int timeoutLoading) Deprecated.issuePostFeedRequest
(URI resourceUri, Map<String, String> parameters, String resourceName, Resource resource, String resourceFormat) Deprecated.<T extends Resource>
ResourceRequest<T> issuePostRequest
(URI resourceUri, byte[] payload, String resourceFormat, int timeoutLoading) Deprecated.<T extends Resource>
ResourceRequest<T> issuePostRequest
(URI resourceUri, byte[] payload, String resourceFormat, Iterable<org.hl7.fhir.utilities.http.HTTPHeader> headers, int timeoutLoading) Deprecated.<T extends Resource>
ResourceRequest<T> issuePutRequest
(URI resourceUri, byte[] payload, String resourceFormat, int timeoutLoading) Deprecated.<T extends Resource>
ResourceRequest<T> issuePutRequest
(URI resourceUri, byte[] payload, String resourceFormat, Iterable<org.hl7.fhir.utilities.http.HTTPHeader> headers, int timeoutLoading) Deprecated.protected <T extends Resource>
ResourceRequest<T> issueResourceRequest
(String resourceFormat, org.hl7.fhir.utilities.http.HTTPRequest request, int timeoutLoading) Deprecated.Request/Response Helper methodsprotected <T extends Resource>
ResourceRequest<T> issueResourceRequest
(String resourceFormat, org.hl7.fhir.utilities.http.HTTPRequest request, Iterable<org.hl7.fhir.utilities.http.HTTPHeader> headers, int timeoutLoading) Deprecated.Issue a resource request.postBatchRequest
(URI resourceUri, byte[] payload, String resourceFormat, int timeoutLoading) Deprecated.protected org.hl7.fhir.utilities.http.HTTPResult
sendPayload
(org.hl7.fhir.utilities.http.HTTPRequest request) Deprecated.Send an HTTP Post/Put Payloadprotected org.hl7.fhir.utilities.http.HTTPResult
sendRequest
(org.hl7.fhir.utilities.http.HTTPRequest request) Deprecated.protected Bundle
unmarshalFeed
(org.hl7.fhir.utilities.http.HTTPResult response, String format) Deprecated.Unmarshals Bundle from response stream.protected <T extends Resource>
TunmarshalReference
(org.hl7.fhir.utilities.http.HTTPResult response, String format) Deprecated.Unmarshals a resource from the response stream.protected String
writeInputStreamAsString
(InputStream instream) Deprecated.Used for debugging
-
Field Details
-
LOCATION_HEADER
Deprecated.- See Also:
-
CONTENT_LOCATION_HEADER
Deprecated.- See Also:
-
DEFAULT_CHARSET
Deprecated.- See Also:
-
-
Constructor Details
-
ClientUtils
public ClientUtils()Deprecated.
-
-
Method Details
-
getManagedWebAccessor
Deprecated. -
issueOptionsRequest
public <T extends Resource> ResourceRequest<T> issueOptionsRequest(URI optionsUri, String resourceFormat, int timeoutLoading) Deprecated. -
issueGetResourceRequest
public <T extends Resource> ResourceRequest<T> issueGetResourceRequest(URI resourceUri, String resourceFormat, int timeoutLoading) Deprecated. -
issuePutRequest
public <T extends Resource> ResourceRequest<T> issuePutRequest(URI resourceUri, byte[] payload, String resourceFormat, Iterable<org.hl7.fhir.utilities.http.HTTPHeader> headers, int timeoutLoading) Deprecated. -
issuePutRequest
public <T extends Resource> ResourceRequest<T> issuePutRequest(URI resourceUri, byte[] payload, String resourceFormat, int timeoutLoading) Deprecated. -
issuePostRequest
public <T extends Resource> ResourceRequest<T> issuePostRequest(URI resourceUri, byte[] payload, String resourceFormat, Iterable<org.hl7.fhir.utilities.http.HTTPHeader> headers, int timeoutLoading) Deprecated. -
issuePostRequest
public <T extends Resource> ResourceRequest<T> issuePostRequest(URI resourceUri, byte[] payload, String resourceFormat, int timeoutLoading) Deprecated. -
issueGetFeedRequest
Deprecated. -
postBatchRequest
public Bundle postBatchRequest(URI resourceUri, byte[] payload, String resourceFormat, int timeoutLoading) Deprecated. -
issueDeleteRequest
Deprecated. -
issueResourceRequest
protected <T extends Resource> ResourceRequest<T> issueResourceRequest(String resourceFormat, org.hl7.fhir.utilities.http.HTTPRequest request, int timeoutLoading) Deprecated.Request/Response Helper methods -
issueResourceRequest
protected <T extends Resource> ResourceRequest<T> issueResourceRequest(String resourceFormat, org.hl7.fhir.utilities.http.HTTPRequest request, @Nonnull Iterable<org.hl7.fhir.utilities.http.HTTPHeader> headers, int timeoutLoading) Deprecated.Issue a resource request.- Parameters:
resourceFormat
- the expected FHIR formatrequest
- the request to be sentheaders
- any additional headers to add- Returns:
- A ResourceRequest object containing the requested resource
-
getFhirHeaders
protected Iterable<org.hl7.fhir.utilities.http.HTTPHeader> getFhirHeaders(org.hl7.fhir.utilities.http.HTTPRequest httpRequest, String format) Deprecated.Get required headers for FHIR requests.- Parameters:
httpRequest
- the requestformat
- the expected format
-
getFhirHeaders
protected Iterable<org.hl7.fhir.utilities.http.HTTPHeader> getFhirHeaders(org.hl7.fhir.utilities.http.HTTPRequest httpRequest, String format, Iterable<org.hl7.fhir.utilities.http.HTTPHeader> headers) Deprecated.Get required headers for FHIR requests.- Parameters:
httpRequest
- the requestformat
- the expected formatheaders
- any additional headers to add
-
getResourceFormatHeaders
protected static List<org.hl7.fhir.utilities.http.HTTPHeader> getResourceFormatHeaders(org.hl7.fhir.utilities.http.HTTPRequest httpRequest, String format) Deprecated. -
sendRequest
protected org.hl7.fhir.utilities.http.HTTPResult sendRequest(org.hl7.fhir.utilities.http.HTTPRequest request) Deprecated.- Parameters:
request
- The request to be sent- Returns:
- The response from the server
-
unmarshalReference
protected <T extends Resource> T unmarshalReference(org.hl7.fhir.utilities.http.HTTPResult response, String format) Deprecated.Unmarshals a resource from the response stream.- Parameters:
response
- The response from the server- Returns:
- The unmarshalled resource
-
unmarshalFeed
Deprecated.Unmarshals Bundle from response stream.- Parameters:
response
- The response from the server- Returns:
- The unmarshalled Bundle
-
hasError
Deprecated. -
getLocationHeader
Deprecated. -
buildConnection
Deprecated.Client connection methods -
buildConnection
Deprecated. -
getResourceAsByteArray
public <T extends Resource> byte[] getResourceAsByteArray(T resource, boolean pretty, boolean isJson) Deprecated.Other general helper methods -
getFeedAsByteArray
Deprecated. -
getLastModifiedResponseHeaderAsCalendarObject
Deprecated. -
getParser
Deprecated. -
issuePostFeedRequest
public Bundle issuePostFeedRequest(URI resourceUri, Map<String, String> parameters, String resourceName, Resource resource, String resourceFormat) throws IOExceptionDeprecated.- Throws:
IOException
-
sendPayload
protected org.hl7.fhir.utilities.http.HTTPResult sendPayload(org.hl7.fhir.utilities.http.HTTPRequest request) Deprecated.Send an HTTP Post/Put Payload- Parameters:
request
- The request to be sent- Returns:
- The response from the server
-
writeInputStreamAsString
Deprecated.Used for debugging- Parameters:
instream
-- Returns:
-