1 /*
2 * Copyright (c) 2006 Stiftung Deutsches Elektronen-Synchroton,
3 * Member of the Helmholtz Association, (DESY), HAMBURG, GERMANY.
4 *
5 * THIS SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "../AS IS" BASIS.
6 * WITHOUT WARRANTY OF ANY KIND, EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED
7 * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR PARTICULAR PURPOSE AND
8 * NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
9 * FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
10 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
11 * THE USE OR OTHER DEALINGS IN THE SOFTWARE. SHOULD THE SOFTWARE PROVE DEFECTIVE
12 * IN ANY RESPECT, THE USER ASSUMES THE COST OF ANY NECESSARY SERVICING, REPAIR OR
13 * CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE.
14 * NO USE OF ANY SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
15 * DESY HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,
16 * OR MODIFICATIONS.
17 * THE FULL LICENSE SPECIFYING FOR THE SOFTWARE THE REDISTRIBUTION, MODIFICATION,
18 * USAGE AND OTHER RIGHTS AND OBLIGATIONS IS INCLUDED WITH THE DISTRIBUTION OF THIS
19 * PROJECT IN THE FILE LICENSE.HTML. IF THE LICENSE IS NOT INCLUDED YOU MAY FIND A COPY
20 * AT HTTP://WWW.DESY.DE/LEGAL/LICENSE.HTM
21 */
22
23 package de.desy.acop.transport;
24
25 import com.cosylab.util.CommonException;
26
27
28 /**
29 * This exception signals that connection to remote system has failed for some reason.
30 *
31 * @author Igor Kriznar (igor.kriznarATcosylab.com)
32 *
33 */
34 public class ConnectionFailed extends CommonException {
35
36 private static final long serialVersionUID = 1L;
37
38 /**
39 * Creates new instance of ConnectionFailed.
40 */
41 public ConnectionFailed() {
42 super("","Connection failed for unknown reason.");
43 }
44 /**
45 * Creates new instance of ConnectionFailed.
46 */
47 public ConnectionFailed(ConnectionParameters p) {
48 super(p,"Connection to '"+p.getRemoteName()+"' failed for unknown reason.");
49 }
50
51 /**
52 * Creates new instance of ConnectionFailed.
53 */
54 public ConnectionFailed(ConnectionParameters p, Throwable e) {
55 super(p,"Connection to '"+p.getRemoteName()+"' failed for unknown reason.",e);
56 }
57
58 /**
59 * Creates new instance of ConnectionFailed.
60 */
61 public ConnectionFailed(String message,Throwable t) {
62 super("",message,t);
63 }
64 }