KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > xmpp > component > ComponentException


1 /**
2  * $RCSfile: ComponentException.java,v $
3  * $Revision: 1.2 $
4  * $Date: 2005/03/21 16:39:39 $
5  *
6  * Copyright 2005 Jive Software.
7  *
8  * All rights reserved. Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */

20
21 package org.xmpp.component;
22
23 import org.xmpp.packet.StreamError;
24
25 /**
26  * Thrown when an exception occors with a Component.
27  *
28  * @author Matt Tucker
29  */

30 public class ComponentException extends Exception JavaDoc {
31
32     private StreamError streamError;
33
34     public ComponentException() {
35         super();
36     }
37
38     public ComponentException(String JavaDoc message) {
39         super(message);
40     }
41
42     public ComponentException(String JavaDoc message, Throwable JavaDoc cause) {
43         super(message, cause);
44     }
45
46     public ComponentException(Throwable JavaDoc cause) {
47         super(cause);
48     }
49
50     public ComponentException(String JavaDoc message, StreamError streamError) {
51         super(message);
52         this.streamError = streamError;
53     }
54
55     public ComponentException(StreamError streamError) {
56         super(streamError.getCondition().toXMPP());
57         this.streamError = streamError;
58     }
59
60     public StreamError getStreamError() {
61         return streamError;
62     }
63 }
64
Popular Tags