Interface CorsSupportBase.RequestAdapter<T>

  • Type Parameters:
    T - type of the request wrapped by the adapter
    Enclosing class:
    CorsSupportBase<Q,​R,​T extends CorsSupportBase<Q,​R,​T,​B>,​B extends CorsSupportBase.Builder<Q,​R,​T,​B>>

    protected static interface CorsSupportBase.RequestAdapter<T>
    Not for use by developers. Minimal abstraction of an HTTP request.
    • Field Detail

      • HEADERS_FOR_CORS_DIAGNOSTICS

        static final Set<String> HEADERS_FOR_CORS_DIAGNOSTICS
        Header names useful for CORS diagnostic logging messages.
    • Method Detail

      • path

        String path()
        Returns:
        possibly unnormalized path from the request
      • firstHeader

        Optional<String> firstHeader​(String key)
        Retrieves the first value for the specified header as a String.
        Parameters:
        key - header name to retrieve
        Returns:
        the first header value for the key
      • headerContainsKey

        boolean headerContainsKey​(String key)
        Reports whether the specified header exists.
        Parameters:
        key - header name to check for
        Returns:
        whether the header exists among the request's headers
      • allHeaders

        List<String> allHeaders​(String key)
        Retrieves all header values for a given key as Strings.
        Parameters:
        key - header name to retrieve
        Returns:
        header values for the header; empty list if none
      • method

        String method()
        Reports the method name for the request.
        Returns:
        the method name
      • next

        void next()
        Processes the next handler/filter/request processor in the chain.
      • request

        T request()
        Returns the request this adapter wraps.
        Returns:
        the request