Interface TimeStampHttpClient
-
- All Known Implementing Classes:
TimeStampSimpleHttpClient
public interface TimeStampHttpClientThis 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 Classes Modifier and Type Interface Description static interfaceTimeStampHttpClient.TimeStampHttpClientResponse
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TimeStampHttpClient.TimeStampHttpClientResponseget(String url)voidinit(SignatureConfig config)booleanisFollowRedirects()booleanisIgnoreHttpsCertificates()TimeStampHttpClient.TimeStampHttpClientResponsepost(String url, byte[] payload)voidsetBasicAuthentication(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 Detail
-
init
void init(SignatureConfig config)
-
setContentTypeIn
void setContentTypeIn(String contentType)
set request content type
-
setContentTypeOut
void setContentTypeOut(String contentType)
set expected response content type - usenullif contentType is ignored
-
post
TimeStampHttpClient.TimeStampHttpClientResponse post(String url, byte[] payload) throws IOException
- Throws:
IOException
-
get
TimeStampHttpClient.TimeStampHttpClientResponse get(String url) throws IOException
- 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
-
-