Examples of DeviceCredentialsRepresentation


Examples of com.cumulocity.rest.representation.devicebootstrap.DeviceCredentialsRepresentation

    public DeviceCredentialsRepresentation pollCredentials(String deviceId, PollingStrategy pollingStrategy) {
        return aPoller(deviceId, pollingStrategy).startAndPoll();
    }

    private AlteringRateResultPoller<DeviceCredentialsRepresentation> aPoller(final String deviceId, PollingStrategy pollingStrategy) {
        final DeviceCredentialsRepresentation representation = new DeviceCredentialsRepresentation();
        representation.setId(deviceId);
        GetResultTask<DeviceCredentialsRepresentation> pollingTask = new GetResultTask<DeviceCredentialsRepresentation>() {

            @Override
            public DeviceCredentialsRepresentation tryGetResult() {
                return restConnector.post(url, DEVICE_CREDENTIALS, representation);
View Full Code Here

Examples of com.cumulocity.rest.representation.devicebootstrap.DeviceCredentialsRepresentation

            public void run() {
                acceptNewDeviceRequest(deviceId);
            }
        }, pollIntervalInSeconds * 2 * 1000);

        DeviceCredentialsRepresentation credentials = deviceCredentialsResource.pollCredentials(deviceId, pollIntervalInSeconds, 100);
        assertThat(credentials).isNotNull();
        assertThat(credentials.getTenantId()).isEqualTo(platform.getTenantId());
        assertThat(credentials.getUsername()).isEqualTo("device_" + deviceId);
        assertThat(credentials.getPassword()).isNotEmpty();

    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.