Package no.digipost.signature.client
Class ClientConfiguration
- java.lang.Object
-
- no.digipost.signature.client.ClientConfiguration
-
- All Implemented Interfaces:
ASiCEConfiguration
,HttpIntegrationConfiguration
,ProvidesCertificateResourcePaths
public final class ClientConfiguration extends Object implements ProvidesCertificateResourcePaths, HttpIntegrationConfiguration, ASiCEConfiguration
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ClientConfiguration.Builder
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_CONNECT_TIMEOUT_MS
The default connect timeout for requests: 10000 ms.static int
DEFAULT_SOCKET_TIMEOUT_MS
Socket timeout is used for both requests and, if any, underlying layered sockets (typically for secure sockets).static String
HTTP_REQUEST_RESPONSE_LOGGER_NAME
"no.digipost.signature.client.http.requestresponse" is the name of the logger which will log the HTTP requests and responses, if enabled withClientConfiguration.Builder.enableRequestAndResponseLogging()
.static String
MANDATORY_USER_AGENT
TheUser-Agent
header which will be included in all requests.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ClientConfiguration.Builder
builder(KeyStoreConfig keystore)
Build a newClientConfiguration
.Iterable<String>
getCertificatePaths()
Clock
getClock()
Iterable<DocumentBundleProcessor>
getDocumentBundleProcessors()
Optional<Sender>
getGlobalSender()
javax.ws.rs.core.Configuration
getJaxrsConfiguration()
Get the JAX-RSConfiguration
based on the current state of thisClientConfiguration
.KeyStoreConfig
getKeyStoreConfig()
URI
getServiceRoot()
SSLContext
getSSLContext()
-
-
-
Field Detail
-
MANDATORY_USER_AGENT
public static final String MANDATORY_USER_AGENT
TheUser-Agent
header which will be included in all requests. You may include a custom part usingClientConfiguration.Builder.includeInUserAgent(String)
.
-
HTTP_REQUEST_RESPONSE_LOGGER_NAME
public static final String HTTP_REQUEST_RESPONSE_LOGGER_NAME
"no.digipost.signature.client.http.requestresponse" is the name of the logger which will log the HTTP requests and responses, if enabled withClientConfiguration.Builder.enableRequestAndResponseLogging()
.- See Also:
- Constant Field Values
-
DEFAULT_SOCKET_TIMEOUT_MS
public static final int DEFAULT_SOCKET_TIMEOUT_MS
Socket timeout is used for both requests and, if any, underlying layered sockets (typically for secure sockets). The default value is 10000 ms.- See Also:
- Constant Field Values
-
DEFAULT_CONNECT_TIMEOUT_MS
public static final int DEFAULT_CONNECT_TIMEOUT_MS
The default connect timeout for requests: 10000 ms.- See Also:
- Constant Field Values
-
-
Method Detail
-
getKeyStoreConfig
public KeyStoreConfig getKeyStoreConfig()
- Specified by:
getKeyStoreConfig
in interfaceASiCEConfiguration
-
getGlobalSender
public Optional<Sender> getGlobalSender()
- Specified by:
getGlobalSender
in interfaceASiCEConfiguration
-
getDocumentBundleProcessors
public Iterable<DocumentBundleProcessor> getDocumentBundleProcessors()
- Specified by:
getDocumentBundleProcessors
in interfaceASiCEConfiguration
-
getClock
public Clock getClock()
- Specified by:
getClock
in interfaceASiCEConfiguration
-
getServiceRoot
public URI getServiceRoot()
- Specified by:
getServiceRoot
in interfaceHttpIntegrationConfiguration
-
getCertificatePaths
public Iterable<String> getCertificatePaths()
- Specified by:
getCertificatePaths
in interfaceProvidesCertificateResourcePaths
-
getJaxrsConfiguration
public javax.ws.rs.core.Configuration getJaxrsConfiguration()
Get the JAX-RSConfiguration
based on the current state of thisClientConfiguration
.- Specified by:
getJaxrsConfiguration
in interfaceHttpIntegrationConfiguration
- Returns:
- the JAX-RS
Configuration
-
getSSLContext
public SSLContext getSSLContext()
- Specified by:
getSSLContext
in interfaceHttpIntegrationConfiguration
-
builder
public static ClientConfiguration.Builder builder(KeyStoreConfig keystore)
Build a newClientConfiguration
.
-
-