java.lang.Object
org.gcube.informationsystem.resourceregistry.rest.providers.WarningResponseFilter
All Implemented Interfaces:
jakarta.ws.rs.container.ContainerResponseFilter

@Provider public class WarningResponseFilter extends Object implements jakarta.ws.rs.container.ContainerResponseFilter
Global JAX-RS response filter that automatically extracts accumulated query-parameter and content warnings from the current JAX-RS ContainerRequestContext properties and emits them as X-Warning response headers.

This filter uses request properties, which are automatically discarded and garbage-collected by the container at the end of the request cycle, making the process completely thread-safe and memory-leak free.

Author:
Luca Frosini (ISTI - CNR)
  • Constructor Details

    • WarningResponseFilter

      public WarningResponseFilter()
  • Method Details

    • filter

      public void filter(jakarta.ws.rs.container.ContainerRequestContext requestContext, jakarta.ws.rs.container.ContainerResponseContext responseContext) throws IOException
      Specified by:
      filter in interface jakarta.ws.rs.container.ContainerResponseFilter
      Throws:
      IOException