public interface ControllerRedirectEvent extends MvcEvent
Event fired when a controller returns a redirect status code. 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)
}
set to the status codes to 303 and 307, respectively. Must be
fired after AfterControllerEvent
.
For example:
public class EventObserver {
public void onControllerRedirect(@Observes ControllerRedirectEvent e) {
...
}
}
Observes
Modifier and Type | Method and Description |
---|---|
URI |
getLocation()
The target of the redirection.
|
javax.ws.rs.container.ResourceInfo |
getResourceInfo()
Access to the current request controller information.
|
javax.ws.rs.core.UriInfo |
getUriInfo()
Access to the current request URI information.
|
javax.ws.rs.core.UriInfo getUriInfo()
UriInfo
javax.ws.rs.container.ResourceInfo getResourceInfo()
ResourceInfo
URI getLocation()
Copyright © 2015 Oracle Corporation. All rights reserved.