KickJava   Java API By Example, From Geeks To Geeks.

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


1 /**
2  * $RCSfile: ConflictException.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 a conflict error in a MUCRoom. There are many reasons why a
19  * conflict error could occur such as: owner tries to remove all the owners of a room. A 409 error
20  * code is returned to the user that requested the invalid operation.
21  *
22  * @author Gaston Dombiak
23  */

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