KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jivesoftware > messenger > muc > ServiceUnavailableException


1 /**
2  * $RCSfile: ServiceUnavailableException.java,v $
3  * $Revision: 1.1 $
4  * $Date: 2005/04/21 15:41:22 $
5  *
6  * Copyright (C) 2004 Jive Software. All rights reserved.
7  *
8  * This software is published under the terms of the GNU Public License (GPL),
9  * a copy of which is included in this distribution.
10  */

11
12 package org.jivesoftware.messenger.muc;
13
14 import java.io.PrintStream JavaDoc;
15 import java.io.PrintWriter JavaDoc;
16
17 /**
18  * Exception used for representing that the MultiUserChat service is not available at the moment.
19  * There are many reasons why a ServiceUnavailableException could occur such as: a user is trying
20  * to join a room that has reached the max number of occupants.
21  *
22  * @author Gaston Dombiak
23  */

24 public class ServiceUnavailableException extends Exception JavaDoc {
25
26     private static final long serialVersionUID = 1L;
27
28     private Throwable JavaDoc nestedThrowable = null;
29
30     public ServiceUnavailableException() {
31         super();
32     }
33
34     public ServiceUnavailableException(String JavaDoc msg) {
35         super(msg);
36     }
37
38     public ServiceUnavailableException(Throwable JavaDoc nestedThrowable) {
39         this.nestedThrowable = nestedThrowable;
40     }
41
42     public ServiceUnavailableException(String JavaDoc msg, Throwable JavaDoc nestedThrowable) {
43         super(msg);
44         this.nestedThrowable = nestedThrowable;
45     }
46
47     public void printStackTrace() {
48         super.printStackTrace();
49         if (nestedThrowable != null) {
50             nestedThrowable.printStackTrace();
51         }
52     }
53
54     public void printStackTrace(PrintStream JavaDoc ps) {
55         super.printStackTrace(ps);
56         if (nestedThrowable != null) {
57             nestedThrowable.printStackTrace(ps);
58         }
59     }
60
61     public void printStackTrace(PrintWriter JavaDoc pw) {
62         super.printStackTrace(pw);
63         if (nestedThrowable != null) {
64             nestedThrowable.printStackTrace(pw);
65         }
66     }
67 }
68
Popular Tags