Class CloudSynchronizer
- java.lang.Object
-
- de.fraunhofer.iese.mydata.pmp.synchronizer.CloudSynchronizer
-
- All Implemented Interfaces:
ISyncService
public class CloudSynchronizer extends Object implements ISyncService
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCloudSynchronizer.SyncJob
-
Constructor Summary
Constructors Constructor Description CloudSynchronizer(java.util.function.Supplier<java.time.Instant> instantSupplier, de.fraunhofer.iese.mydata.client.ClientId clientId, de.fraunhofer.iese.mydata.policy.IPolicyService policyService, de.fraunhofer.iese.mydata.timer.ITimerService timerService, de.fraunhofer.iese.mydata.component.interfaces.IPolicyDecisionPoint pdp, de.fraunhofer.iese.mydata.component.interfaces.IManagementService cloudManagementService, boolean cacheEnabled, String policyCachePath, String timerCachePath, String maxAge, String cronSchedule, boolean masterClient, org.quartz.Scheduler scheduler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidpushPep(de.fraunhofer.iese.mydata.component.information.PepComponentInformation pepComponentInformation)Push the registration of a PEP componentvoidpushPip(de.fraunhofer.iese.mydata.component.information.PipComponentInformation pipComponentInformation)Push the registration of a PIP componentvoidpushPxp(de.fraunhofer.iese.mydata.component.information.PxpComponentInformation pxpComponentInformation)Push the registration of a PXP componentvoidstart()Start synchronizationvoidstop()Stop synchronization
-
-
-
Constructor Detail
-
CloudSynchronizer
public CloudSynchronizer(java.util.function.Supplier<java.time.Instant> instantSupplier, de.fraunhofer.iese.mydata.client.ClientId clientId, de.fraunhofer.iese.mydata.policy.IPolicyService policyService, de.fraunhofer.iese.mydata.timer.ITimerService timerService, de.fraunhofer.iese.mydata.component.interfaces.IPolicyDecisionPoint pdp, de.fraunhofer.iese.mydata.component.interfaces.IManagementService cloudManagementService, boolean cacheEnabled, String policyCachePath, String timerCachePath, @Nullable String maxAge, String cronSchedule, boolean masterClient, org.quartz.Scheduler scheduler) throws ParseException- Parameters:
instantSupplier- Supplier for current point in time (Instant)clientId- The clientId of the Library ClientpolicyService- The local policy servicetimerService- The local timer servicepdp- The local PDP (just to manage its failureMode state)cloudManagementService- The management service (cloud)cacheEnabled- Whether cache is enabledpolicyCachePath- File path, where to store the policy cachetimerCachePath- File path, where to store the timer cachemaxAge- Optional duration string to determine how long synced information is validcronSchedule- Cron schedule for synchronizationmasterClient- Whether the Library Client is a master clientscheduler- The scheduler to schedule the synchronization tasks- Throws:
ParseException- In case of invalid cron expression by parameter cronSchedule
-
-
Method Detail
-
start
public void start() throws SynchronizerExceptionDescription copied from interface:ISyncServiceStart synchronization- Specified by:
startin interfaceISyncService- Throws:
SynchronizerException- in case of an error while starting the synchronization
-
stop
public void stop() throws SynchronizerExceptionDescription copied from interface:ISyncServiceStop synchronization- Specified by:
stopin interfaceISyncService- Throws:
SynchronizerException- in case of an error while stopping the synchronization
-
pushPep
public void pushPep(de.fraunhofer.iese.mydata.component.information.PepComponentInformation pepComponentInformation) throws SynchronizerExceptionDescription copied from interface:ISyncServicePush the registration of a PEP component- Specified by:
pushPepin interfaceISyncService- Parameters:
pepComponentInformation- the pepComponentInformation- Throws:
SynchronizerException- in case of an error while pushing the information
-
pushPip
public void pushPip(de.fraunhofer.iese.mydata.component.information.PipComponentInformation pipComponentInformation) throws SynchronizerExceptionDescription copied from interface:ISyncServicePush the registration of a PIP component- Specified by:
pushPipin interfaceISyncService- Parameters:
pipComponentInformation- the pipComponentInformation- Throws:
SynchronizerException- in case of an error while pushing the information
-
pushPxp
public void pushPxp(de.fraunhofer.iese.mydata.component.information.PxpComponentInformation pxpComponentInformation) throws SynchronizerExceptionDescription copied from interface:ISyncServicePush the registration of a PXP component- Specified by:
pushPxpin interfaceISyncService- Parameters:
pxpComponentInformation- the pxpComponentInformation- Throws:
SynchronizerException- in case of an error while pushing the information
-
-