org.apache.wicket.protocol.http.servlet
Class AbortWithHttpStatusException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.apache.wicket.AbortException
                  extended by org.apache.wicket.AbstractRestartResponseException
                      extended by org.apache.wicket.protocol.http.servlet.AbortWithHttpStatusException
All Implemented Interfaces:
java.io.Serializable

public class AbortWithHttpStatusException
extends AbstractRestartResponseException

Causes Wicket to abort processing and set the specified HTTP status code. An IllegalStateException will be thrown if HTTP status code could not be set and the optional parameter is specified as false. This exception can be thrown from a page or a resource.

Author:
Igor Vaynberg (ivaynberg), Gili Tzabari
See Also:
HttpServletResponse, Serialized Form

Constructor Summary
AbortWithHttpStatusException(int status, boolean statusCodeOptional)
          Constructor
 
Method Summary
 int getStatus()
           
 
Methods inherited from class org.apache.wicket.AbortException
fillInStackTrace
 
Methods inherited from class java.lang.Throwable
getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbortWithHttpStatusException

public AbortWithHttpStatusException(int status,
                                    boolean statusCodeOptional)
Constructor

Parameters:
status - The http response status code
statusCodeOptional - If true and http status could not be set, an IllegalStateException will be thrown
Method Detail

getStatus

public final int getStatus()
Returns:
the response status code


Copyright © 2004-2010 Apache Software Foundation. All Rights Reserved.