Class FkAgent

  • All Implemented Interfaces:
    Fork

    public final class FkAgent
    extends Object
    implements Fork
    Fork by user agent criteria accepted by "User-Agent" HTTP header.

    The class is immutable and thread-safe.

    Since:
    1.7.2
    • Constructor Detail

      • FkAgent

        public FkAgent​(Take take,
                       AgentMatch match)
        Ctor.
        Parameters:
        take - Take to handle the request dynamically.
        match - Matcher.
    • Method Detail

      • route

        public Opt<Response> route​(Request req)
                            throws Exception
        Description copied from interface: Fork
        Process this request or ignore it.
        Specified by:
        route in interface Fork
        Parameters:
        req - Request
        Returns:
        Non-empty list of responses if it was processed
        Throws:
        Exception - If fails