Package fr.gouv.vitam.elastic.kibana.interceptor.rest

# Class InterceptorResource

java.lang.Object
fr.gouv.vitam.elastic.kibana.interceptor.rest.InterceptorResource

@Path("/") public class InterceptorResource extends Object
InterceptorResource : intercept request between elastic and kibana replace underscore by sharp and suppress undesired header

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `InterceptorResource(InterceptorConfiguration interceptorConfiguration)`
  Constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `jakarta.ws.rs.core.Response`
  `handleHeadElasticRequestFromKibana(jakarta.ws.rs.core.UriInfo info, String url, jakarta.servlet.http.HttpServletRequest req, jakarta.ws.rs.core.HttpHeaders headers)`
  Juste Filter the request not the response
  `jakarta.ws.rs.core.Response`
  `process(String url, jakarta.ws.rs.core.UriInfo info, jakarta.servlet.http.HttpServletRequest req, jakarta.ws.rs.core.HttpHeaders headers)`
  Filter kibana request and response

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### InterceptorResource

    public InterceptorResource(InterceptorConfiguration interceptorConfiguration)
    Constructor

- ## Method Details

  - ### handleHeadElasticRequestFromKibana

    @HEAD @Path("{url: .*}") public jakarta.ws.rs.core.Response handleHeadElasticRequestFromKibana(@Context jakarta.ws.rs.core.UriInfo info, @PathParam("url") String url, @Context jakarta.servlet.http.HttpServletRequest req, @Context jakarta.ws.rs.core.HttpHeaders headers)
    Juste Filter the request not the response
    Parameters:
      `info` - UriInfo
      `url` - url
      `req` - HttpServletRequest
      `headers` - HttpHeaders
    Returns:
      elasticSearch response.

  - ### process

    @GET @POST @OPTIONS @DELETE @PUT @Path("{url: .*}") public jakarta.ws.rs.core.Response process(@PathParam("url") String url, @Context jakarta.ws.rs.core.UriInfo info, @Context jakarta.servlet.http.HttpServletRequest req, @Context jakarta.ws.rs.core.HttpHeaders headers) throws IOException
    Filter kibana request and response
    Parameters:
      `url` - url
      `info` - UriInfo
      `req` - HttpServletRequest
      `headers` - HttpHeaders
    Returns:
      the given elasticsearch Response filtered with sharp
    Throws:
      `IOException` - IOException