01: /**
02: * Copyright (C) 2004-2007 Jive Software. All rights reserved.
03: *
04: * This software is published under the terms of the GNU Public License (GPL),
05: * a copy of which is included in this distribution.
06: */package org.xmpp.component;
07:
08: import org.xmpp.packet.StreamError;
09:
10: /**
11: * Thrown when an exception occors with a Component.
12: *
13: * @author Matt Tucker
14: */
15: public class ComponentException extends Exception {
16:
17: private StreamError streamError;
18:
19: public ComponentException() {
20: super ();
21: }
22:
23: public ComponentException(String message) {
24: super (message);
25: }
26:
27: public ComponentException(String message, Throwable cause) {
28: super (message, cause);
29: }
30:
31: public ComponentException(Throwable cause) {
32: super (cause);
33: }
34:
35: public ComponentException(String message, StreamError streamError) {
36: super (message);
37: this .streamError = streamError;
38: }
39:
40: public ComponentException(StreamError streamError) {
41: super (streamError.getCondition().toXMPP());
42: this .streamError = streamError;
43: }
44:
45: public StreamError getStreamError() {
46: return streamError;
47: }
48: }
|