KickJava   Java API By Example, From Geeks To Geeks.

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


1 /**
2  * $RCSfile: RegistrationRequiredException.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 needs to register with the room in order to perform
19  * the requested operation. There are many reasons why a registration-required error could occur
20  * such as: a user which is not a member tries to join a members-only room. A 407 error code is
21  * returned to the user that requested the invalid operation.
22  *
23  * @author Gaston Dombiak
24  */

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