Class URLRewriteMediator
- java.lang.Object
-
- org.apache.synapse.mediators.AbstractMediator
-
- org.apache.synapse.mediators.transform.url.URLRewriteMediator
-
- All Implemented Interfaces:
AspectConfigurable
,Mediator
,SynapseArtifact
public class URLRewriteMediator extends AbstractMediator
A mediator capable of rewriting URLs in messages. The input URL can be extracted from the To header of the message or any of the message properties. The rewritten URL can be set as the To header or a message property. URL rewriting is carried out based on a user defined set of rules. This mediator support rewriting entire URLs as well as URL fragments.
-
-
Field Summary
-
Fields inherited from class org.apache.synapse.mediators.AbstractMediator
log, trace, traceState
-
-
Constructor Summary
Constructors Constructor Description URLRewriteMediator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addRule(RewriteRule rule)
String
getInputProperty()
String
getOutputProperty()
List<RewriteRule>
getRules()
boolean
mediate(MessageContext messageContext)
Invokes the mediator passing the current message for mediation.void
setInputProperty(String inputProperty)
void
setOutputProperty(String outputProperty)
-
Methods inherited from class org.apache.synapse.mediators.AbstractMediator
auditLog, auditWarn, configure, disableStatistics, disableTracing, divertMediationRoute, enableStatistics, enableTracing, getAspectConfiguration, getCommentsList, getDescription, getInputType, getLastSequenceFaultHandler, getLog, getMediatorName, getMediatorPosition, getOutputType, getRegisteredMediationFlowPoint, getShortDescription, getTraceState, getType, handleException, handleException, isBreakPoint, isContentAltering, isContentAware, isSkipEnabled, isStatisticsEnable, isTraceOn, isTraceOrDebugOn, isTracingEnabled, registerMediationFlowPoint, reportCloseStatistics, reportOpenStatistics, setBreakPoint, setCommentsList, setComponentStatisticsId, setDescription, setEffectiveTraceState, setMediatorPosition, setShortDescription, setSkipEnabled, setTraceState, shouldCaptureTracing, shouldTrace, shouldTrace, traceOrDebug, traceOrDebugWarn, unregisterMediationFlowPoint
-
-
-
-
Method Detail
-
mediate
public boolean mediate(MessageContext messageContext)
Description copied from interface:Mediator
Invokes the mediator passing the current message for mediation. Each mediator performs its mediation action, and returns true if mediation should continue, or false if further mediation should be aborted.- Parameters:
messageContext
- the current message for mediation- Returns:
- true if further mediation should continue
-
addRule
public void addRule(RewriteRule rule)
-
getRules
public List<RewriteRule> getRules()
-
getInputProperty
public String getInputProperty()
-
setInputProperty
public void setInputProperty(String inputProperty)
-
getOutputProperty
public String getOutputProperty()
-
setOutputProperty
public void setOutputProperty(String outputProperty)
-
-