Class FkHitRefresh

  • All Implemented Interfaces:
    Fork

    public final class FkHitRefresh
    extends Object
    implements Fork
    Fork by hit-refresh header.

    The class is immutable and thread-safe.

    Since:
    0.9
    See Also:
    TkFork
    • Constructor Detail

      • FkHitRefresh

        public FkHitRefresh​(File file,
                            String cmd,
                            Take tke)
        Ctor.
        Parameters:
        file - Directory to watch
        cmd - Command to execute
        tke - Target
      • FkHitRefresh

        public FkHitRefresh​(File file,
                            List<String> cmd,
                            Take tke)
        Ctor.
        Parameters:
        file - Directory to watch
        cmd - Command to execute
        tke - Target
      • FkHitRefresh

        public FkHitRefresh​(File file,
                            Runnable cmd,
                            Take tke)
        Ctor.
        Parameters:
        file - Directory to watch
        cmd - Command to execute
        tke - Target
    • 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