| Modifier and Type | Method and Description |
|---|---|
Windward |
delete(String relativePath,
Consumer<SimpleWindwardContext> consumer)
register function with delete method
|
Router |
delete(String relativePath,
Function<EnhancedWindwardContext,?> function)
register function with delete method
|
<R> Router |
delete(String relativePath,
Supplier<R> supplier)
register function with delete method
|
static List<ExceptionHandler> |
exceptionHandlers()
get exception handlers
|
static List<Filter> |
filters()
get filters
|
static <I> FunctionMetaInfo<I> |
findRouter(String relativePath,
String method)
find out registered function by specific path
|
Windward |
get(String relativePath,
Consumer<SimpleWindwardContext> consumer)
register function with get method
|
Router |
get(String relativePath,
Function<EnhancedWindwardContext,?> function)
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
|
Windward |
post(String relativePath,
Consumer<SimpleWindwardContext> consumer)
register function with post method
|
Router |
post(String relativePath,
Function<EnhancedWindwardContext,?> function)
register function with post method
|
<R> Router |
post(String relativePath,
Supplier<R> supplier)
register function with post method
|
Windward |
put(String relativePath,
Consumer<SimpleWindwardContext> consumer)
register function with put method
|
Router |
put(String relativePath,
Function<EnhancedWindwardContext,?> function)
register function with put method
|
<R> Router |
put(String relativePath,
Supplier<R> supplier)
register function with put method
|
Windward |
registerExceptionHandler(ExceptionHandler... exceptionHandlers)
register exception handler
|
Windward |
registerFilter(Filter... filters)
register filter
|
void |
run()
run server
|
static Windward |
setup() |
static Windward |
setup(int port,
Filter... filters)
prepare core engine of Windward
|
static Windward |
setup(int port,
String contextPath,
Filter... filters)
prepare core engine of Windward
|
Windward |
then() |
public static Windward setup()
public static Windward setup(int port, Filter... filters)
port - server portpublic static Windward setup(int port, String contextPath, Filter... filters)
port - server portcontextPath - path of rootpublic void run()
throws ServerException
ServerException - exceptionpublic RouterGroup group(String relativePath)
relativePath - relativePathpublic Windward registerFilter(Filter... filters)
filters - filterpublic Windward registerExceptionHandler(ExceptionHandler... exceptionHandlers)
exceptionHandlers - exception handlerpublic static <I> FunctionMetaInfo<I> findRouter(String relativePath, String method)
relativePath - relativePathpublic static List<ExceptionHandler> exceptionHandlers()
public Windward then()
public <R> Windward get(String relativePath, Supplier<R> supplier)
Routerpublic Windward get(String relativePath, Consumer<SimpleWindwardContext> consumer)
Routerpublic Router get(String relativePath, Function<EnhancedWindwardContext,?> function)
Routerpublic <R> Router put(String relativePath, Supplier<R> supplier)
Routerpublic Windward put(String relativePath, Consumer<SimpleWindwardContext> consumer)
Routerpublic Router put(String relativePath, Function<EnhancedWindwardContext,?> function)
Routerpublic <R> Router post(String relativePath, Supplier<R> supplier)
Routerpublic Windward post(String relativePath, Consumer<SimpleWindwardContext> consumer)
Routerpublic Router post(String relativePath, Function<EnhancedWindwardContext,?> function)
Routerpublic <R> Router delete(String relativePath, Supplier<R> supplier)
Routerpublic Windward delete(String relativePath, Consumer<SimpleWindwardContext> consumer)
RouterCopyright © 2023 flmelody. All rights reserved.