Class LinkResponseFilter
java.lang.Object
org.gcube.informationsystem.resourceregistry.rest.providers.LinkResponseFilter
- All Implemented Interfaces:
jakarta.ws.rs.container.ContainerResponseFilter
@Provider
public class LinkResponseFilter
extends Object
implements jakarta.ws.rs.container.ContainerResponseFilter
Global JAX-RS response filter that automatically extracts accumulated
LinkRelation
entries from the current JAX-RS ContainerRequestContext properties and emits them as
RFC 8288 Link 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. Mirrors WarningResponseFilter/ResultScopeResponseFilter's
mechanism exactly.
- Author:
- Luca Frosini (ISTI - CNR)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfilter(jakarta.ws.rs.container.ContainerRequestContext requestContext, jakarta.ws.rs.container.ContainerResponseContext responseContext)
-
Constructor Details
-
LinkResponseFilter
public LinkResponseFilter()
-
-
Method Details
-
filter
public void filter(jakarta.ws.rs.container.ContainerRequestContext requestContext, jakarta.ws.rs.container.ContainerResponseContext responseContext) throws IOException - Specified by:
filterin interfacejakarta.ws.rs.container.ContainerResponseFilter- Throws:
IOException
-