use of org.eclipse.leshan.client.resource.LwM2mObjectEnabler in project leshan by eclipse.
the class BootstrapIntegrationTestHelper method createClient.
private void createClient(Security security) {
ObjectsInitializer initializer = new ObjectsInitializer();
// Initialize LWM2M Object Tree
initializer.setInstancesForObject(LwM2mId.SECURITY, security);
initializer.setInstancesForObject(LwM2mId.DEVICE, new Device("Eclipse Leshan", IntegrationTestHelper.MODEL_NUMBER, "12345", "U"));
List<LwM2mObjectEnabler> objects = initializer.createMandatory();
objects.add(initializer.create(2));
// Create Leshan Client
LeshanClientBuilder builder = new LeshanClientBuilder(getCurrentEndpoint());
builder.setObjects(objects);
client = builder.build();
}
Aggregations