Skip to content

Package: DeviceRequestManagementService

DeviceRequestManagementService

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2017, 2022 Eurotech and/or its affiliates and others
3: *
4: * This program and the accompanying materials are made
5: * available under the terms of the Eclipse Public License 2.0
6: * which is available at https://www.eclipse.org/legal/epl-2.0/
7: *
8: * SPDX-License-Identifier: EPL-2.0
9: *
10: * Contributors:
11: * Eurotech - initial API and implementation
12: *******************************************************************************/
13: package org.eclipse.kapua.service.device.management.request;
14:
15: import org.eclipse.kapua.KapuaException;
16: import org.eclipse.kapua.model.id.KapuaId;
17: import org.eclipse.kapua.service.device.management.DeviceManagementService;
18: import org.eclipse.kapua.service.device.management.request.message.request.GenericRequestMessage;
19: import org.eclipse.kapua.service.device.management.request.message.response.GenericResponseMessage;
20:
21: public interface DeviceRequestManagementService extends DeviceManagementService {
22:
23: /**
24: * Execute the given device request with the provided options
25: *
26: * @param requestInput The {@link GenericRequestMessage} for this request
27: * @param timeout The timeout in milliseconds for the request to complete
28: * @return the response from the device.
29: * @throws KapuaException if error occurs during processing
30: * @since 1.0.0
31: * @deprecated since 1.1.0. Please make use of {@link #exec(KapuaId, KapuaId, GenericRequestMessage, Long)}.
32: */
33: @Deprecated
34: GenericResponseMessage exec(GenericRequestMessage requestInput, Long timeout) throws KapuaException;
35:
36: /**
37: * Execute the given device request with the provided options
38: *
39: * @param scopeId The scope {@link KapuaId} of the target device
40: * @param deviceId The device {@link KapuaId} of the target device
41: * @param requestInput The {@link GenericRequestMessage} for this request
42: * @param timeout The timeout in milliseconds for the request to complete
43: * @return the response from the device
44: * @throws KapuaException if error occurs during processing
45: * @since 1.1.0
46: */
47: GenericResponseMessage exec(KapuaId scopeId, KapuaId deviceId, GenericRequestMessage requestInput, Long timeout) throws KapuaException;
48: }