org.owasp.esapi.errors
Class IntrusionException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.lang.RuntimeException
              extended byorg.owasp.esapi.errors.IntrusionException
All Implemented Interfaces:
java.io.Serializable

public class IntrusionException
extends java.lang.RuntimeException

An IntrusionException should be thrown anytime an error condition arises that is likely to be the result of an attack in progress. IntrusionExceptions are handled specially by the IntrusionDetector, which is equipped to respond by either specially logging the event, logging out the current user, or invalidating the current user's account.

Unlike other exceptions in the ESAPI, the IntrusionException is a RuntimeException so that it can be thrown from anywhere and will not require a lot of special exception handling.

Author:
Jeff Williams (jeff.williams@aspectsecurity.com)
See Also:
Serialized Form

Constructor Summary
IntrusionException()
          Internal classes may throw an IntrusionException to the IntrusionDetector, which generates the appropriate log message.
IntrusionException(java.lang.String userMessage, java.lang.String logMessage)
          Creates a new instance of IntrusionException.
IntrusionException(java.lang.String userMessage, java.lang.String logMessage, java.lang.Throwable cause)
          Instantiates a new intrusion exception.
 
Method Summary
 java.lang.String getLogMessage()
           
 java.lang.String getUserMessage()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IntrusionException

public IntrusionException()
Internal classes may throw an IntrusionException to the IntrusionDetector, which generates the appropriate log message.


IntrusionException

public IntrusionException(java.lang.String userMessage,
                          java.lang.String logMessage)
Creates a new instance of IntrusionException.


IntrusionException

public IntrusionException(java.lang.String userMessage,
                          java.lang.String logMessage,
                          java.lang.Throwable cause)
Instantiates a new intrusion exception.

Parameters:
cause - the cause
Method Detail

getUserMessage

public java.lang.String getUserMessage()

getLogMessage

public java.lang.String getLogMessage()