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
    See Also:
    Observes
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.net.URI getLocation()
      The target of the redirection.
      jakarta.ws.rs.container.ResourceInfo getResourceInfo()
      Access to the current request controller information.
      jakarta.ws.rs.core.UriInfo getUriInfo()
      Access to the current request URI information.
    • 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

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