public abstract class AbstractChainHandler extends Object implements RequestHandler, Comparable<AbstractChainHandler>
onBefore -> onThrow(executed when an exception exists) -> onResult
| Modifier and Type | Field and Description |
|---|---|
protected static io.sermant.flowcontrol.common.config.XdsFlowControlConfig |
XDS_FLOW_CONTROL_CONFIG |
| Constructor and Description |
|---|
AbstractChainHandler() |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(AbstractChainHandler handler) |
protected io.sermant.flowcontrol.common.entity.RequestEntity.RequestType |
direct()
request direction, both are processed by default, In actual processing, the request direction determines whether
it needs to be processed by the current handler
|
boolean |
equals(Object obj) |
AbstractChainHandler |
getNext() |
int |
hashCode() |
protected boolean |
isSkip(RequestContext context,
io.sermant.flowcontrol.common.entity.FlowControlScenario flowControlScenario)
whether to skip the current handler
|
void |
onBefore(RequestContext context,
io.sermant.flowcontrol.common.entity.FlowControlScenario flowControlScenario)
request processing
|
void |
onResult(RequestContext context,
io.sermant.flowcontrol.common.entity.FlowControlScenario flowControlScenario,
Object result)
response processing
|
void |
onThrow(RequestContext context,
io.sermant.flowcontrol.common.entity.FlowControlScenario flowControlScenario,
Throwable throwable)
response processing
|
void |
setNext(AbstractChainHandler processor) |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetOrderprotected static final io.sermant.flowcontrol.common.config.XdsFlowControlConfig XDS_FLOW_CONTROL_CONFIG
public void onBefore(RequestContext context, io.sermant.flowcontrol.common.entity.FlowControlScenario flowControlScenario)
RequestHandleronBefore in interface RequestHandlercontext - request contextflowControlScenario - matched business informationpublic void onThrow(RequestContext context, io.sermant.flowcontrol.common.entity.FlowControlScenario flowControlScenario, Throwable throwable)
RequestHandleronThrow in interface RequestHandlercontext - request contextflowControlScenario - matched business informationthrowable - throwablepublic void onResult(RequestContext context, io.sermant.flowcontrol.common.entity.FlowControlScenario flowControlScenario, Object result)
RequestHandleronResult in interface RequestHandlercontext - request contextflowControlScenario - matched business informationresult - response resultprotected io.sermant.flowcontrol.common.entity.RequestEntity.RequestType direct()
protected boolean isSkip(RequestContext context, io.sermant.flowcontrol.common.entity.FlowControlScenario flowControlScenario)
context - requestContextflowControlScenario - matched scenario informationpublic int compareTo(AbstractChainHandler handler)
compareTo in interface Comparable<AbstractChainHandler>public void setNext(AbstractChainHandler processor)
public AbstractChainHandler getNext()
Copyright © 2025. All rights reserved.