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 class
CloudSynchronizer.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 void
pushPep(de.fraunhofer.iese.mydata.component.information.PepComponentInformation pepComponentInformation)
Push the registration of a PEP componentvoid
pushPip(de.fraunhofer.iese.mydata.component.information.PipComponentInformation pipComponentInformation)
Push the registration of a PIP componentvoid
pushPxp(de.fraunhofer.iese.mydata.component.information.PxpComponentInformation pxpComponentInformation)
Push the registration of a PXP componentvoid
start()
Start synchronizationvoid
stop()
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 SynchronizerException
Description copied from interface:ISyncService
Start synchronization- Specified by:
start
in interfaceISyncService
- Throws:
SynchronizerException
- in case of an error while starting the synchronization
-
stop
public void stop() throws SynchronizerException
Description copied from interface:ISyncService
Stop synchronization- Specified by:
stop
in 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 SynchronizerException
Description copied from interface:ISyncService
Push the registration of a PEP component- Specified by:
pushPep
in 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 SynchronizerException
Description copied from interface:ISyncService
Push the registration of a PIP component- Specified by:
pushPip
in 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 SynchronizerException
Description copied from interface:ISyncService
Push the registration of a PXP component- Specified by:
pushPxp
in interfaceISyncService
- Parameters:
pxpComponentInformation
- the pxpComponentInformation- Throws:
SynchronizerException
- in case of an error while pushing the information
-
-