public final class FkMethods extends Object implements Fork
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.
TkFork
Constructor and Description |
---|
FkMethods(Collection<String> mtds,
Take tke)
Ctor.
|
FkMethods(String mtd,
Response rsp)
Ctor.
|
FkMethods(String mtd,
Take tke)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
Opt<Response> |
route(Request req)
Process this request or ignore it.
|
public FkMethods(String mtd, Response rsp)
mtd
- Methodrsp
- Responsepublic FkMethods(Collection<String> mtds, Take tke)
mtds
- Methodstke
- Takepublic Opt<Response> route(Request req) throws IOException
Fork
route
in interface Fork
req
- RequestIOException
- If failsCopyright © 2015–2018 Take. All rights reserved.