- All Superinterfaces:
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:
-
Method Summary
Modifier and TypeMethodDescriptionThe target of the redirection.jakarta.ws.rs.container.ResourceInfo
Access to the current request controller information.jakarta.ws.rs.core.UriInfo
Access to the current request URI information.
-
Method Details
-
getUriInfo
jakarta.ws.rs.core.UriInfo getUriInfo()Access to the current request URI information.- Returns:
- URI info.
- See Also:
-
getResourceInfo
jakarta.ws.rs.container.ResourceInfo getResourceInfo()Access to the current request controller information.- Returns:
- resources info.
- See Also:
-
getLocation
URI getLocation()The target of the redirection.- Returns:
- URI of redirection.
-