Skip to content

Package: DeviceCallTimeoutException

DeviceCallTimeoutException

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