~ubuntu-branches/ubuntu/wily/libjboss-remoting-java/wily

« back to all changes in this revision

Viewing changes to src/org/jboss/remoting/transport/coyote/ClientAbortException.java

  • Committer: Package Import Robot
  • Author(s): Torsten Werner
  • Date: 2011-09-09 14:01:03 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: package-import@ubuntu.com-20110909140103-hqokx61534tas9rg
Tags: 2.5.3.SP1-1
* Newer but not newest upstream release. Do not build samples.
* Change debian/watch to upstream's svn repo.
* Add patch to fix compile error caused by tomcat update.
  (Closes: #628303)
* Switch to source format 3.0.
* Switch to debhelper level 7.
* Remove useless Depends.
* Update Standards-Version: 3.9.2.
* Update README.source.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright 1999,2004 The Apache Software Foundation.
3
 
 *
4
 
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 
 * you may not use this file except in compliance with the License.
6
 
 * You may obtain a copy of the License at
7
 
 *
8
 
 *      http://www.apache.org/licenses/LICENSE-2.0
9
 
 *
10
 
 * Unless required by applicable law or agreed to in writing, software
11
 
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 
 * See the License for the specific language governing permissions and
14
 
 * limitations under the License.
15
 
 */
16
 
 
17
 
 
18
 
package org.jboss.remoting.transport.coyote;
19
 
 
20
 
import java.io.IOException;
21
 
 
22
 
/**
23
 
 * Wrap an IOException identifying it as being caused by an abort
24
 
 * of a request by a remote client.
25
 
 *
26
 
 * @author Glenn L. Nielsen
27
 
 * @version $Revision: 1216 $ $Date: 2006-07-05 13:01:48 -0400 (Wed, 05 Jul 2006) $
28
 
 */
29
 
 
30
 
public final class ClientAbortException extends IOException
31
 
{
32
 
   private static final long serialVersionUID = -8324466966188969115L;
33
 
 
34
 
   //------------------------------------------------------------ Constructors
35
 
 
36
 
 
37
 
   /**
38
 
    * Construct a new ClientAbortException with no other information.
39
 
    */
40
 
   public ClientAbortException()
41
 
   {
42
 
 
43
 
      this(null, null);
44
 
 
45
 
   }
46
 
 
47
 
 
48
 
   /**
49
 
    * Construct a new ClientAbortException for the specified message.
50
 
    *
51
 
    * @param message Message describing this exception
52
 
    */
53
 
   public ClientAbortException(String message)
54
 
   {
55
 
 
56
 
      this(message, null);
57
 
 
58
 
   }
59
 
 
60
 
 
61
 
   /**
62
 
    * Construct a new ClientAbortException for the specified throwable.
63
 
    *
64
 
    * @param throwable Throwable that caused this exception
65
 
    */
66
 
   public ClientAbortException(Throwable throwable)
67
 
   {
68
 
 
69
 
      this(null, throwable);
70
 
 
71
 
   }
72
 
 
73
 
 
74
 
   /**
75
 
    * Construct a new ClientAbortException for the specified message
76
 
    * and throwable.
77
 
    *
78
 
    * @param message   Message describing this exception
79
 
    * @param throwable Throwable that caused this exception
80
 
    */
81
 
   public ClientAbortException(String message, Throwable throwable)
82
 
   {
83
 
 
84
 
      super();
85
 
      this.message = message;
86
 
      this.throwable = throwable;
87
 
 
88
 
   }
89
 
 
90
 
   //------------------------------------------------------ Instance Variables
91
 
 
92
 
 
93
 
   /**
94
 
    * The error message passed to our constructor (if any)
95
 
    */
96
 
   protected String message = null;
97
 
 
98
 
 
99
 
   /**
100
 
    * The underlying exception or error passed to our constructor (if any)
101
 
    */
102
 
   protected Throwable throwable = null;
103
 
 
104
 
   //---------------------------------------------------------- Public Methods
105
 
 
106
 
 
107
 
   /**
108
 
    * Returns the message associated with this exception, if any.
109
 
    */
110
 
   public String getMessage()
111
 
   {
112
 
 
113
 
      return (message);
114
 
 
115
 
   }
116
 
 
117
 
 
118
 
   /**
119
 
    * Returns the cause that caused this exception, if any.
120
 
    */
121
 
   public Throwable getCause()
122
 
   {
123
 
 
124
 
      return (throwable);
125
 
 
126
 
   }
127
 
 
128
 
 
129
 
   /**
130
 
    * Return a formatted string that describes this exception.
131
 
    */
132
 
   public String toString()
133
 
   {
134
 
 
135
 
      StringBuffer sb = new StringBuffer("ClientAbortException:  ");
136
 
      if(message != null)
137
 
      {
138
 
         sb.append(message);
139
 
         if(throwable != null)
140
 
         {
141
 
            sb.append(":  ");
142
 
         }
143
 
      }
144
 
      if(throwable != null)
145
 
      {
146
 
         sb.append(throwable.toString());
147
 
      }
148
 
      return (sb.toString());
149
 
 
150
 
   }
151
 
 
152
 
 
153
 
}