Cumulus4j API
(1.1.0)

org.cumulus4j.keystore
Class DateDependentKeyStrategy.ActiveKey

java.lang.Object
  extended by org.cumulus4j.keystore.DateDependentKeyStrategy.ActiveKey
Enclosing class:
DateDependentKeyStrategy

public static final class DateDependentKeyStrategy.ActiveKey
extends Object

Descriptor of the active key.

Author:
Marco หงุ่ยตระกูล-Schulze - marco at nightlabs dot de

Method Summary
 Date getActiveFromIncl()
           Get the timestamp from which on the key is active (including).
 Date getActiveToExcl()
           Get the timestamp until which the key is active (excluding).
 long getKeyID()
          Get the key's identifier.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getKeyID

public long getKeyID()
Get the key's identifier.

Returns:
the key-ID.

getActiveFromIncl

public Date getActiveFromIncl()

Get the timestamp from which on the key is active (including).

This timestamp is extrapolated (if necessary) according to the timestamp given to DateDependentKeyStrategy.getActiveKey(String, char[], Date). Please see the documentation of getActiveToExcl() for more details about this extrapolation.

Returns:
the timestamp from which on the key is active (including).

getActiveToExcl

public Date getActiveToExcl()

Get the timestamp until which the key is active (excluding).

This is always after (never before, never equal to) the timestamp given to DateDependentKeyStrategy.getActiveKey(String, char[], Date), even if there is no key with this validity in the key-store, because the key-store is extrapolated if necessary (in an eternal cycle).

For example, if the key-store was generated with daily (24 h) key-rotation and keys for the time range from 2011-01-01 00:00 [including] until 2011-04-01 00:00 [excluding] and the given timestamp is 2011-05-01 23:45, the active key will be exactly the same as it was 2011-02-01 23:45. Though this key originally was valid only till 2011-02-02 00:00 [excluding], the result of this method would now be 2011-05-02 00:00.

Returns:
the timestamp until which the key is active (excluding).

Cumulus4j API
(1.1.0)

Copyright © 2013 NightLabs Consulting GmbH. All Rights Reserved.