Interface Interceptor

All Superinterfaces:
io.undertow.server.HttpHandler, LightHttpHandler, MiddlewareHandler
All Known Subinterfaces:
RequestInterceptor, ResponseInterceptor

public interface Interceptor extends MiddlewareHandler
  • Field Details

  • Method Details

    • isXmlData

      default boolean isXmlData(String contentType)
      Checks to see if the request is text/xml, text/plain, or application/xml.
      Parameters:
      contentType - - Content-Type header from exchange
      Returns:
      - true/false
    • isFormData

      default boolean isFormData(String contentType)
      Checks to see if the request is multipart/form-data or x-www-form-urlencoded.
      Parameters:
      contentType - - Content-Type header from exchange
      Returns:
      - true/false
    • isJsonData

      default boolean isJsonData(String contentType)
      Checks to see if the request is application/json.
      Parameters:
      contentType - - Content-Type header from exchange.
      Returns:
      - true/false
    • shouldAttachBody

      default boolean shouldAttachBody(io.undertow.util.HeaderMap headers)
      Check to see if the current request/response is compatible to have body data extracted.
      Parameters:
      headers - - http headers (request/response headers)
      Returns:
      - return true if we should run the body parser.
    • parseJsonMapObject

      default boolean parseJsonMapObject(io.undertow.server.HttpServerExchange ex, io.undertow.util.AttachmentKey<Object> key, String str)
    • parseJsonArrayObject

      default boolean parseJsonArrayObject(io.undertow.server.HttpServerExchange ex, io.undertow.util.AttachmentKey<Object> key, String str)
    • findMatchingPrefix

      default Optional<String> findMatchingPrefix(String url, List<String> prefixes)