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 Classes Modifier and Type Interface Description static interface
TimeStampHttpClient.TimeStampHttpClientResponse
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TimeStampHttpClient.TimeStampHttpClientResponse
get(java.lang.String url)
void
init(SignatureConfig config)
boolean
isFollowRedirects()
boolean
isIgnoreHttpsCertificates()
TimeStampHttpClient.TimeStampHttpClientResponse
post(java.lang.String url, byte[] payload)
void
setBasicAuthentication(java.lang.String username, java.lang.String password)
void
setContentTypeIn(java.lang.String contentType)
set request content typevoid
setContentTypeOut(java.lang.String contentType)
set expected response content type - usenull
if contentType is ignoredvoid
setFollowRedirects(boolean followRedirects)
void
setIgnoreHttpsCertificates(boolean ignoreHttpsCertificates)
-
-
-
Method Detail
-
init
void init(SignatureConfig config)
-
setContentTypeIn
void setContentTypeIn(java.lang.String contentType)
set request content type
-
setContentTypeOut
void setContentTypeOut(java.lang.String contentType)
set expected response content type - usenull
if contentType is ignored
-
setBasicAuthentication
void setBasicAuthentication(java.lang.String username, java.lang.String password)
-
post
TimeStampHttpClient.TimeStampHttpClientResponse post(java.lang.String url, byte[] payload) throws java.io.IOException
- Throws:
java.io.IOException
-
get
TimeStampHttpClient.TimeStampHttpClientResponse get(java.lang.String url) throws java.io.IOException
- Throws:
java.io.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
-
-