Search in sources :

Example 1 with RequestResponseClientConfigProperties

use of org.eclipse.hono.client.RequestResponseClientConfigProperties in project hono by eclipse.

the class TenantClientImplTest method setUp.

/**
 * Sets up the fixture.
 */
@SuppressWarnings("unchecked")
@Before
public void setUp() {
    vertx = mock(Vertx.class);
    context = HonoClientUnitTestHelper.mockContext(vertx);
    final ProtonReceiver receiver = HonoClientUnitTestHelper.mockProtonReceiver();
    sender = HonoClientUnitTestHelper.mockProtonSender();
    cache = mock(ExpiringValueCache.class);
    final RequestResponseClientConfigProperties config = new RequestResponseClientConfigProperties();
    client = new TenantClientImpl(context, config, sender, receiver);
}
Also used : ProtonReceiver(io.vertx.proton.ProtonReceiver) RequestResponseClientConfigProperties(org.eclipse.hono.client.RequestResponseClientConfigProperties) ExpiringValueCache(org.eclipse.hono.cache.ExpiringValueCache) Vertx(io.vertx.core.Vertx) Before(org.junit.Before)

Example 2 with RequestResponseClientConfigProperties

use of org.eclipse.hono.client.RequestResponseClientConfigProperties in project hono by eclipse.

the class AbstractAdapterConfig method registrationServiceClientConfig.

/**
 * Exposes configuration properties for accessing the registration service as a Spring bean.
 * <p>
 * Sets the <em>amqpHostname</em> to {@code hono-device-registry} if not set explicitly.
 *
 * @return The properties.
 */
@Qualifier(RegistrationConstants.REGISTRATION_ENDPOINT)
@ConfigurationProperties(prefix = "hono.registration")
@Bean
public RequestResponseClientConfigProperties registrationServiceClientConfig() {
    final RequestResponseClientConfigProperties config = new RequestResponseClientConfigProperties();
    customizeRegistrationServiceClientConfig(config);
    return config;
}
Also used : RequestResponseClientConfigProperties(org.eclipse.hono.client.RequestResponseClientConfigProperties) Qualifier(org.springframework.beans.factory.annotation.Qualifier) ConfigurationProperties(org.springframework.boot.context.properties.ConfigurationProperties) Bean(org.springframework.context.annotation.Bean)

Example 3 with RequestResponseClientConfigProperties

use of org.eclipse.hono.client.RequestResponseClientConfigProperties in project hono by eclipse.

the class AbstractAdapterConfig method credentialsServiceClientConfig.

/**
 * Exposes configuration properties for accessing the credentials service as a Spring bean.
 *
 * @return The properties.
 */
@Qualifier(CredentialsConstants.CREDENTIALS_ENDPOINT)
@ConfigurationProperties(prefix = "hono.credentials")
@Bean
public ClientConfigProperties credentialsServiceClientConfig() {
    final RequestResponseClientConfigProperties config = new RequestResponseClientConfigProperties();
    customizeCredentialsServiceClientConfig(config);
    return config;
}
Also used : RequestResponseClientConfigProperties(org.eclipse.hono.client.RequestResponseClientConfigProperties) Qualifier(org.springframework.beans.factory.annotation.Qualifier) ConfigurationProperties(org.springframework.boot.context.properties.ConfigurationProperties) Bean(org.springframework.context.annotation.Bean)

Example 4 with RequestResponseClientConfigProperties

use of org.eclipse.hono.client.RequestResponseClientConfigProperties in project hono by eclipse.

the class RegistrationClientImplTest method setUp.

/**
 * Sets up the fixture.
 */
@SuppressWarnings("unchecked")
@Before
public void setUp() {
    vertx = mock(Vertx.class);
    context = HonoClientUnitTestHelper.mockContext(vertx);
    final ProtonReceiver receiver = HonoClientUnitTestHelper.mockProtonReceiver();
    sender = HonoClientUnitTestHelper.mockProtonSender();
    cache = mock(ExpiringValueCache.class);
    final RequestResponseClientConfigProperties config = new RequestResponseClientConfigProperties();
    client = new RegistrationClientImpl(context, config, "tenant", sender, receiver);
}
Also used : ProtonReceiver(io.vertx.proton.ProtonReceiver) RequestResponseClientConfigProperties(org.eclipse.hono.client.RequestResponseClientConfigProperties) ExpiringValueCache(org.eclipse.hono.cache.ExpiringValueCache) Vertx(io.vertx.core.Vertx) Before(org.junit.Before)

Example 5 with RequestResponseClientConfigProperties

use of org.eclipse.hono.client.RequestResponseClientConfigProperties in project hono by eclipse.

the class AbstractAdapterConfig method tenantServiceClientConfig.

/**
 * Exposes configuration properties for accessing the tenant service as a Spring bean.
 *
 * @return The properties.
 */
@Qualifier(TenantConstants.TENANT_ENDPOINT)
@ConfigurationProperties(prefix = "hono.tenant")
@Bean
public RequestResponseClientConfigProperties tenantServiceClientConfig() {
    final RequestResponseClientConfigProperties config = new RequestResponseClientConfigProperties();
    customizeTenantServiceClientConfig(config);
    return config;
}
Also used : RequestResponseClientConfigProperties(org.eclipse.hono.client.RequestResponseClientConfigProperties) Qualifier(org.springframework.beans.factory.annotation.Qualifier) ConfigurationProperties(org.springframework.boot.context.properties.ConfigurationProperties) Bean(org.springframework.context.annotation.Bean)

Aggregations

RequestResponseClientConfigProperties (org.eclipse.hono.client.RequestResponseClientConfigProperties)5 Qualifier (org.springframework.beans.factory.annotation.Qualifier)3 ConfigurationProperties (org.springframework.boot.context.properties.ConfigurationProperties)3 Bean (org.springframework.context.annotation.Bean)3 Vertx (io.vertx.core.Vertx)2 ProtonReceiver (io.vertx.proton.ProtonReceiver)2 ExpiringValueCache (org.eclipse.hono.cache.ExpiringValueCache)2 Before (org.junit.Before)2