Class RedirectBuilder


  • public class RedirectBuilder
    extends java.lang.Object
    Utility class for building redirects.
    Author:
    Stuart Douglas
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String UTF_8  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String redirect​(HttpServerExchange exchange, java.lang.String newRelativePath)
      Redirects to a new relative path.
      static java.lang.String redirect​(HttpServerExchange exchange, java.lang.String newRelativePath, boolean includeParameters)
      Redirects to a new relative path.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • UTF_8

        public static final java.lang.String UTF_8
    • Method Detail

      • redirect

        public static java.lang.String redirect​(HttpServerExchange exchange,
                                                java.lang.String newRelativePath)
        Redirects to a new relative path. All other data from the exchange is preserved.
        Parameters:
        exchange - The HTTP server exchange
        newRelativePath - The new relative path
        Returns:
      • redirect

        public static java.lang.String redirect​(HttpServerExchange exchange,
                                                java.lang.String newRelativePath,
                                                boolean includeParameters)
        Redirects to a new relative path. All other data from the exchange is preserved.
        Parameters:
        exchange - The HTTP server exchange
        newRelativePath - The new relative path
        includeParameters - If query and path parameters from the exchange should be included
        Returns: