Class RedirectAbsoluteXServletHandler
- java.lang.Object
-
- com.helger.xservlet.handler.specific.RedirectAbsoluteXServletHandler
-
- All Implemented Interfaces:
IXServletBasicHandler,IXServletSimpleHandler
public class RedirectAbsoluteXServletHandler extends Object implements IXServletSimpleHandler
AnIXServletSimpleHandlerthat does a redirect to a fixed URL.- Author:
- Philip Helger
-
-
Constructor Summary
Constructors Constructor Description RedirectAbsoluteXServletHandler(com.helger.commons.url.ISimpleURL aTargetURL)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.helger.commons.url.ISimpleURLgetTargetURL()voidhandleRequest(com.helger.web.scope.IRequestWebScopeWithoutResponse aRequestScope, com.helger.servlet.response.UnifiedResponse aUnifiedResponse)This is the main request handling method.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.helger.xservlet.handler.IXServletBasicHandler
onServletDestroy, onServletInit
-
Methods inherited from interface com.helger.xservlet.handler.simple.IXServletSimpleHandler
createUnifiedResponse, getLastModificationDateTime, getSupportedETag, initRequestState, onException, onRequestBegin, onRequestEnd
-
-
-
-
Constructor Detail
-
RedirectAbsoluteXServletHandler
public RedirectAbsoluteXServletHandler(@Nonnull com.helger.commons.url.ISimpleURL aTargetURL)
Constructor.- Parameters:
aTargetURL- The URL to redirect to. Is interpreted as an absolute URL. May not benull.
-
-
Method Detail
-
getTargetURL
@Nonnull @Nonempty public final com.helger.commons.url.ISimpleURL getTargetURL()
- Returns:
- The target URL as provided in the constructor. Never
null. - Since:
- 9.3.1
-
handleRequest
public void handleRequest(@Nonnull com.helger.web.scope.IRequestWebScopeWithoutResponse aRequestScope, @Nonnull com.helger.servlet.response.UnifiedResponse aUnifiedResponse) throws Exception
Description copied from interface:IXServletSimpleHandlerThis is the main request handling method. Overwrite this method to fill your HTTP response.- Specified by:
handleRequestin interfaceIXServletSimpleHandler- Parameters:
aRequestScope- The request scope to use. There is no direct access to theHttpServletResponse. Everything must be handled with the unified response! Nevernull.aUnifiedResponse- The response object to be filled. Nevernull.- Throws:
Exception- In case of an error
-
-