use of org.eclipse.hono.deviceregistry.mongodb.service.MongoDbBasedRegistrationService in project hono by eclipse.
the class AmqpServerFactory method registrationService.
/**
* Creates a Device Registration service instance.
* <p>
* This factory method makes sure that each set of event senders
* is used by a single dedicated service instance only. This is necessary because during start up,
* the service will implicitly invoke {@link MessagingClientProvider#start()} in order
* to establish the senders' connection to the messaging infrastructure. For the AMQP 1.0 based senders,
* this connection needs to be established on the verticle's event loop thread in order to work properly.
*
* @return The MongoDB registration service.
*/
private RegistrationService registrationService() {
final EdgeDeviceAutoProvisioner edgeDeviceAutoProvisioner = new EdgeDeviceAutoProvisioner(vertx, deviceManagementService, eventSenderProvider(), autoProvisionerConfigProperties, tracer);
final var service = new MongoDbBasedRegistrationService(deviceDao);
service.setEdgeDeviceAutoProvisioner(edgeDeviceAutoProvisioner);
service.setTenantInformationService(tenantInformationService);
return service;
}
Aggregations