Class CloudSynchronizer

    • 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 component
      void pushPip​(de.fraunhofer.iese.mydata.component.information.PipComponentInformation pipComponentInformation)
      Push the registration of a PIP component
      void pushPxp​(de.fraunhofer.iese.mydata.component.information.PxpComponentInformation pxpComponentInformation)
      Push the registration of a PXP component
      void start()
      Start synchronization
      void 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 Client
        policyService - The local policy service
        timerService - The local timer service
        pdp - The local PDP (just to manage its failureMode state)
        cloudManagementService - The management service (cloud)
        cacheEnabled - Whether cache is enabled
        policyCachePath - File path, where to store the policy cache
        timerCachePath - File path, where to store the timer cache
        maxAge - Optional duration string to determine how long synced information is valid
        cronSchedule - Cron schedule for synchronization
        masterClient - Whether the Library Client is a master client
        scheduler - The scheduler to schedule the synchronization tasks
        Throws:
        ParseException - In case of invalid cron expression by parameter cronSchedule
    • Method Detail

      • 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 interface ISyncService
        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 interface ISyncService
        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 interface ISyncService
        Parameters:
        pxpComponentInformation - the pxpComponentInformation
        Throws:
        SynchronizerException - in case of an error while pushing the information