001/** 002 * Copyright 2017, Digi International Inc. 003 * 004 * This Source Code Form is subject to the terms of the Mozilla Public 005 * License, v. 2.0. If a copy of the MPL was not distributed with this 006 * file, you can obtain one at http://mozilla.org/MPL/2.0/. 007 * 008 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 009 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 010 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 011 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 012 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 013 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 014 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 015 */ 016package com.digi.xbee.api.exceptions; 017 018/** 019 * This exception will be thrown when performing synchronous operations and the 020 * configured time expires. 021 * 022 * @see CommunicationException 023 */ 024public class TimeoutException extends CommunicationException { 025 026 // Constants 027 private static final long serialVersionUID = 1L; 028 private static final String DEFAULT_MESSAGE = "There was a timeout while executing the requested operation."; 029 030 /** 031 * Creates a {@code TimeoutException} with {@value #DEFAULT_MESSAGE} as its 032 * error detail message. 033 */ 034 public TimeoutException() { 035 super(DEFAULT_MESSAGE); 036 } 037 038 /** 039 * Creates a {@code TimeoutException} with the specified message. 040 * 041 * @param message The associated message. 042 */ 043 public TimeoutException(String message) { 044 super(message); 045 } 046 047 /** 048 * Creates a {@code TimeoutException} with the specified message and cause. 049 * 050 * @param message The associated message. 051 * @param cause The cause of this exception. 052 * 053 * @see Throwable 054 */ 055 public TimeoutException(String message, Throwable cause) { 056 super(message, cause); 057 } 058}