Class FkParams

  • All Implemented Interfaces:
    Fork

    public final class FkParams
    extends Object
    implements Fork
    Fork by query params and their values, matched by regular express.

    The class is immutable and thread-safe.

    Since:
    0.4
    See Also:
    TkFork
    • Constructor Detail

      • FkParams

        public FkParams​(String param,
                        String ptn,
                        Take tke)
        Ctor.
        Parameters:
        param - Name of param
        ptn - Pattern
        tke - Take
      • FkParams

        public FkParams​(String param,
                        Pattern ptn,
                        Take tke)
        Ctor.
        Parameters:
        param - Name of param
        ptn - Pattern
        tke - Take
    • 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