Package org.hl7.fhir.utilities.http
Class ManagedWebAccess
- java.lang.Object
-
- org.hl7.fhir.utilities.http.ManagedWebAccess
-
public class ManagedWebAccess extends Object
see security.md - manages web access by the FHIR HAPI Core library By using accessPolicy, allowedDomains and accessor, a host java application can control whether this library has direct access to the web (and which domains it is allowed to access), or whether the host application provides controlled access, or whether no access is allowed at all (in which case other information providers need to be provided)- Author:
- Grahame
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceManagedWebAccess.IFhirWebAccessorstatic interfaceManagedWebAccess.IWebAccessorstatic classManagedWebAccess.WebAccessPolicy
-
Constructor Summary
Constructors Constructor Description ManagedWebAccess()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ManagedWebAccessoraccessor(Iterable<String> serverTypes)static ManagedFhirWebAccessorfhirAccessor()static HTTPResultget(Iterable<String> serverTypes, String url)static HTTPResultget(Iterable<String> serverTypes, String url, String accept)static ManagedWebAccess.WebAccessPolicygetAccessPolicy()static HTTPResulthttpCall(HTTPRequest httpRequest)static voidloadFromFHIRSettings()static voidloadFromFHIRSettings(FhirSettings settings)static HTTPResultpost(Iterable<String> serverTypes, String url, byte[] content, String contentType, String accept)static HTTPResultput(Iterable<String> serverTypes, String url, byte[] content, String contentType, String accept)static voidsetAccessPolicy(ManagedWebAccess.WebAccessPolicy accessPolicy)static voidsetUserAgent(String userAgent)
-
-
-
Constructor Detail
-
ManagedWebAccess
public ManagedWebAccess()
-
-
Method Detail
-
getAccessPolicy
public static ManagedWebAccess.WebAccessPolicy getAccessPolicy()
-
setAccessPolicy
public static void setAccessPolicy(ManagedWebAccess.WebAccessPolicy accessPolicy)
-
setUserAgent
public static void setUserAgent(String userAgent)
-
accessor
public static ManagedWebAccessor accessor(Iterable<String> serverTypes)
-
fhirAccessor
public static ManagedFhirWebAccessor fhirAccessor()
-
get
public static HTTPResult get(Iterable<String> serverTypes, String url) throws IOException
- Throws:
IOException
-
get
public static HTTPResult get(Iterable<String> serverTypes, String url, String accept) throws IOException
- Throws:
IOException
-
post
public static HTTPResult post(Iterable<String> serverTypes, String url, byte[] content, String contentType, String accept) throws IOException
- Throws:
IOException
-
put
public static HTTPResult put(Iterable<String> serverTypes, String url, byte[] content, String contentType, String accept) throws IOException
- Throws:
IOException
-
httpCall
public static HTTPResult httpCall(HTTPRequest httpRequest) throws IOException
- Throws:
IOException
-
loadFromFHIRSettings
public static void loadFromFHIRSettings()
-
loadFromFHIRSettings
public static void loadFromFHIRSettings(FhirSettings settings)
-
-