Package eu.europa.esig.dss.spi.x509.tsp
Class CompositeTSPSource
java.lang.Object
eu.europa.esig.dss.spi.x509.tsp.CompositeTSPSource
- All Implemented Interfaces:
TSPSource,Serializable
This class allows to retrieve a timestamp with different sources. The composite will try all sources until to get a
non-empty response.
Be careful, all given tspSources MUST accept the same digest algorithm.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor instantiating object with null values -
Method Summary
Modifier and TypeMethodDescriptiongetTimeStampResponse(DigestAlgorithm digestAlgorithm, byte[] digestValue) Gets a TimeStampResponse relevant to the provided digestvoidsetTspSources(Map<String, TSPSource> tspSources) This setter allows to provide multiple tspSources.
-
Constructor Details
-
CompositeTSPSource
public CompositeTSPSource()Default constructor instantiating object with null values
-
-
Method Details
-
setTspSources
-
getTimeStampResponse
public TimestampBinary getTimeStampResponse(DigestAlgorithm digestAlgorithm, byte[] digestValue) throws DSSException Description copied from interface:TSPSourceGets a TimeStampResponse relevant to the provided digest- Specified by:
getTimeStampResponsein interfaceTSPSource- Parameters:
digestAlgorithm- the used digest algorithmdigestValue- the computed digest to be timestamped- Returns:
TimestampBinarybinary of a signed timestamp token- Throws:
DSSException- if any error occurred
-