public class HttpVerbInterceptor extends Interceptor
This package defines a number of HTTP verb (method) annotations that can be used to restrict routing. For example,
@WebMethod(name="") @DELETE
public void delete() {
// this method will be invoked only when the request is DELETE
...
}
@WebMethod(name="") @POST
public void create(@JsonBody Order order) {
// this method will be invoked only when the request is POST
...
}
This class is the actual logic that implements this semantics on top of Interceptor.
target| Constructor and Description |
|---|
HttpVerbInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
Object |
invoke(StaplerRequest request,
StaplerResponse response,
Object instance,
Object[] arguments)
Intercepts the call.
|
setTargetpublic Object invoke(StaplerRequest request, StaplerResponse response, Object instance, Object[] arguments) throws IllegalAccessException, InvocationTargetException, javax.servlet.ServletException
Interceptor
The minimal no-op interceptor would do target.invoke(request,response,instance,arguments),
but the implementation is free to do additional pre/post processing.
invoke in class Interceptorrequest - The current request we are processing.response - The current response object.instance - The domain object instance whose method we are about to invoke.arguments - Arguments of the method call.InvocationTargetException - if you want to send e.g. something from HttpResponsesIllegalAccessExceptionjavax.servlet.ServletExceptionCopyright © 2016. All rights reserved.