Search in sources :

Example 6 with NotificationService

use of com.adobe.target.edge.client.service.NotificationService in project target-java-sdk by adobe.

the class OnDeviceDecisioningServicesManager method getServices.

public OnDeviceDecisioningServices getServices(ClientConfig clientConfig, TargetService targetService) {
    String serviceKey = clientConfig.getClient();
    OnDeviceDecisioningServices services = servicesMap.get(serviceKey);
    if (services != null) {
        return services;
    }
    synchronized (servicesMap) {
        services = servicesMap.get(serviceKey);
        if (services != null) {
            return services;
        }
        services = new OnDeviceDecisioningServices();
        ClusterLocator clusterLocator = new ClusterLocator();
        services.setNotificationDeliveryService(new NotificationService(targetService, clientConfig, clusterLocator));
        services.setRuleLoader(new DefaultRuleLoader());
        services.setClusterLocator(clusterLocator);
        servicesMap.put(serviceKey, services);
        return services;
    }
}
Also used : NotificationService(com.adobe.target.edge.client.service.NotificationService)

Aggregations

NotificationService (com.adobe.target.edge.client.service.NotificationService)6 ClientConfig (com.adobe.target.edge.client.ClientConfig)5 JacksonObjectMapper (com.adobe.target.edge.client.http.JacksonObjectMapper)5 TargetDeliveryRequest (com.adobe.target.edge.client.model.TargetDeliveryRequest)5 ClusterLocator (com.adobe.target.edge.client.ondevice.ClusterLocator)5 OnDeviceDecisioningDetailsExecutor (com.adobe.target.edge.client.ondevice.OnDeviceDecisioningDetailsExecutor)5 OnDeviceDecisioningService (com.adobe.target.edge.client.ondevice.OnDeviceDecisioningService)5 DefaultTargetService (com.adobe.target.edge.client.service.DefaultTargetService)5 TelemetryService (com.adobe.target.edge.client.service.TelemetryService)5 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)5 BeforeEach (org.junit.jupiter.api.BeforeEach)5 ParamsCollator (com.adobe.target.edge.client.ondevice.collator.ParamsCollator)3 Map (java.util.Map)3 OnDeviceDecisioningEvaluator (com.adobe.target.edge.client.ondevice.OnDeviceDecisioningEvaluator)1 RuleLoader (com.adobe.target.edge.client.ondevice.RuleLoader)1 GeoClient (com.adobe.target.edge.client.ondevice.client.geo.GeoClient)1