KickJava   Java API By Example, From Geeks To Geeks.

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


1 /**
2  * $RCSfile: NotAllowedException.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 is not allowed to perform the requested operation
19  * in the MUCRoom. There are many reasons why a not-allowed error could occur such as: a user tries
20  * to join a room that has reached its limit of max number of occupants. A 405 error code is
21  * returned to the user that requested the invalid operation.
22  *
23  * @author Gaston Dombiak
24  */

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