2
* Copyright 1999,2004 The Apache Software Foundation.
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
8
* http://www.apache.org/licenses/LICENSE-2.0
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.
18
package org.jboss.remoting.transport.coyote;
20
import java.io.IOException;
23
* Wrap an IOException identifying it as being caused by an abort
24
* of a request by a remote client.
26
* @author Glenn L. Nielsen
27
* @version $Revision: 1216 $ $Date: 2006-07-05 19:01:48 +0200 (Mi, 05. Jul 2006) $
30
public final class ClientAbortException extends IOException
32
private static final long serialVersionUID = -8324466966188969115L;
34
//------------------------------------------------------------ Constructors
38
* Construct a new ClientAbortException with no other information.
40
public ClientAbortException()
49
* Construct a new ClientAbortException for the specified message.
51
* @param message Message describing this exception
53
public ClientAbortException(String message)
62
* Construct a new ClientAbortException for the specified throwable.
64
* @param throwable Throwable that caused this exception
66
public ClientAbortException(Throwable throwable)
69
this(null, throwable);
75
* Construct a new ClientAbortException for the specified message
78
* @param message Message describing this exception
79
* @param throwable Throwable that caused this exception
81
public ClientAbortException(String message, Throwable throwable)
85
this.message = message;
86
this.throwable = throwable;
90
//------------------------------------------------------ Instance Variables
94
* The error message passed to our constructor (if any)
96
protected String message = null;
100
* The underlying exception or error passed to our constructor (if any)
102
protected Throwable throwable = null;
104
//---------------------------------------------------------- Public Methods
108
* Returns the message associated with this exception, if any.
110
public String getMessage()
119
* Returns the cause that caused this exception, if any.
121
public Throwable getCause()
130
* Return a formatted string that describes this exception.
132
public String toString()
135
StringBuffer sb = new StringBuffer("ClientAbortException: ");
139
if(throwable != null)
144
if(throwable != null)
146
sb.append(throwable.toString());
148
return (sb.toString());