Package org.takes.tk

Class TkFixed

  • All Implemented Interfaces:
    Take

    public final class TkFixed
    extends TkWrap
    Take with fixed response.

    This class always returns the same response, provided via constructor and encapsulated.

    The class is immutable and thread-safe.

    Since:
    0.1
    • Constructor Detail

      • TkFixed

        public TkFixed​(String text)
        Ctor.
        Parameters:
        text - Response text
        Since:
        0.23
      • TkFixed

        public TkFixed​(org.cactoos.Scalar<Response> res)
        Ctor.
        Parameters:
        res - Response
        Since:
        1.4
      • TkFixed

        public TkFixed​(Response res)
        Ctor.
        Parameters:
        res - Response