diff options
author | (no author) <(no author)@d688527b-c9ab-4aba-bd8d-4036d912da1d> | 2004-06-28 20:46:16 +0000 |
---|---|---|
committer | (no author) <(no author)@d688527b-c9ab-4aba-bd8d-4036d912da1d> | 2004-06-28 20:46:16 +0000 |
commit | da5f70c20ef4bfea21c9d228e1d6891616887958 (patch) | |
tree | d05130206e29d13c6fd42003896afb2b31320999 /spss.server/src/at/gv/egovernment/moa/spss/server/service/RevocationArchiveCleaner.java | |
parent | 4dd1877ef3771633e096509dae7b8c99fee9ce4b (diff) | |
download | moa-id-spss-da5f70c20ef4bfea21c9d228e1d6891616887958.tar.gz moa-id-spss-da5f70c20ef4bfea21c9d228e1d6891616887958.tar.bz2 moa-id-spss-da5f70c20ef4bfea21c9d228e1d6891616887958.zip |
This commit was manufactured by cvs2svn to create tag 'MOA-ID1_2d05'.tags/MOA-ID1_2d05
git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/tags/MOA-ID1_2d05@145 d688527b-c9ab-4aba-bd8d-4036d912da1d
Diffstat (limited to 'spss.server/src/at/gv/egovernment/moa/spss/server/service/RevocationArchiveCleaner.java')
-rw-r--r-- | spss.server/src/at/gv/egovernment/moa/spss/server/service/RevocationArchiveCleaner.java | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/server/service/RevocationArchiveCleaner.java b/spss.server/src/at/gv/egovernment/moa/spss/server/service/RevocationArchiveCleaner.java deleted file mode 100644 index 997375305..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/server/service/RevocationArchiveCleaner.java +++ /dev/null @@ -1,83 +0,0 @@ -package at.gv.egovernment.moa.spss.server.service; - -import java.util.Date; - -import iaik.pki.revocation.RevocationSourceTypes; -import iaik.pki.store.revocation.archive.Archive; -import iaik.pki.store.revocation.archive.ArchiveFactory; - -import at.gv.egovernment.moa.logging.LogMsg; -import at.gv.egovernment.moa.logging.Logger; -import at.gv.egovernment.moa.util.BoolUtils; - -import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider; -import at.gv.egovernment.moa.spss.server.logging.TransactionId; -import at.gv.egovernment.moa.spss.util.MessageProvider; - -/** - * A <code>Runnable</code> for periodically cleaning up the revocation archive. - * @author Patrick Peck - * @version $Id$ - */ -public class RevocationArchiveCleaner implements Runnable { - - /** The inverval between two clean-ups of the revocation archive. */ - private long archiveCleanupInterval; - - /** - * Create a new <code>RevocationArchiveCleaner</code>. - * - * @param archiveCleanupInterval The interval between two clean-ups of the - * revocation archive. - */ - public RevocationArchiveCleaner(long archiveCleanupInterval) { - this.archiveCleanupInterval = archiveCleanupInterval; - } - - /** - * Run the <code>RevocationArchiveCleaner</code> in its own - * <code>Thread</code>. - */ - public void run() { - while (true) { - try { - ConfigurationProvider config = - ConfigurationProvider.getInstance(); - String archiveInfo = - config.getGenericConfiguration( - ConfigurationProvider.ARCHIVE_REVOCATION_INFO_PROPERTY, - "false"); - - if (BoolUtils.valueOf(archiveInfo)) { - Archive archive = ArchiveFactory.getInstance().getArchive(); - long archiveDurationMillis = - (long) config.getCRLArchiveDuration() * 86400000; - - // delete old archive data - if (archiveDurationMillis > 0) { - Date olderThan = - new Date(System.currentTimeMillis() - archiveDurationMillis); - - archive.deleteOldArchiveEntries( - RevocationSourceTypes.CRL, - olderThan, - new TransactionId("RevocationArchiveCleaner")); - } - } - - } catch (Exception e) { - MessageProvider msg = MessageProvider.getInstance(); - Logger.error(new LogMsg(msg.getMessage("init.02", null)), e); - } - - // sleep - try { - Thread.sleep(archiveCleanupInterval * 1000); - } catch (InterruptedException e) { - // ok to do nothing here - } - - } - } - -} |