org.apache.synapse.mediators.transform.url
Class URLRewriteMediator

java.lang.Object
  extended by org.apache.synapse.mediators.AbstractMediator
      extended by 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
URLRewriteMediator()
           
 
Method Summary
 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, enableStatistics, getAspectConfiguration, getDescription, getLog, getTraceState, getType, handleException, handleException, isStatisticsEnable, isTraceOn, isTraceOrDebugOn, setDescription, setEffectiveTraceState, setTraceState, shouldTrace, traceOrDebug, traceOrDebugWarn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URLRewriteMediator

public URLRewriteMediator()
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)


Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.