Openfire 3.9.3 Javadoc

org.jivesoftware.openfire.interceptor
Class PacketRejectedException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.jivesoftware.openfire.interceptor.PacketRejectedException
All Implemented Interfaces:
Serializable

public class PacketRejectedException
extends Exception

Thrown by a PacketInterceptor when a packet is prevented from being processed. If the packet was received then it will not be processed and a not_allowed error will be sent back to the sender of the packet. If the packet was going to be sent then the sending will be aborted.

Author:
Gaston Dombiak
See Also:
PacketInterceptor, Serialized Form

Constructor Summary
PacketRejectedException()
           
PacketRejectedException(String msg)
           
PacketRejectedException(String msg, Throwable nestedThrowable)
           
PacketRejectedException(Throwable nestedThrowable)
           
 
Method Summary
 String getRejectionMessage()
          Retuns the text to include in a message that will be sent to the sender of the packet that got rejected or null if none was defined.
 void printStackTrace()
           
 void printStackTrace(PrintStream ps)
           
 void printStackTrace(PrintWriter pw)
           
 void setRejectionMessage(String rejectionMessage)
          Sets the text to include in a message that will be sent to the sender of the packet that got rejected or null if no message will be sent to the sender of the rejected packet.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PacketRejectedException

public PacketRejectedException()

PacketRejectedException

public PacketRejectedException(String msg)

PacketRejectedException

public PacketRejectedException(Throwable nestedThrowable)

PacketRejectedException

public PacketRejectedException(String msg,
                               Throwable nestedThrowable)
Method Detail

printStackTrace

public void printStackTrace()
Overrides:
printStackTrace in class Throwable

printStackTrace

public void printStackTrace(PrintStream ps)
Overrides:
printStackTrace in class Throwable

printStackTrace

public void printStackTrace(PrintWriter pw)
Overrides:
printStackTrace in class Throwable

getRejectionMessage

public String getRejectionMessage()
Retuns the text to include in a message that will be sent to the sender of the packet that got rejected or null if none was defined. If no text was specified then no message will be sent to the sender of the rejected packet.

Returns:
the text to include in a message that will be sent to the sender of the packet that got rejected or null if none was defined.

setRejectionMessage

public void setRejectionMessage(String rejectionMessage)
Sets the text to include in a message that will be sent to the sender of the packet that got rejected or null if no message will be sent to the sender of the rejected packet. Bt default, no message will be sent.

Parameters:
rejectionMessage - the text to include in the notification message for the rejection.

Openfire 3.9.3 Javadoc

Copyright © 2003-2008 Jive Software.