1 11 12 package org.jivesoftware.messenger.interceptor; 13 14 import java.io.PrintStream ; 15 import java.io.PrintWriter ; 16 17 25 public class PacketRejectedException extends Exception { 26 private static final long serialVersionUID = 1L; 27 28 private Throwable nestedThrowable = null; 29 30 34 private String rejectionMessage; 35 36 public PacketRejectedException() { 37 super(); 38 } 39 40 public PacketRejectedException(String msg) { 41 super(msg); 42 } 43 44 public PacketRejectedException(Throwable nestedThrowable) { 45 this.nestedThrowable = nestedThrowable; 46 } 47 48 public PacketRejectedException(String msg, Throwable nestedThrowable) { 49 super(msg); 50 this.nestedThrowable = nestedThrowable; 51 } 52 53 public void printStackTrace() { 54 super.printStackTrace(); 55 if (nestedThrowable != null) { 56 nestedThrowable.printStackTrace(); 57 } 58 } 59 60 public void printStackTrace(PrintStream ps) { 61 super.printStackTrace(ps); 62 if (nestedThrowable != null) { 63 nestedThrowable.printStackTrace(ps); 64 } 65 } 66 67 public void printStackTrace(PrintWriter pw) { 68 super.printStackTrace(pw); 69 if (nestedThrowable != null) { 70 nestedThrowable.printStackTrace(pw); 71 } 72 } 73 74 82 public String getRejectionMessage() { 83 return rejectionMessage; 84 } 85 86 93 public void setRejectionMessage(String rejectionMessage) { 94 this.rejectionMessage = rejectionMessage; 95 } 96 } 97 | Popular Tags |