use of org.apache.knox.gateway.filter.rewrite.api.UrlRewriteStepFlow in project knox by apache.
the class UrlRewriteStepProcessorHolder method process.
@Override
public UrlRewriteStepStatus process(UrlRewriteContext context) throws Exception {
UrlRewriteStepStatus status = UrlRewriteStepStatus.SUCCESS;
// If initialization failed then fail processing
if (processor != null) {
status = processor.process(context);
if (UrlRewriteStepStatus.SUCCESS == status && descriptor instanceof UrlRewriteFlowDescriptor && !childProcessors.isEmpty()) {
UrlRewriteFlowDescriptor flowDescriptor = (UrlRewriteFlowDescriptor) descriptor;
UrlRewriteStepFlow flow = flowDescriptor.flow();
if (flow == null) {
flow = UrlRewriteStepFlow.AND;
}
switch(flow) {
case ALL:
return processAllFlow(context);
case AND:
return processAndFlow(context);
case OR:
return processOrFlow(context);
}
}
}
return status;
}
Aggregations