org.apache.synapse.mediators.bsf

## Class NashornJavaScriptMessageContext

- java.lang.Object
- - org.apache.synapse.mediators.bsf.NashornJavaScriptMessageContext

- All Implemented Interfaces:
    ScriptMessageContext, org.apache.synapse.MessageContext

      public class NashornJavaScriptMessageContext
      extends java.lang.Object
      implements ScriptMessageContext

  NashornJavaScriptMessageContext implements the ScriptMessageContext specific to Nashorn java script engine.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NashornJavaScriptMessageContext(org.apache.synapse.MessageContext mc, org.apache.bsf.xml.XMLHelper xmlHelper, jdk.nashorn.api.scripting.ScriptObjectMirror emptyJsonObject, jdk.nashorn.api.scripting.ScriptObjectMirror jsonSerializer)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addHeader(boolean mustUnderstand, java.lang.Object content)` Add a new SOAP header to the message.
    `org.apache.synapse.config.SynapseConfiguration` | `getConfiguration()`
    `java.util.Map<java.lang.String,java.lang.Object>` | `getContextEntries()`
    `java.util.Stack<org.apache.synapse.ContinuationState>` | `getContinuationStateStack()`
    `org.apache.synapse.Mediator` | `getDefaultConfiguration(java.lang.String arg0)`
    `org.apache.synapse.endpoints.Endpoint` | `getEndpoint(java.lang.String key)`
    `java.lang.Object` | `getEntry(java.lang.String key)`
    `org.apache.axiom.soap.SOAPEnvelope` | `getEnvelope()`
    `java.lang.Object` | `getEnvelopeXML()` Get the XML representation of the complete SOAP envelope.
    `org.apache.synapse.core.SynapseEnvironment` | `getEnvironment()`
    `org.apache.synapse.Mediator` | `getFaultSequence()`
    `java.util.Stack<org.apache.synapse.FaultHandler>` | `getFaultStack()`
    `org.apache.axis2.addressing.EndpointReference` | `getFaultTo()`
    `org.apache.axiom.om.OMElement` | `getFormat(java.lang.String s)`
    `org.apache.axis2.addressing.EndpointReference` | `getFrom()`
    `java.lang.Object` | `getJsonText()` Get the Message Payload as a text.
    `java.lang.Object` | `getLocalEntry(java.lang.String key)`
    `org.apache.synapse.Mediator` | `getMainSequence()`
    `int` | `getMessageFlowTracingState()`
    `java.lang.String` | `getMessageID()`
    `java.lang.String` | `getMessageString()`
    `org.apache.axiom.om.OMElement` | `getParsedOMElement(java.io.InputStream stream)` Returns the parsed xml document.
    `java.lang.Object` | `getPayloadJSON()` Get the JSON object representation of the JSON message body of the request.
    `java.lang.String` | `getPayloadText()` Get the Message Payload as a text.
    `java.lang.Object` | `getPayloadXML()` Get the XML representation of SOAP Body payload.
    `java.lang.Object` | `getProperty(java.lang.String key)`
    `java.util.Set` | `getPropertyKeySet()`
    `org.apache.axis2.addressing.RelatesTo` | `getRelatesTo()`
    `org.apache.axis2.addressing.EndpointReference` | `getReplyTo()`
    `org.apache.synapse.Mediator` | `getSequence(java.lang.String key)`
    `org.apache.synapse.Mediator` | `getSequenceTemplate(java.lang.String key)`
    `org.apache.commons.logging.Log` | `getServiceLog()`
    `java.lang.String` | `getSoapAction()`
    `org.apache.axis2.addressing.EndpointReference` | `getTo()`
    `int` | `getTracingState()`
    `java.lang.String` | `getWSAAction()`
    `java.lang.String` | `getWSAMessageID()`
    `org.apache.axiom.om.xpath.AXIOMXPath` | `getXpathResult(java.lang.String expression)` Returns the Axiom xpath.
    `boolean` | `isContinuationEnabled()`
    `boolean` | `isDoingGET()`
    `boolean` | `isDoingMTOM()`
    `boolean` | `isDoingPOX()`
    `boolean` | `isDoingSWA()`
    `boolean` | `isFaultResponse()`
    `boolean` | `isResponse()`
    `boolean` | `isSOAP11()`
    `java.lang.Object` | `jsonObject(org.apache.synapse.MessageContext messageContext)` Returns the JavaScript Object saved in this message context.
    `org.w3c.dom.Document` | `parseXml(java.lang.String text)` Returns the parsed xml document.
    `void` | `pushContinuationState(org.apache.synapse.ContinuationState continuationState)`
    `void` | `pushFaultHandler(org.apache.synapse.FaultHandler fault)`
    `void` | `removeProperty(java.lang.String key, java.lang.String scope)` Remove property from the message.
    `void` | `setConfiguration(org.apache.synapse.config.SynapseConfiguration cfg)`
    `void` | `setContextEntries(java.util.Map<java.lang.String,java.lang.Object> entries)`
    `void` | `setContinuationEnabled(boolean contStateStackEnabled)`
    `void` | `setDoingGET(boolean b)`
    `void` | `setDoingMTOM(boolean b)`
    `void` | `setDoingPOX(boolean b)`
    `void` | `setDoingSWA(boolean b)`
    `void` | `setEnvelope(org.apache.axiom.soap.SOAPEnvelope envelope)`
    `void` | `setEnvironment(org.apache.synapse.core.SynapseEnvironment se)`
    `void` | `setFaultResponse(boolean b)`
    `void` | `setFaultTo(org.apache.axis2.addressing.EndpointReference reference)`
    `void` | `setFaultTo(java.lang.String reference)` This is used to set the value which specifies the receiver of the faults relating to the message.
    `void` | `setFrom(org.apache.axis2.addressing.EndpointReference reference)`
    `void` | `setFrom(java.lang.String reference)` This is used to set the value which specifies the sender of the message.
    `boolean` | `setJsonObject(org.apache.synapse.MessageContext messageContext, java.lang.Object jsonObject)` Saves the JavaScript Object to the message context.
    `boolean` | `setJsonText(org.apache.synapse.MessageContext messageContext, java.lang.Object jsonObject)` Saves the JSON String to the message context.
    `void` | `setMessageFlowTracingState(int state)`
    `void` | `setMessageID(java.lang.String string)`
    `void` | `setPayloadJSON(java.lang.Object jsonPayload)` Saves the payload of this message context as a JSON payload.
    `void` | `setPayloadXML(java.lang.Object payload)` Set the SOAP body payload from XML.
    `void` | `setProperty(java.lang.String key, java.lang.Object value)` Add a new property to the message.
    `void` | `setProperty(java.lang.String key, java.lang.Object value, java.lang.String scope)` Add a new property to the message.
    `void` | `setRelatesTo(org.apache.axis2.addressing.RelatesTo[] reference)`
    `void` | `setReplyTo(org.apache.axis2.addressing.EndpointReference reference)`
    `void` | `setReplyTo(java.lang.String reference)` This is used to set the value which specifies the receiver of the replies to the message.
    `void` | `setResponse(boolean b)`
    `void` | `setScriptEngine(javax.script.ScriptEngine scriptEngine)` Set a script engine.
    `void` | `setSoapAction(java.lang.String string)`
    `void` | `setTo(org.apache.axis2.addressing.EndpointReference reference)`
    `void` | `setTo(java.lang.String reference)` This is used to set the value which specifies the receiver of the message.
    `void` | `setTracingState(int tracingState)`
    `void` | `setWSAAction(java.lang.String actionURI)`
    `void` | `setWSAMessageID(java.lang.String messageID)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### NashornJavaScriptMessageContext

          public NashornJavaScriptMessageContext(org.apache.synapse.MessageContext mc,
                                                 org.apache.bsf.xml.XMLHelper xmlHelper,
                                                 jdk.nashorn.api.scripting.ScriptObjectMirror emptyJsonObject,
                                                 jdk.nashorn.api.scripting.ScriptObjectMirror jsonSerializer)

  - ### Method Detail

    - #### getPayloadXML

          public java.lang.Object getPayloadXML()

      Get the XML representation of SOAP Body payload. The payload is the first element inside the SOAP
      tags
      Specified by:
        `getPayloadXML` in interface `ScriptMessageContext`
      Returns:
        the XML SOAP Body

    - #### setPayloadXML

          public void setPayloadXML(java.lang.Object payload)
                             throws org.apache.axiom.om.OMException,
                                    javax.script.ScriptException

      Set the SOAP body payload from XML.
      Specified by:
        `setPayloadXML` in interface `ScriptMessageContext`
      Parameters:
        `payload` - Message payload
      Throws:
        `javax.script.ScriptException` - For errors in converting xml To OM
        `org.apache.axiom.om.OMException` - For errors in OM manipulation

    - #### getPayloadJSON

          public java.lang.Object getPayloadJSON()

      Get the JSON object representation of the JSON message body of the request.
      Specified by:
        `getPayloadJSON` in interface `ScriptMessageContext`
      Returns:
        JSON object of the message body

    - #### getJsonText

          public java.lang.Object getJsonText()

      Get the Message Payload as a text.
      Specified by:
        `getJsonText` in interface `ScriptMessageContext`
      Returns:
        Payload as text

    - #### getPayloadText

          public java.lang.String getPayloadText()

      Get the Message Payload as a text.
      Specified by:
        `getPayloadText` in interface `ScriptMessageContext`
      Returns:
        Payload as text

    - #### setJsonObject

          public boolean setJsonObject(org.apache.synapse.MessageContext messageContext,
                                       java.lang.Object jsonObject)

      Saves the JavaScript Object to the message context.
      Specified by:
        `setJsonObject` in interface `ScriptMessageContext`
      Parameters:
        `messageContext` - The message context of the sequence
        `jsonObject` - JavaScript Object which is passed to be saved in message context
      Returns:
        true

    - #### setJsonText

          public boolean setJsonText(org.apache.synapse.MessageContext messageContext,
                                     java.lang.Object jsonObject)

      Saves the JSON String to the message context.
      Specified by:
        `setJsonText` in interface `ScriptMessageContext`
      Parameters:
        `messageContext` - The message context of the sequence
        `jsonObject` - JavaScript string which is passed to be saved in message context
      Returns:
        false if messageContext is null return true otherwise

    - #### jsonObject

          public java.lang.Object jsonObject(org.apache.synapse.MessageContext messageContext)

      Returns the JavaScript Object saved in this message context.
      Specified by:
        `jsonObject` in interface `ScriptMessageContext`
      Parameters:
        `messageContext` - The message context of the sequence
      Returns:
        o JavaScript Object saved in this message context

    - #### setScriptEngine

          public void setScriptEngine(javax.script.ScriptEngine scriptEngine)

      Set a script engine.
      Specified by:
        `setScriptEngine` in interface `ScriptMessageContext`
      Parameters:
        `scriptEngine` - a ScriptEngine instance

    - #### parseXml

          public org.w3c.dom.Document parseXml(java.lang.String text)
                                        throws javax.script.ScriptException

      Returns the parsed xml document.
      Parameters:
        `text` - xml string or document needed to be parser
      Returns:
        parsed document
      Throws:
        `javax.script.ScriptException`

    - #### getParsedOMElement

          public org.apache.axiom.om.OMElement getParsedOMElement(java.io.InputStream stream)

      Returns the parsed xml document.
      Parameters:
        `stream` - input stream of xml string or document needed to be parsed
      Returns:
        parsed document

    - #### getXpathResult

          public org.apache.axiom.om.xpath.AXIOMXPath getXpathResult(java.lang.String expression)
                                                              throws org.jaxen.JaxenException

      Returns the Axiom xpath.
      Parameters:
        `expression` - Xpath expression
      Returns:
        Axiom xpath is returned
      Throws:
        `org.jaxen.JaxenException`

    - #### addHeader

          public void addHeader(boolean mustUnderstand,
                                java.lang.Object content)
                         throws javax.script.ScriptException

      Add a new SOAP header to the message.
      Specified by:
        `addHeader` in interface `ScriptMessageContext`
      Parameters:
        `mustUnderstand` - the value for the `soapenv:mustUnderstand` attribute
        `content` - the XML for the new header
      Throws:
        `javax.script.ScriptException` - if an error occurs when converting the XML to OM

    - #### getEnvelopeXML

          public java.lang.Object getEnvelopeXML()
                                          throws javax.script.ScriptException

      Get the XML representation of the complete SOAP envelope.
      Specified by:
        `getEnvelopeXML` in interface `ScriptMessageContext`
      Returns:
        return an object that represents the payload in the current scripting language
      Throws:
        `javax.script.ScriptException` - in-case of an error in getting the XML representation of SOAP envelope

    - #### setTo

          public void setTo(java.lang.String reference)

      This is used to set the value which specifies the receiver of the message.
      Specified by:
        `setTo` in interface `ScriptMessageContext`
      Parameters:
        `reference` - specifies the receiver of the message

    - #### setFaultTo

          public void setFaultTo(java.lang.String reference)

      This is used to set the value which specifies the receiver of the faults relating to the message.
      Specified by:
        `setFaultTo` in interface `ScriptMessageContext`
      Parameters:
        `reference` - specifies the receiver of the faults relating to the message

    - #### setFrom

          public void setFrom(java.lang.String reference)

      This is used to set the value which specifies the sender of the message.
      Specified by:
        `setFrom` in interface `ScriptMessageContext`
      Parameters:
        `reference` - specifies the sender of the message

    - #### setReplyTo

          public void setReplyTo(java.lang.String reference)

      This is used to set the value which specifies the receiver of the replies to the message.
      Specified by:
        `setReplyTo` in interface `ScriptMessageContext`
      Parameters:
        `reference` - specifies the receiver of the replies to the message

    - #### getConfiguration

          public org.apache.synapse.config.SynapseConfiguration getConfiguration()

      Specified by:
        `getConfiguration` in interface `org.apache.synapse.MessageContext`

    - #### setConfiguration

          public void setConfiguration(org.apache.synapse.config.SynapseConfiguration cfg)

      Specified by:
        `setConfiguration` in interface `org.apache.synapse.MessageContext`

    - #### getEnvironment

          public org.apache.synapse.core.SynapseEnvironment getEnvironment()

      Specified by:
        `getEnvironment` in interface `org.apache.synapse.MessageContext`

    - #### setEnvironment

          public void setEnvironment(org.apache.synapse.core.SynapseEnvironment se)

      Specified by:
        `setEnvironment` in interface `org.apache.synapse.MessageContext`

    - #### getContextEntries

          public java.util.Map<java.lang.String,java.lang.Object> getContextEntries()

      Specified by:
        `getContextEntries` in interface `org.apache.synapse.MessageContext`

    - #### setContextEntries

          public void setContextEntries(java.util.Map<java.lang.String,java.lang.Object> entries)

      Specified by:
        `setContextEntries` in interface `org.apache.synapse.MessageContext`

    - #### getProperty

          public java.lang.Object getProperty(java.lang.String key)

      Specified by:
        `getProperty` in interface `org.apache.synapse.MessageContext`

    - #### getEntry

          public java.lang.Object getEntry(java.lang.String key)

      Specified by:
        `getEntry` in interface `org.apache.synapse.MessageContext`

    - #### getLocalEntry

          public java.lang.Object getLocalEntry(java.lang.String key)

      Specified by:
        `getLocalEntry` in interface `org.apache.synapse.MessageContext`

    - #### setProperty

          public void setProperty(java.lang.String key,
                                  java.lang.Object value)

      Add a new property to the message.
      Specified by:
        `setProperty` in interface `org.apache.synapse.MessageContext`
      Parameters:
        `key` - unique identifier of property
        `value` - value of property

    - #### setProperty

          public void setProperty(java.lang.String key,
                                  java.lang.Object value,
                                  java.lang.String scope)

      Add a new property to the message.
      Specified by:
        `setProperty` in interface `ScriptMessageContext`
      Parameters:
        `key` - unique identifier of property
        `value` - value of property
        `scope` - scope of the property

    - #### removeProperty

          public void removeProperty(java.lang.String key,
                                     java.lang.String scope)

      Remove property from the message.
      Specified by:
        `removeProperty` in interface `ScriptMessageContext`
      Parameters:
        `key` - unique identifier of property
        `scope` - scope of the property

    - #### getPropertyKeySet

          public java.util.Set getPropertyKeySet()

      Specified by:
        `getPropertyKeySet` in interface `org.apache.synapse.MessageContext`

    - #### getMainSequence

          public org.apache.synapse.Mediator getMainSequence()

      Specified by:
        `getMainSequence` in interface `org.apache.synapse.MessageContext`

    - #### getFaultSequence

          public org.apache.synapse.Mediator getFaultSequence()

      Specified by:
        `getFaultSequence` in interface `org.apache.synapse.MessageContext`

    - #### getSequence

          public org.apache.synapse.Mediator getSequence(java.lang.String key)

      Specified by:
        `getSequence` in interface `org.apache.synapse.MessageContext`

    - #### getFormat

          public org.apache.axiom.om.OMElement getFormat(java.lang.String s)

      Specified by:
        `getFormat` in interface `org.apache.synapse.MessageContext`

    - #### getEndpoint

          public org.apache.synapse.endpoints.Endpoint getEndpoint(java.lang.String key)

      Specified by:
        `getEndpoint` in interface `org.apache.synapse.MessageContext`

    - #### getEnvelope

          public org.apache.axiom.soap.SOAPEnvelope getEnvelope()

      Specified by:
        `getEnvelope` in interface `org.apache.synapse.MessageContext`

    - #### setEnvelope

          public void setEnvelope(org.apache.axiom.soap.SOAPEnvelope envelope)
                           throws org.apache.axis2.AxisFault

      Specified by:
        `setEnvelope` in interface `org.apache.synapse.MessageContext`
      Throws:
        `org.apache.axis2.AxisFault`

    - #### getFaultTo

          public org.apache.axis2.addressing.EndpointReference getFaultTo()

      Specified by:
        `getFaultTo` in interface `org.apache.synapse.MessageContext`

    - #### setFaultTo

          public void setFaultTo(org.apache.axis2.addressing.EndpointReference reference)

      Specified by:
        `setFaultTo` in interface `org.apache.synapse.MessageContext`

    - #### getFrom

          public org.apache.axis2.addressing.EndpointReference getFrom()

      Specified by:
        `getFrom` in interface `org.apache.synapse.MessageContext`

    - #### setFrom

          public void setFrom(org.apache.axis2.addressing.EndpointReference reference)

      Specified by:
        `setFrom` in interface `org.apache.synapse.MessageContext`

    - #### getMessageID

          public java.lang.String getMessageID()

      Specified by:
        `getMessageID` in interface `org.apache.synapse.MessageContext`

    - #### setMessageID

          public void setMessageID(java.lang.String string)

      Specified by:
        `setMessageID` in interface `org.apache.synapse.MessageContext`

    - #### getRelatesTo

          public org.apache.axis2.addressing.RelatesTo getRelatesTo()

      Specified by:
        `getRelatesTo` in interface `org.apache.synapse.MessageContext`

    - #### setRelatesTo

          public void setRelatesTo(org.apache.axis2.addressing.RelatesTo[] reference)

      Specified by:
        `setRelatesTo` in interface `org.apache.synapse.MessageContext`

    - #### getReplyTo

          public org.apache.axis2.addressing.EndpointReference getReplyTo()

      Specified by:
        `getReplyTo` in interface `org.apache.synapse.MessageContext`

    - #### setReplyTo

          public void setReplyTo(org.apache.axis2.addressing.EndpointReference reference)

      Specified by:
        `setReplyTo` in interface `org.apache.synapse.MessageContext`

    - #### getTo

          public org.apache.axis2.addressing.EndpointReference getTo()

      Specified by:
        `getTo` in interface `org.apache.synapse.MessageContext`

    - #### setTo

          public void setTo(org.apache.axis2.addressing.EndpointReference reference)

      Specified by:
        `setTo` in interface `org.apache.synapse.MessageContext`

    - #### setWSAAction

          public void setWSAAction(java.lang.String actionURI)

      Specified by:
        `setWSAAction` in interface `org.apache.synapse.MessageContext`

    - #### getWSAAction

          public java.lang.String getWSAAction()

      Specified by:
        `getWSAAction` in interface `org.apache.synapse.MessageContext`

    - #### getSoapAction

          public java.lang.String getSoapAction()

      Specified by:
        `getSoapAction` in interface `org.apache.synapse.MessageContext`

    - #### setSoapAction

          public void setSoapAction(java.lang.String string)

      Specified by:
        `setSoapAction` in interface `org.apache.synapse.MessageContext`

    - #### setWSAMessageID

          public void setWSAMessageID(java.lang.String messageID)

      Specified by:
        `setWSAMessageID` in interface `org.apache.synapse.MessageContext`

    - #### getWSAMessageID

          public java.lang.String getWSAMessageID()

      Specified by:
        `getWSAMessageID` in interface `org.apache.synapse.MessageContext`

    - #### isDoingMTOM

          public boolean isDoingMTOM()

      Specified by:
        `isDoingMTOM` in interface `org.apache.synapse.MessageContext`

    - #### isDoingSWA

          public boolean isDoingSWA()

      Specified by:
        `isDoingSWA` in interface `org.apache.synapse.MessageContext`

    - #### setDoingMTOM

          public void setDoingMTOM(boolean b)

      Specified by:
        `setDoingMTOM` in interface `org.apache.synapse.MessageContext`

    - #### setDoingSWA

          public void setDoingSWA(boolean b)

      Specified by:
        `setDoingSWA` in interface `org.apache.synapse.MessageContext`

    - #### isDoingPOX

          public boolean isDoingPOX()

      Specified by:
        `isDoingPOX` in interface `org.apache.synapse.MessageContext`

    - #### setDoingPOX

          public void setDoingPOX(boolean b)

      Specified by:
        `setDoingPOX` in interface `org.apache.synapse.MessageContext`

    - #### isDoingGET

          public boolean isDoingGET()

      Specified by:
        `isDoingGET` in interface `org.apache.synapse.MessageContext`

    - #### setDoingGET

          public void setDoingGET(boolean b)

      Specified by:
        `setDoingGET` in interface `org.apache.synapse.MessageContext`

    - #### isSOAP11

          public boolean isSOAP11()

      Specified by:
        `isSOAP11` in interface `org.apache.synapse.MessageContext`

    - #### setResponse

          public void setResponse(boolean b)

      Specified by:
        `setResponse` in interface `org.apache.synapse.MessageContext`

    - #### isResponse

          public boolean isResponse()

      Specified by:
        `isResponse` in interface `org.apache.synapse.MessageContext`

    - #### setFaultResponse

          public void setFaultResponse(boolean b)

      Specified by:
        `setFaultResponse` in interface `org.apache.synapse.MessageContext`

    - #### isFaultResponse

          public boolean isFaultResponse()

      Specified by:
        `isFaultResponse` in interface `org.apache.synapse.MessageContext`

    - #### getTracingState

          public int getTracingState()

      Specified by:
        `getTracingState` in interface `org.apache.synapse.MessageContext`

    - #### setTracingState

          public void setTracingState(int tracingState)

      Specified by:
        `setTracingState` in interface `org.apache.synapse.MessageContext`

    - #### getFaultStack

          public java.util.Stack<org.apache.synapse.FaultHandler> getFaultStack()

      Specified by:
        `getFaultStack` in interface `org.apache.synapse.MessageContext`

    - #### pushFaultHandler

          public void pushFaultHandler(org.apache.synapse.FaultHandler fault)

      Specified by:
        `pushFaultHandler` in interface `org.apache.synapse.MessageContext`

    - #### pushContinuationState

          public void pushContinuationState(org.apache.synapse.ContinuationState continuationState)

      Specified by:
        `pushContinuationState` in interface `org.apache.synapse.MessageContext`

    - #### getContinuationStateStack

          public java.util.Stack<org.apache.synapse.ContinuationState> getContinuationStateStack()

      Specified by:
        `getContinuationStateStack` in interface `org.apache.synapse.MessageContext`

    - #### isContinuationEnabled

          public boolean isContinuationEnabled()

      Specified by:
        `isContinuationEnabled` in interface `org.apache.synapse.MessageContext`

    - #### setContinuationEnabled

          public void setContinuationEnabled(boolean contStateStackEnabled)

      Specified by:
        `setContinuationEnabled` in interface `org.apache.synapse.MessageContext`

    - #### getServiceLog

          public org.apache.commons.logging.Log getServiceLog()

      Specified by:
        `getServiceLog` in interface `org.apache.synapse.MessageContext`

    - #### getSequenceTemplate

          public org.apache.synapse.Mediator getSequenceTemplate(java.lang.String key)

      Specified by:
        `getSequenceTemplate` in interface `org.apache.synapse.MessageContext`

    - #### setPayloadJSON

          public void setPayloadJSON(java.lang.Object jsonPayload)
                              throws javax.script.ScriptException

      Saves the payload of this message context as a JSON payload.
      Specified by:
        `setPayloadJSON` in interface `ScriptMessageContext`
      Parameters:
        `jsonPayload` - Javascript native object to be set as the message body
      Throws:
        `javax.script.ScriptException` - in case of creating a JSON object out of the javascript native object.

    - #### getDefaultConfiguration

          public org.apache.synapse.Mediator getDefaultConfiguration(java.lang.String arg0)

      Specified by:
        `getDefaultConfiguration` in interface `org.apache.synapse.MessageContext`

    - #### getMessageString

          public java.lang.String getMessageString()

      Specified by:
        `getMessageString` in interface `org.apache.synapse.MessageContext`

    - #### setMessageFlowTracingState

          public void setMessageFlowTracingState(int state)

      Specified by:
        `setMessageFlowTracingState` in interface `org.apache.synapse.MessageContext`

    - #### getMessageFlowTracingState

          public int getMessageFlowTracingState()

      Specified by:
        `getMessageFlowTracingState` in interface `org.apache.synapse.MessageContext`

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