Class 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.
    • 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
      • getScope

        public String getScope()
      • setScope

        public void setScope​(String scope)
      • 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)
      • getEmbeddedXml

        public List<org.apache.axiom.om.OMElement> getEmbeddedXml()
      • addEmbeddedXml

        public void addEmbeddedXml​(org.apache.axiom.om.OMElement element)
      • hasEmbeddedXml

        public boolean hasEmbeddedXml()
      • isImplicit

        public boolean isImplicit()
      • setExpression

        public void setExpression​(SynapsePath expression)
      • getMediatorName

        public String getMediatorName()
        Description copied from class: AbstractMediator
        Returns the name of the class of respective mediator. This was introduced to provide a unique way to get the mediator name because getType is implemented in different ways in different mediators (e.g. PayloadFactoryMediator)
        Specified by:
        getMediatorName in interface Mediator
        Overrides:
        getMediatorName in class AbstractMediator
        Returns:
        a String of the mediator class name