public interface Take
Take is a momentary snapshot of in-server reality, visible to the
end user via printable Response
. Each take is immutable.
Each take is instantiated and returned by method route()
or
Takes
. For example, this is a simple web server
that returns "hello, world!" plain text web page:
new FtBasic( new TsFixed( new Take() { @Override public Response act() { return new RsText("hello, world!"); } } ), 8080 ).start(Exit.NEVER);
All implementations of this interface must be immutable and thread-safe.
Takes
Response act() throws IOException
IOException
- If failsCopyright © 2015 Takes. All rights reserved.