Search in sources :

Example 1 with NotificationWebServiceConfiguration

use of org.opensmartgridplatform.adapter.ws.domain.entities.NotificationWebServiceConfiguration in project open-smart-grid-platform by OSGP.

the class NotificationWebServiceConfigurationBuilder method build.

public NotificationWebServiceConfiguration build() {
    final NotificationWebServiceConfiguration config = new NotificationWebServiceConfiguration(new ApplicationDataLookupKey(this.organisationIdentification, this.applicationName), this.marshallerContextPath, this.targetUri);
    config.useKeyStore(this.keyStoreType, this.keyStoreLocation, this.keyStorePassword);
    config.useTrustStore(this.trustStoreType, this.trustStoreLocation, this.trustStorePassword);
    config.setMaxConnectionsPerRoute(this.maxConnectionsPerRoute);
    config.setMaxConnectionsTotal(this.maxConnectionsTotal);
    config.setConnectionTimeout(this.connectionTimeout);
    config.useCircuitBreaker(this.circuitBreakerThreshold, this.circuitBreakerDurationInitial, this.circuitBreakerDurationMaximum, this.circuitBreakerDurationMultiplier);
    return config;
}
Also used : ApplicationDataLookupKey(org.opensmartgridplatform.adapter.ws.domain.entities.ApplicationDataLookupKey) NotificationWebServiceConfiguration(org.opensmartgridplatform.adapter.ws.domain.entities.NotificationWebServiceConfiguration)

Example 2 with NotificationWebServiceConfiguration

use of org.opensmartgridplatform.adapter.ws.domain.entities.NotificationWebServiceConfiguration in project open-smart-grid-platform by OSGP.

the class Database method notificationEndpointConfigurations.

private List<NotificationWebServiceConfiguration> notificationEndpointConfigurations() {
    final NotificationWebServiceConfigurationBuilder builder = new NotificationWebServiceConfigurationBuilder().withApplicationName(this.notificationApplicationName).withMarshallerContextPath(this.notificationMarshallerContextPath).withTargetUri(this.notificationTargetUri).withoutCircuitBreakerConfig();
    final NotificationWebServiceConfiguration testOrgConfig = builder.withOrganisationIdentification("test-org").build();
    final NotificationWebServiceConfiguration noOrganisationConfig = builder.withOrganisationIdentification("no-organisation").build();
    return Arrays.asList(testOrgConfig, noOrganisationConfig);
}
Also used : NotificationWebServiceConfiguration(org.opensmartgridplatform.adapter.ws.domain.entities.NotificationWebServiceConfiguration) NotificationWebServiceConfigurationBuilder(org.opensmartgridplatform.cucumber.platform.common.glue.steps.database.ws.NotificationWebServiceConfigurationBuilder)

Example 3 with NotificationWebServiceConfiguration

use of org.opensmartgridplatform.adapter.ws.domain.entities.NotificationWebServiceConfiguration in project open-smart-grid-platform by OSGP.

the class WsNotificationDatabase method notificationEndpointConfigurations.

private List<NotificationWebServiceConfiguration> notificationEndpointConfigurations() {
    final NotificationWebServiceConfigurationBuilder builder = new NotificationWebServiceConfigurationBuilder().withApplicationName(this.applicationName).withMarshallerContextPath(this.marshallerContextPath).withTargetUri(this.targetUri).withoutCircuitBreakerConfig();
    if (!this.useKeyStore) {
        builder.withoutKeyStoreConfig().withoutTrustStoreConfig();
    }
    final NotificationWebServiceConfiguration testOrgConfig = builder.build();
    final NotificationWebServiceConfiguration noOrganisationConfig = builder.withOrganisationIdentification("no-organisation").build();
    return Arrays.asList(testOrgConfig, noOrganisationConfig);
}
Also used : NotificationWebServiceConfiguration(org.opensmartgridplatform.adapter.ws.domain.entities.NotificationWebServiceConfiguration) NotificationWebServiceConfigurationBuilder(org.opensmartgridplatform.cucumber.platform.common.glue.steps.database.ws.NotificationWebServiceConfigurationBuilder)

Example 4 with NotificationWebServiceConfiguration

use of org.opensmartgridplatform.adapter.ws.domain.entities.NotificationWebServiceConfiguration in project open-smart-grid-platform by OSGP.

the class Database method notificationEndpointConfigurations.

private List<NotificationWebServiceConfiguration> notificationEndpointConfigurations() {
    final NotificationWebServiceConfigurationBuilder builder = new NotificationWebServiceConfigurationBuilder().withApplicationName(this.notificationApplicationName).withMarshallerContextPath(this.notificationMarshallerContextPath).withTargetUri(this.notificationTargetUri).withoutCircuitBreakerConfig().withoutKeyStoreConfig().withoutTrustStoreConfig();
    final NotificationWebServiceConfiguration testOrgConfig = builder.withOrganisationIdentification("test-org").build();
    final NotificationWebServiceConfiguration noOrganisationConfig = builder.withOrganisationIdentification("no-organisation").build();
    return Arrays.asList(testOrgConfig, noOrganisationConfig);
}
Also used : NotificationWebServiceConfiguration(org.opensmartgridplatform.adapter.ws.domain.entities.NotificationWebServiceConfiguration) NotificationWebServiceConfigurationBuilder(org.opensmartgridplatform.cucumber.platform.common.glue.steps.database.ws.NotificationWebServiceConfigurationBuilder)

Example 5 with NotificationWebServiceConfiguration

use of org.opensmartgridplatform.adapter.ws.domain.entities.NotificationWebServiceConfiguration in project open-smart-grid-platform by OSGP.

the class Database method notificationEndpointConfigurations.

private List<NotificationWebServiceConfiguration> notificationEndpointConfigurations() {
    final NotificationWebServiceConfigurationBuilder builder = new NotificationWebServiceConfigurationBuilder().withApplicationName(this.notificationApplicationName).withMarshallerContextPath(this.notificationMarshallerContextPath).withTargetUri(this.notificationTargetUri);
    final NotificationWebServiceConfiguration osgpOrganizationConfig = builder.withOrganisationIdentification("OSGP").build();
    return Arrays.asList(osgpOrganizationConfig);
}
Also used : NotificationWebServiceConfiguration(org.opensmartgridplatform.adapter.ws.domain.entities.NotificationWebServiceConfiguration) NotificationWebServiceConfigurationBuilder(org.opensmartgridplatform.cucumber.platform.common.glue.steps.database.ws.NotificationWebServiceConfigurationBuilder)

Aggregations

NotificationWebServiceConfiguration (org.opensmartgridplatform.adapter.ws.domain.entities.NotificationWebServiceConfiguration)5 NotificationWebServiceConfigurationBuilder (org.opensmartgridplatform.cucumber.platform.common.glue.steps.database.ws.NotificationWebServiceConfigurationBuilder)4 ApplicationDataLookupKey (org.opensmartgridplatform.adapter.ws.domain.entities.ApplicationDataLookupKey)1