Container request filter

It manages the requests through the ContainerRequestContext. This context manages different informations as the used language, the input stream, the headers and the security contexts. Here a sample:

public class RegisterCall implements ContainerRequestFilter 
{
@Override
public void filter(ContainerRequestContext requestContext) throws IOException {
String calledMethod = requestContext.getMethod();
requestContext.setProperty("calledMethod", calledMethod);
}
}

This filter adds a property to the request setting the actual method used by the client against the service.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.106.232