Top Description Methods
jakarta.mvc.event

public Interface ControllerRedirectEvent

extends MvcEvent
Imports
jakarta.ws.rs.container.ResourceInfo, jakarta.ws.rs.core.UriInfo, java.net.URI

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 jakarta.ws.rs.core.Response#seeOther(java.net.URI)} and jakarta.ws.rs.core.Response#temporaryRedirect(java.net.URI)} use the status codes to 303 and 307, respectively. Must be fired after jakarta.mvc.event.AfterControllerEvent.

For example:

    public class EventObserver {
        public void onControllerRedirect(@Observes ControllerRedirectEvent e) {
           ...
       }
   }
Authors
Santiago Pericas-Geertsen, Ivar Grimstad
Since
1.0
See Also
jakarta.enterprise.event.Observes

Method Summary

Modifier and TypeMethod and Description
public URI

Returns:

URI of redirection.
getLocation
()

The target of the redirection.

public ResourceInfo

Returns:

resources info.
getResourceInfo
()

Access to the current request controller information.

public UriInfo

Returns:

URI info.
getUriInfo
()

Access to the current request URI information.

Method Detail

getLocationback to summary
public URI getLocation()

The target of the redirection.

Returns:URI

URI of redirection.

getResourceInfoback to summary
public ResourceInfo getResourceInfo()

Access to the current request controller information.

Returns:ResourceInfo

resources info.

See Also
jakarta.ws.rs.container.ResourceInfo
getUriInfoback to summary
public UriInfo getUriInfo()

Access to the current request URI information.

Returns:UriInfo

URI info.

See Also
jakarta.ws.rs.core.UriInfo