Module jakarta.mvc

Interface ControllerRedirectEvent

  • All Superinterfaces:
    MvcEvent

    public interface ControllerRedirectEvent
    extends MvcEvent

    Event fired when a controller triggers a redirect. Only the status codes 301 (moved permanently), 302 (found), 303 (see other) and 307 (temporary redirect) are REQUIRED to be reported. Note that the JAX-RS methods Response.seeOther(java.net.URI)} and Response.temporaryRedirect(java.net.URI)} use the status codes to 303 and 307, respectively. Must be fired after AfterControllerEvent.

    For example:

        public class EventObserver {
             public void onControllerRedirect(@Observes ControllerRedirectEvent e) {
                ...
            }
        }
    Since:
    1.0
    Author:
    Santiago Pericas-Geertsen, Ivar Grimstad
    See Also:
    Observes
    • Method Detail

      • getUriInfo

        jakarta.ws.rs.core.UriInfo getUriInfo()
        Access to the current request URI information.
        Returns:
        URI info.
        See Also:
        UriInfo
      • getResourceInfo

        jakarta.ws.rs.container.ResourceInfo getResourceInfo()
        Access to the current request controller information.
        Returns:
        resources info.
        See Also:
        ResourceInfo
      • getLocation

        URI getLocation()
        The target of the redirection.
        Returns:
        URI of redirection.