KickJava   Java API By Example, From Geeks To Geeks.

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


1 /**
2  * $RCSfile: ForbiddenException.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 requested operation is forbidden for the user in
19  * the MUCRoom. There are many reasons why a forbidden error could occur such as: a banned user
20  * tries to join a room where he/she is an outcast. A 403 error code is returned to the user that
21  * requested the invalid operation.
22  *
23  * @author Gaston Dombiak
24  */

25 public class ForbiddenException extends Exception JavaDoc {
26
27     private static final long serialVersionUID = 1L;
28
29     private Throwable JavaDoc nestedThrowable = null;
30
31     public ForbiddenException() {
32         super();
33     }
34
35     public ForbiddenException(String JavaDoc msg) {
36         super(msg);
37     }
38
39     public ForbiddenException(Throwable JavaDoc nestedThrowable) {
40         this.nestedThrowable = nestedThrowable;
41     }
42
43     public ForbiddenException(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