KickJava   Java API By Example, From Geeks To Geeks.

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


1 /**
2  * $RCSfile: RoomLockedException.java,v $
3  * $Revision: 1.2 $
4  * $Date: 2004/10/25 23:41:59 $
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 user can't join a room since it's been locked. A 404
19  * error code is returned to the user that requested the invalid operation.
20  *
21  * @author Gaston Dombiak
22  */

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