| Modifier and Type | Method and Description |
|---|---|
Windward |
delete(String relativePath,
Consumer<? extends WindwardContext> consumer)
register function with delete method
|
<R> Router |
delete(String relativePath,
Supplier<R> supplier)
register function with delete method
|
static Object |
findRouter(String relativePath,
String method)
find out registered function by specific path
|
Windward |
get(String relativePath,
Consumer<? extends WindwardContext> consumer)
register function with get method
|
<R> Windward |
get(String relativePath,
Supplier<R> supplier)
register function with get method
|
RouterGroup |
group(String relativePath)
define new router with specific relativePath
|
static List<Handler> |
handlers()
get handlers
|
Windward |
post(String relativePath,
Consumer<? extends WindwardContext> consumer)
register function with post method
|
<R> Router |
post(String relativePath,
Supplier<R> supplier)
register function with post method
|
Windward |
put(String relativePath,
Consumer<? extends WindwardContext> consumer)
register function with put method
|
<R> Router |
put(String relativePath,
Supplier<R> supplier)
register function with put method
|
Windward |
registerHandler(Handler... handlers)
register handler
|
void |
run()
run server
|
static Windward |
setup() |
static Windward |
setup(int port,
Handler... handlers)
prepare core engine of Windward
|
static Windward |
setup(int port,
String relativePath,
Handler... handlers)
prepare core engine of Windward
|
Windward |
then() |
public static Windward setup()
public static Windward setup(int port, Handler... handlers)
port - server portpublic static Windward setup(int port, String relativePath, Handler... handlers)
port - server portrelativePath - path of default router grouppublic RouterGroup group(String relativePath)
relativePath - relativePathpublic Windward registerHandler(Handler... handlers)
handlers - handlerpublic static Object findRouter(String relativePath, String method)
relativePath - relativePathpublic Windward then()
public <R> Windward get(String relativePath, Supplier<R> supplier)
public Windward get(String relativePath, Consumer<? extends WindwardContext> consumer)
public <R> Router put(String relativePath, Supplier<R> supplier)
Routerpublic Windward put(String relativePath, Consumer<? extends WindwardContext> consumer)
public <R> Router post(String relativePath, Supplier<R> supplier)
Routerpublic Windward post(String relativePath, Consumer<? extends WindwardContext> consumer)
public <R> Router delete(String relativePath, Supplier<R> supplier)
RouterCopyright © 2023 flmelody. All rights reserved.