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.