public class HAService extends Object implements KSISigningService, KSIExtendingService
SigningHAService
and ExtendingHAService
.Modifier and Type | Class and Description |
---|---|
static class |
HAService.Builder
Builds the
SigningHAService . |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes signingHaService and extenderHaService.
|
Future<ExtensionResponse> |
extend(Date aggregationTime,
Date publicationTime)
Extends existing signatures.
|
Future<AggregatorConfiguration> |
getAggregationConfiguration()
Makes the KSISigningService ask for configuration update.
|
Future<ExtenderConfiguration> |
getExtendingConfiguration()
Makes the client ask for configuration update.
|
List<KSIExtendingService> |
getSubExtendingServices()
Gets the subclients in case of the implementation that combines multiple clients.
|
List<KSISigningService> |
getSubSigningServices()
Gets all the subservices in case of the implementation that combines multiple KSISigningServices.
|
void |
registerAggregatorConfigurationListener(ConfigurationListener<AggregatorConfiguration> listener)
Registers a new
ConfigurationListener <AggregatorConfiguration >
for the KSISigningService. |
void |
registerExtenderConfigurationListener(ConfigurationListener<ExtenderConfiguration> listener)
Registers a new
ConfigurationListener <ExtenderConfiguration > for the client. |
Future<AggregationResponse> |
sign(DataHash dataHash,
Long level)
Creates a new KSI signature.
|
String |
toString() |
public Future<AggregationResponse> sign(DataHash dataHash, Long level) throws KSIException
KSISigningService
sign
in interface KSISigningService
dataHash
- instance of DataHash
to be signed.level
- the dataHash's level in the local aggregation tree.AggregationResponseFuture
containing Aggregation response data.KSIException
- in case any error occurs.SigningHAService.sign(DataHash, Long)
public Future<ExtensionResponse> extend(Date aggregationTime, Date publicationTime) throws KSIException
KSIExtendingService
extend
in interface KSIExtendingService
aggregationTime
- aggregation time of the existing signature.publicationTime
- publication time to which the existing signature is to be extended.ExtensionResponseFuture
containing calendar chains needed to extend the signature.KSIException
- in case any error occurs.ExtendingHAService.extend(Date, Date)
public void registerAggregatorConfigurationListener(ConfigurationListener<AggregatorConfiguration> listener)
KSISigningService
ConfigurationListener
<AggregatorConfiguration
>
for the KSISigningService. Each time KSISigningService's configuration is
updated, this listener is called.registerAggregatorConfigurationListener
in interface KSISigningService
listener
- an instance of ConfigurationListener
<AggregatorConfiguration
>.SigningHAService.registerAggregatorConfigurationListener(ConfigurationListener)
public Future<AggregatorConfiguration> getAggregationConfiguration()
KSISigningService
ConfigurationListener
s
are called.getAggregationConfiguration
in interface KSISigningService
AggregatorConfiguration
.SigningHAService.getAggregationConfiguration()
public void registerExtenderConfigurationListener(ConfigurationListener<ExtenderConfiguration> listener)
KSIExtendingService
ConfigurationListener
<ExtenderConfiguration
> for the client. Each time client's configuration
is updated, this listener is called.registerExtenderConfigurationListener
in interface KSIExtendingService
listener
- an instance of ConfigurationListener
<ExtenderConfiguration
>.ExtendingHAService.registerExtenderConfigurationListener(ConfigurationListener)
public Future<ExtenderConfiguration> getExtendingConfiguration()
KSIExtendingService
ConfigurationListener
s
are called.getExtendingConfiguration
in interface KSIExtendingService
ExtenderConfiguration
.ExtendingHAService.getExtendingConfiguration()
public List<KSISigningService> getSubSigningServices()
KSISigningService
getSubSigningServices
in interface KSISigningService
SigningHAService.getSubSigningServices()
public List<KSIExtendingService> getSubExtendingServices()
KSIExtendingService
getSubExtendingServices
in interface KSIExtendingService
ExtendingHAService.getSubExtendingServices()
public void close()
close
in interface Closeable
close
in interface AutoCloseable
SigningHAService.close()
,
ExtendingHAService.close()
Copyright © 2024 Guardtime. All rights reserved.