org.baswell.routes
Class RedirectTo

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.baswell.routes.RedirectTo
All Implemented Interfaces:
java.io.Serializable

public class RedirectTo
extends java.lang.RuntimeException

When thrown from BeforeRoute or Route methods the current request will immediately (no further processing) be redirected to the given redirectUrl.

See Also:
Serialized Form

Field Summary
 java.lang.String redirectUrl
           
 
Constructor Summary
RedirectTo(java.lang.String redirectUrl)
          If redirectUrl is not a fully qualified URL then it will be considered relative from the current HTTP request.
RedirectTo(java.net.URL redirectUrl)
           
 
Method Summary
 
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

redirectUrl

public final java.lang.String redirectUrl
Constructor Detail

RedirectTo

public RedirectTo(java.lang.String redirectUrl)
If redirectUrl is not a fully qualified URL then it will be considered relative from the current HTTP request.

Parameters:
redirectUrl -

RedirectTo

public RedirectTo(java.net.URL redirectUrl)