1 /* 2 Licensed under the Apache License, Version 2.0 (the "License"); 3 you may not use this file except in compliance with the License. 4 You may obtain a copy of the License at 5 6 http://www.apache.org/licenses/LICENSE-2.0 7 8 Unless required by applicable law or agreed to in writing, software 9 distributed under the License is distributed on an "AS IS" BASIS, 10 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 See the License for the specific language governing permissions and 12 limitations under the License. 13 */ 14 package uk.nhs.interoperability.infrastructure; 15 16 /** 17 * An exception to report any underlying transport / communication 18 * errors. 19 * 20 * @see ITKTransportTimeoutException 21 * 22 * @author Michael Odling-Smee 23 * @author Nicholas Jones 24 * @since version 0.1 25 */ 26 public class ITKCommsException extends ITKMessagingException { 27 28 private static final long serialVersionUID = 6454181113703383977L; 29 30 /** 31 * Creates an ITKCommsException with any relevant diagnostic 32 * information about the error - such as the likely cause 33 * 34 * @param message The diagnostic message about the 35 * the error condition 36 */ 37 public ITKCommsException(String message) { 38 super(message); 39 } 40 41 /** 42 * Creates an ITKCommsException that wraps an underlying 43 * <code>Throwable</code> which has been encountered 44 * when sending/receiving a message 45 * 46 * @param cause The <code>Throwable</code> containing 47 * the root cause 48 */ 49 public ITKCommsException(Throwable cause) { 50 super(cause); 51 } 52 53 /** 54 * Creates an ITKCommsException that wraps an underlying 55 * <code>Throwable</code> which has been encountered 56 * when sending/receiving a message 57 * 58 * @param message The diagnostic message about the 59 * the error condition 60 * @param cause The <code>Throwable</code> containing 61 * the root cause 62 */ 63 public ITKCommsException(String message, Throwable cause) { 64 super(message, cause); 65 } 66 67 }