public abstract class AbstractRouterGroup<M> extends Object implements RouterGroup<M>
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractRouterGroup(M manager) |
protected |
AbstractRouterGroup(M manager,
String groupPath) |
| Modifier and Type | Method and Description |
|---|---|
RouterGroup<M> |
delete(String relativePath,
Consumer<SimpleWindwardContext> consumer)
register function with delete method
|
RouterGroup<M> |
delete(String relativePath,
Function<EnhancedWindwardContext,?> function)
register function with delete method
|
<R> RouterGroup<M> |
delete(String relativePath,
Supplier<R> supplier)
register function with delete method
|
M |
end()
return this groups manager, so that we can bind more routers of root
|
RouterGroup<M> |
get(String relativePath,
Consumer<SimpleWindwardContext> consumer)
register function with get method
|
RouterGroup<M> |
get(String relativePath,
Function<EnhancedWindwardContext,?> function)
register function with get method
|
<R> RouterGroup<M> |
get(String relativePath,
Supplier<R> supplier)
register function with get method
|
RouterGroup<M> |
http(HttpMethod httpMethod,
String relativePath,
Consumer<SimpleWindwardContext> consumer)
register function with specific method
|
RouterGroup<M> |
http(HttpMethod httpMethod,
String relativePath,
Function<EnhancedWindwardContext,?> function)
register function with specific method
|
<R> RouterGroup<M> |
http(HttpMethod httpMethod,
String relativePath,
Supplier<R> supplier)
register function with specific method
|
<R> R |
matchRouter(String relativePath,
String method)
find out matched router function
|
RouterGroup<M> |
post(String relativePath,
Consumer<SimpleWindwardContext> consumer)
register function with post method
|
RouterGroup<M> |
post(String relativePath,
Function<EnhancedWindwardContext,?> function)
register function with post method
|
<R> RouterGroup<M> |
post(String relativePath,
Supplier<R> supplier)
register function with post method
|
RouterGroup<M> |
put(String relativePath,
Consumer<SimpleWindwardContext> consumer)
register function with put method
|
RouterGroup<M> |
put(String relativePath,
Function<EnhancedWindwardContext,?> function)
register function with put method
|
<R> RouterGroup<M> |
put(String relativePath,
Supplier<R> supplier)
register function with put method
|
protected void |
setGroupPath(String groupPath) |
RouterGroup<M> |
ws(String relativePath,
Consumer<WebSocketWindwardContext> consumer)
register websocket function
|
protected AbstractRouterGroup(M manager)
protected void setGroupPath(String groupPath)
public M end()
RouterGroupend in interface RouterGroup<M>public <R> RouterGroup<M> get(String relativePath, Supplier<R> supplier)
Routerpublic RouterGroup<M> get(String relativePath, Consumer<SimpleWindwardContext> consumer)
Routerpublic RouterGroup<M> get(String relativePath, Function<EnhancedWindwardContext,?> function)
Routerpublic <R> RouterGroup<M> put(String relativePath, Supplier<R> supplier)
Routerpublic RouterGroup<M> put(String relativePath, Consumer<SimpleWindwardContext> consumer)
Routerpublic RouterGroup<M> put(String relativePath, Function<EnhancedWindwardContext,?> function)
Routerpublic <R> RouterGroup<M> post(String relativePath, Supplier<R> supplier)
Routerpublic RouterGroup<M> post(String relativePath, Consumer<SimpleWindwardContext> consumer)
Routerpublic RouterGroup<M> post(String relativePath, Function<EnhancedWindwardContext,?> function)
Routerpublic <R> RouterGroup<M> delete(String relativePath, Supplier<R> supplier)
Routerpublic RouterGroup<M> delete(String relativePath, Consumer<SimpleWindwardContext> consumer)
Routerpublic RouterGroup<M> delete(String relativePath, Function<EnhancedWindwardContext,?> function)
Routerpublic RouterGroup<M> ws(String relativePath, Consumer<WebSocketWindwardContext> consumer)
Routerpublic <R> RouterGroup<M> http(HttpMethod httpMethod, String relativePath, Supplier<R> supplier)
Routerpublic RouterGroup<M> http(HttpMethod httpMethod, String relativePath, Consumer<SimpleWindwardContext> consumer)
Routerpublic RouterGroup<M> http(HttpMethod httpMethod, String relativePath, Function<EnhancedWindwardContext,?> function)
Routerpublic <R> R matchRouter(String relativePath, String method)
RouterGroupmatchRouter in interface RouterGroup<M>R - router typerelativePath - relativePathmethod - methodCopyright © 2023 flmelody. All rights reserved.