Class BkTimeable

  • All Implemented Interfaces:
    Runnable, Back

    public final class BkTimeable
    extends Thread
    implements Back
    Back decorator with maximum lifetime.

    The class is immutable and thread-safe.

    Since:
    0.14.2
    • Constructor Detail

      • BkTimeable

        public BkTimeable​(Back back,
                          long msec)
        Ctor.
        Parameters:
        back - Original back
        msec - Execution latency
    • Method Detail

      • run

        public void run()
        Specified by:
        run in interface Runnable
        Overrides:
        run in class Thread
      • accept

        public void accept​(Socket socket)
                    throws IOException
        Description copied from interface: Back
        Accept and dispatch this socket.
        Specified by:
        accept in interface Back
        Parameters:
        socket - TCP socket with HTTP
        Throws:
        IOException - If fails