public class AbstractInterceptor extends Object implements Interceptor
Interceptor.Flow| Modifier and Type | Field and Description |
|---|---|
protected String |
id |
protected String |
name |
protected Router |
router |
| Constructor and Description |
|---|
AbstractInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
String |
getDisplayName() |
EnumSet<Interceptor.Flow> |
getFlow() |
String |
getHelpId() |
String |
getId() |
String |
getLongDescription() |
Router |
getRouter() |
<T extends Rule> |
getRule() |
String |
getShortDescription() |
void |
handleAbort(Exchange exchange)
Called when any
Interceptor.handleRequest(Exchange) or
Interceptor.handleResponse(Exchange) later in the chain returned
Outcome.ABORT or threw an exception. |
Outcome |
handleRequest(Exchange exc) |
Outcome |
handleResponse(Exchange exc) |
void |
init()
Called after parsing is complete and this has been added to the object tree (whose root is Router).
|
void |
init(Router router) |
void |
setDisplayName(String name) |
void |
setFlow(EnumSet<Interceptor.Flow> flow) |
void |
setId(String id) |
public Outcome handleRequest(Exchange exc) throws Exception
handleRequest in interface InterceptorExceptionpublic Outcome handleResponse(Exchange exc) throws Exception
handleResponse in interface InterceptorExceptionpublic void handleAbort(Exchange exchange)
InterceptorInterceptor.handleRequest(Exchange) or
Interceptor.handleResponse(Exchange) later in the chain returned
Outcome.ABORT or threw an exception.
handleAbort is called in the reverse order of the chain (as
handleResponse is).handleAbort in interface Interceptorpublic String getDisplayName()
getDisplayName in interface Interceptorpublic void setDisplayName(String name)
setDisplayName in interface Interceptorpublic String getId()
getId in interface Interceptorpublic void setId(String id)
setId in interface Interceptorpublic void setFlow(EnumSet<Interceptor.Flow> flow)
setFlow in interface Interceptorpublic EnumSet<Interceptor.Flow> getFlow()
getFlow in interface Interceptorpublic String getShortDescription()
getShortDescription in interface Interceptorpublic String getLongDescription()
getLongDescription in interface Interceptorpublic final String getHelpId()
getHelpId in interface Interceptorpublic void init()
throws Exception
Exceptionpublic void init(Router router) throws Exception
init in interface InterceptorExceptionpublic <T extends Rule> T getRule()
public Router getRouter()
getRouter in interface InterceptorCopyright © 2021. All Rights Reserved.