Skip to content

Package: DeviceManagementTimeoutException

DeviceManagementTimeoutException

nameinstructionbranchcomplexitylinemethod
DeviceManagementTimeoutException(Throwable, Long)
M: 14 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
getTimeout()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2019, 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.exception;
14:
15: import javax.validation.constraints.NotNull;
16:
17: /**
18: * {@link DeviceManagementException} to throw when the response is not received within the given timeout.
19: *
20: * @since 1.1.0
21: */
22: public class DeviceManagementTimeoutException extends DeviceManagementException {
23:
24: private static final long serialVersionUID = 7480204887766596656L;
25:
26: private final Long timeout;
27:
28: /**
29: * Constructor.
30: *
31: * @param cause The root cause of the {@link Exception}.
32: * @param timeout The timeout of the request.
33: * @since 1.1.0
34: */
35: public DeviceManagementTimeoutException(@NotNull Throwable cause, @NotNull Long timeout) {
36: super(DeviceManagementErrorCodes.TIMEOUT, cause, timeout);
37:
38: this.timeout = timeout;
39: }
40:
41: /**
42: * Gets the timeout of the request.
43: *
44: * @return The timeout of the request.
45: * @since 1.1.0
46: */
47: public Long getTimeout() {
48: return timeout;
49: }
50: }