Package org.takes.facets.fork
Class FkMethods
- java.lang.Object
-
- org.takes.facets.fork.FkMethods
-
- All Implemented Interfaces:
Fork
public final class FkMethods extends Object implements Fork
Fork by method matching.Use this class in combination with
TkFork
, for example:Take take = new TkFork( new FkMethods("GET", new TkLoad()), new FkMethods("PUT", new TkSave()) );
The class is immutable and thread-safe.
- Since:
- 0.4
- See Also:
TkFork
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Opt<Response>
route(Request req)
Process this request or ignore it.
-
-
-
Constructor Detail
-
FkMethods
public FkMethods(String mtd, Response rsp)
Ctor.- Parameters:
mtd
- Methodrsp
- Response- Since:
- 0.22
-
FkMethods
public FkMethods(Collection<String> mtds, Take tke)
Ctor.- Parameters:
mtds
- Methodstke
- Take
-
-