org.apache.synapse.mediators.transform
Class HeaderMediator

java.lang.Object
  extended by org.apache.synapse.mediators.AbstractMediator
      extended by org.apache.synapse.mediators.transform.HeaderMediator
All Implemented Interfaces:
AspectConfigurable, Mediator, SynapseArtifact

public class HeaderMediator
extends AbstractMediator

The header mediator is able to set a given value as a SOAP header, or remove a given header from the current message instance. This supports the headers currently supported by the HeaderType class. If an expression is supplied, its runtime value is evaluated using the current message. Unless the action is set to remove, the default behavior of this mediator is to set a header value.


Field Summary
static int ACTION_REMOVE
           
static int ACTION_SET
           
 
Fields inherited from class org.apache.synapse.mediators.AbstractMediator
log, trace, traceState
 
Constructor Summary
HeaderMediator()
           
 
Method Summary
 int getAction()
           
 SynapseXPath getExpression()
           
 QName getQName()
           
 String getValue()
           
 boolean mediate(MessageContext synCtx)
          Sets/Removes a SOAP header on the current message
 void setAction(int action)
           
 void setExpression(SynapseXPath expression)
           
 void setQName(QName qName)
           
 void setValue(String value)
           
 
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
 

Field Detail

ACTION_SET

public static final int ACTION_SET
See Also:
Constant Field Values

ACTION_REMOVE

public static final int ACTION_REMOVE
See Also:
Constant Field Values
Constructor Detail

HeaderMediator

public HeaderMediator()
Method Detail

mediate

public boolean mediate(MessageContext synCtx)
Sets/Removes a SOAP header on the current message

Parameters:
synCtx - the current message which is altered as necessary
Returns:
true always

getAction

public int getAction()

setAction

public void setAction(int action)

getQName

public QName getQName()

setQName

public void setQName(QName qName)

getValue

public String getValue()

setValue

public void setValue(String value)

getExpression

public SynapseXPath getExpression()

setExpression

public void setExpression(SynapseXPath expression)


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