|
|
|
@ -22,10 +22,7 @@ import org.eclipse.leshan.core.model.ResourceModel; |
|
|
|
import org.eclipse.leshan.core.node.LwM2mPath; |
|
|
|
import org.eclipse.leshan.server.registration.Registration; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.boot.context.event.ApplicationReadyEvent; |
|
|
|
import org.springframework.context.annotation.Lazy; |
|
|
|
import org.springframework.context.event.EventListener; |
|
|
|
import org.springframework.core.annotation.Order; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.thingsboard.server.common.data.DeviceProfile; |
|
|
|
import org.thingsboard.server.common.data.device.data.PowerMode; |
|
|
|
@ -36,6 +33,7 @@ import org.thingsboard.server.common.transport.TransportDeviceProfileCache; |
|
|
|
import org.thingsboard.server.common.transport.TransportServiceCallback; |
|
|
|
import org.thingsboard.server.common.transport.auth.ValidateDeviceCredentialsResponse; |
|
|
|
import org.thingsboard.server.gen.transport.TransportProtos; |
|
|
|
import org.thingsboard.server.queue.util.AfterStartUp; |
|
|
|
import org.thingsboard.server.queue.util.TbLwM2mTransportComponent; |
|
|
|
import org.thingsboard.server.transport.lwm2m.config.LwM2MTransportServerConfig; |
|
|
|
import org.thingsboard.server.transport.lwm2m.config.LwM2mVersion; |
|
|
|
@ -90,8 +88,7 @@ public class LwM2mClientContextImpl implements LwM2mClientContext { |
|
|
|
private final Map<String, LwM2mClient> lwM2mClientsByRegistrationId = new ConcurrentHashMap<>(); |
|
|
|
private final Map<UUID, Lwm2mDeviceProfileTransportConfiguration> profiles = new ConcurrentHashMap<>(); |
|
|
|
|
|
|
|
@EventListener(ApplicationReadyEvent.class) |
|
|
|
@Order(Integer.MAX_VALUE - 1) |
|
|
|
@AfterStartUp(order = Integer.MAX_VALUE - 1) |
|
|
|
public void init() { |
|
|
|
String nodeId = context.getNodeId(); |
|
|
|
Set<LwM2mClient> fetchedClients = clientStore.getAll(); |
|
|
|
|