Interface TimeStampHttpClient
- All Known Implementing Classes:
TimeStampSimpleHttpClient
public interface TimeStampHttpClient
This interface is used to decouple the timestamp service logic from
the actual downloading code and to provide an interface for user code
using a different http client implementation.
The implementation must be stateless regarding the http connection and
not expect to be called in a certain order, apart from being first initialized.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface -
Method Summary
Modifier and TypeMethodDescriptionvoidinit(SignatureConfig config) booleanbooleanvoidsetBasicAuthentication(String username, String password) voidsetContentTypeIn(String contentType) set request content typevoidsetContentTypeOut(String contentType) set expected response content type - usenullif contentType is ignoredvoidsetFollowRedirects(boolean followRedirects) voidsetIgnoreHttpsCertificates(boolean ignoreHttpsCertificates)
-
Method Details
-
init
-
setContentTypeIn
set request content type -
setContentTypeOut
set expected response content type - usenullif contentType is ignored -
setBasicAuthentication
-
post
- Throws:
IOException
-
get
- Throws:
IOException
-
isIgnoreHttpsCertificates
boolean isIgnoreHttpsCertificates()- Returns:
- if the connection is reckless ignoring all https certificate trust issues
-
setIgnoreHttpsCertificates
void setIgnoreHttpsCertificates(boolean ignoreHttpsCertificates) - Parameters:
ignoreHttpsCertificates- set if the connection is reckless ignoring all https certificate trust issues
-
isFollowRedirects
boolean isFollowRedirects()- Returns:
- if http redirects are followed once
-
setFollowRedirects
void setFollowRedirects(boolean followRedirects) - Parameters:
followRedirects- set if http redirects are followed once
-