public interface ShenyuPlugin
| 限定符和类型 | 方法和说明 |
|---|---|
default void |
after(org.springframework.web.server.ServerWebExchange exchange)
Plugin after operation.
|
default void |
before(org.springframework.web.server.ServerWebExchange exchange)
Plugin before operation.
|
reactor.core.publisher.Mono<java.lang.Void> |
execute(org.springframework.web.server.ServerWebExchange exchange,
ShenyuPluginChain chain)
Process the Web request and (optionally) delegate to the next
WebFilter through the given ShenyuPluginChain. |
int |
getOrder()
return plugin order .
|
default java.lang.String |
named()
acquire plugin name.
|
default boolean |
skip(org.springframework.web.server.ServerWebExchange exchange)
plugin is executed.
|
default boolean |
skip(org.springframework.web.server.ServerWebExchange exchange,
org.apache.shenyu.common.enums.RpcTypeEnum... rpcTypes)
plugin is executed.
|
default boolean |
skipExcept(org.springframework.web.server.ServerWebExchange exchange,
org.apache.shenyu.common.enums.RpcTypeEnum... exceptRpcTypes)
the plugin execute skip except some rpc types.
|
default boolean |
skipExceptHttpLike(org.springframework.web.server.ServerWebExchange exchange)
Skip the non http call.
|
reactor.core.publisher.Mono<java.lang.Void> execute(org.springframework.web.server.ServerWebExchange exchange,
ShenyuPluginChain chain)
WebFilter through the given ShenyuPluginChain.exchange - the current server exchangechain - provides a way to delegate to the next filterMono<Void> to indicate when request processing is completeint getOrder()
default java.lang.String named()
default boolean skip(org.springframework.web.server.ServerWebExchange exchange)
exchange - the current server exchangedefault boolean skip(org.springframework.web.server.ServerWebExchange exchange,
org.apache.shenyu.common.enums.RpcTypeEnum... rpcTypes)
the same for:
Objects.equals(rpcType, typeA.getName())
|| Objects.equals(rpcType, typeB.getName())
|| Objects.equals(rpcType, type...getName())
exchange - the current server exchangerpcTypes - the skip rpc type listdefault boolean skipExcept(org.springframework.web.server.ServerWebExchange exchange,
org.apache.shenyu.common.enums.RpcTypeEnum... exceptRpcTypes)
the same for:
!Objects.equals(rpcType, typeA.getName())
&& !Objects.equals(rpcType, typeB.getName())
&& !Objects.equals(rpcType, type...getName())
exchange - the current server exchangeexceptRpcTypes - the except rpc type listdefault boolean skipExceptHttpLike(org.springframework.web.server.ServerWebExchange exchange)
exchange - the current server exchangedefault void before(org.springframework.web.server.ServerWebExchange exchange)
exchange - contextdefault void after(org.springframework.web.server.ServerWebExchange exchange)
exchange - contextCopyright © 2026 The Apache Software Foundation. All rights reserved.