org.nhindirect.config.processor.impl
Class DefaultBundleCacheUpdateProcessorImpl

java.lang.Object
  extended by org.nhindirect.config.processor.impl.DefaultBundleCacheUpdateProcessorImpl
All Implemented Interfaces:
BundleCacheUpdateProcessor

public class DefaultBundleCacheUpdateProcessorImpl
extends Object
implements BundleCacheUpdateProcessor

Camel based implementation of the BundleCacheUpdateProcessor interface.

This implementation can be triggered on a regular interval to check if a bundle needs to be refreshed. The implementation iterates through the entire list of configured trust bundles in the system checking each bundle's last refresh time. If a bundles refresh interval has not been exceeded since its last update, then it will not checked for updates.

Since:
1.3
Author:
Greg Meyer

Constructor Summary
DefaultBundleCacheUpdateProcessorImpl()
          Default constructor
 
Method Summary
 void setDao(org.nhindirect.config.store.dao.TrustBundleDao dao)
          Sets the trust bundle dao used to get the last refresh date/time.
 void setRefreshProcessor(BundleRefreshProcessor refreshProcessor)
          Sets the BundleRefreshProcessor used to refresh a bundle the bundle's refresh interval has been exceeded.
 void updateBundleCache()
          Updates all anchors within each bundle in the system based on the bundles's refresh interval.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultBundleCacheUpdateProcessorImpl

public DefaultBundleCacheUpdateProcessorImpl()
Default constructor

Method Detail

setDao

public void setDao(org.nhindirect.config.store.dao.TrustBundleDao dao)
Sets the trust bundle dao used to get the last refresh date/time.

Parameters:
dao -

setRefreshProcessor

public void setRefreshProcessor(BundleRefreshProcessor refreshProcessor)
Sets the BundleRefreshProcessor used to refresh a bundle the bundle's refresh interval has been exceeded.

Parameters:
refreshProcessor - The BundleRefreshProcessor.

updateBundleCache

@Handler
public void updateBundleCache()
Updates all anchors within each bundle in the system based on the bundles's refresh interval. If the bundles refresh threshold has not been met, then the bundle will not be checked for updates. Anchors are loaded from the bundle's URL.

Specified by:
updateBundleCache in interface BundleCacheUpdateProcessor


Copyright © 2014. All Rights Reserved.