public interface Router<T>
| Modifier and Type | Method and Description |
|---|---|
T |
delete(String relativePath,
Consumer<SimpleWindwardContext> consumer)
Register function with delete method
|
<C extends EnhancedWindwardContext & HttpKind> |
delete(String relativePath,
EnhancedFunction<C,?> function)
Register function with delete method
|
<R> T |
delete(String relativePath,
Supplier<R> supplier)
Register function with delete method
|
T |
get(String relativePath,
Consumer<SimpleWindwardContext> consumer)
Register function with get method
|
<C extends EnhancedWindwardContext & HttpKind> |
get(String relativePath,
EnhancedFunction<C,?> function)
Register function with get method
|
<R> T |
get(String relativePath,
Supplier<R> supplier)
Register function with get method
|
T |
http(HttpMethod httpMethod,
String relativePath,
Consumer<SimpleWindwardContext> consumer)
Register function with specific method
|
<C extends EnhancedWindwardContext & HttpKind> |
http(HttpMethod httpMethod,
String relativePath,
EnhancedFunction<C,?> function)
Register function with specific method
|
<R> T |
http(HttpMethod httpMethod,
String relativePath,
Supplier<R> supplier)
Register function with specific method
|
T |
post(String relativePath,
Consumer<SimpleWindwardContext> consumer)
Register function with post method
|
<C extends EnhancedWindwardContext & HttpKind> |
post(String relativePath,
EnhancedFunction<C,?> function)
Register function with post method
|
<R> T |
post(String relativePath,
Supplier<R> supplier)
Register function with post method
|
T |
put(String relativePath,
Consumer<SimpleWindwardContext> consumer)
Register function with put method
|
<C extends EnhancedWindwardContext & HttpKind> |
put(String relativePath,
EnhancedFunction<C,?> function)
Register function with put method
|
<R> T |
put(String relativePath,
Supplier<R> supplier)
Register function with put method
|
default T |
resource(String... pathPatterns)
Register resources path pattern
|
T |
resources(String staticResourceLocation,
String... pathPatterns)
Register resources path pattern for specific resource location
|
T |
sse(HttpMethod httpMethod,
String relativePath,
EnhancedFunction<SseWindwardContext,SseEjector> function)
Register SSE (server send event)
|
T |
sse(String relativePath,
EnhancedFunction<SseWindwardContext,SseEjector> function)
Register SSE (server send event)
|
T |
ws(String relativePath,
Consumer<WebSocketWindwardContext> consumer,
AuthorizationProvider... authorizationProviders)
Register websocket function
|
<R> T http(HttpMethod httpMethod, String relativePath, Supplier<R> supplier)
R - response datahttpMethod - http methodrelativePath - relative pathsupplier - supplierT http(HttpMethod httpMethod, String relativePath, Consumer<SimpleWindwardContext> consumer)
httpMethod - http methodrelativePath - relative pathconsumer - function to consume<C extends EnhancedWindwardContext & HttpKind> T http(HttpMethod httpMethod, String relativePath, EnhancedFunction<C,?> function)
httpMethod - method of httprelativePath - relative pathfunction - function to consume<R> T get(String relativePath, Supplier<R> supplier)
R - response datarelativePath - relative pathsupplier - supplierT get(String relativePath, Consumer<SimpleWindwardContext> consumer)
relativePath - relativePathconsumer - function to consume<C extends EnhancedWindwardContext & HttpKind> T get(String relativePath, EnhancedFunction<C,?> function)
relativePath - relative pathfunction - function to consume<R> T put(String relativePath, Supplier<R> supplier)
R - response datarelativePath - relative pathsupplier - supplierT put(String relativePath, Consumer<SimpleWindwardContext> consumer)
relativePath - relative pathconsumer - function to consume<C extends EnhancedWindwardContext & HttpKind> T put(String relativePath, EnhancedFunction<C,?> function)
relativePath - relative pathfunction - function to consume<R> T post(String relativePath, Supplier<R> supplier)
R - response datarelativePath - relative pathsupplier - supplierT post(String relativePath, Consumer<SimpleWindwardContext> consumer)
relativePath - relative pathconsumer - function to consume<C extends EnhancedWindwardContext & HttpKind> T post(String relativePath, EnhancedFunction<C,?> function)
relativePath - relative pathfunction - function to consume<R> T delete(String relativePath, Supplier<R> supplier)
R - response datarelativePath - relative pathsupplier - supplierT delete(String relativePath, Consumer<SimpleWindwardContext> consumer)
relativePath - relative pathconsumer - function to consume<C extends EnhancedWindwardContext & HttpKind> T delete(String relativePath, EnhancedFunction<C,?> function)
relativePath - relative pathfunction - function to consumeT sse(String relativePath, EnhancedFunction<SseWindwardContext,SseEjector> function)
relativePath - relative pathfunction - function to consumeT sse(HttpMethod httpMethod, String relativePath, EnhancedFunction<SseWindwardContext,SseEjector> function)
httpMethod - http methodrelativePath - relative pathfunction - function to consumeT ws(String relativePath, Consumer<WebSocketWindwardContext> consumer, AuthorizationProvider... authorizationProviders)
relativePath - relative pathconsumer - function to consumeauthorizationProviders - authorizationProvidersExtensionalWebSocketPlugindefault T resource(String... pathPatterns)
pathPatterns - resources path patternCopyright © 2024 flmelody. All rights reserved.