Package org.apache.synapse.mediators.bsf
Class OpenJDKNashornJavaScriptMessageContext
- java.lang.Object
-
- org.apache.synapse.mediators.bsf.OpenJDKNashornJavaScriptMessageContext
-
- All Implemented Interfaces:
ScriptMessageContext,org.apache.synapse.MessageContext
@Deprecated public class OpenJDKNashornJavaScriptMessageContext extends Object implements ScriptMessageContext
Deprecated.NashornJavaScriptMessageContext implements the ScriptMessageContext specific to Nashorn java script engine.
-
-
Constructor Summary
Constructors Constructor Description OpenJDKNashornJavaScriptMessageContext(org.apache.synapse.MessageContext mc, org.apache.bsf.xml.XMLHelper xmlHelper, ScriptEngine engine)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddHeader(boolean mustUnderstand, Object content)Deprecated.Add a new SOAP header to the message.org.apache.synapse.config.SynapseConfigurationgetConfiguration()Deprecated.Map<String,Object>getContextEntries()Deprecated.Stack<org.apache.synapse.ContinuationState>getContinuationStateStack()Deprecated.org.apache.synapse.MediatorgetDefaultConfiguration(String arg0)Deprecated.org.apache.synapse.endpoints.EndpointgetEndpoint(String key)Deprecated.ObjectgetEntry(String key)Deprecated.org.apache.axiom.soap.SOAPEnvelopegetEnvelope()Deprecated.ObjectgetEnvelopeXML()Deprecated.Get the XML representation of the complete SOAP envelope.org.apache.synapse.core.SynapseEnvironmentgetEnvironment()Deprecated.org.apache.synapse.MediatorgetFaultSequence()Deprecated.Stack<org.apache.synapse.FaultHandler>getFaultStack()Deprecated.org.apache.axis2.addressing.EndpointReferencegetFaultTo()Deprecated.org.apache.axiom.om.OMElementgetFormat(String s)Deprecated.org.apache.axis2.addressing.EndpointReferencegetFrom()Deprecated.ObjectgetJsonText()Deprecated.Get the Message Payload as a text.ObjectgetLocalEntry(String key)Deprecated.org.apache.synapse.MediatorgetMainSequence()Deprecated.intgetMessageFlowTracingState()Deprecated.StringgetMessageID()Deprecated.StringgetMessageString()Deprecated.org.apache.axiom.om.OMElementgetParsedOMElement(InputStream stream)Deprecated.Returns the parsed xml document.ObjectgetPayloadJSON()Deprecated.Get the JSON object representation of the JSON message body of the request.StringgetPayloadText()Deprecated.Get the Message Payload as a text.ObjectgetPayloadXML()Deprecated.Get the XML representation of SOAP Body payload.ObjectgetProperty(String key)Deprecated.SetgetPropertyKeySet()Deprecated.org.apache.axis2.addressing.RelatesTogetRelatesTo()Deprecated.org.apache.axis2.addressing.EndpointReferencegetReplyTo()Deprecated.org.apache.synapse.MediatorgetSequence(String key)Deprecated.org.apache.synapse.MediatorgetSequenceTemplate(String key)Deprecated.org.apache.commons.logging.LoggetServiceLog()Deprecated.StringgetSoapAction()Deprecated.org.apache.axis2.addressing.EndpointReferencegetTo()Deprecated.intgetTracingState()Deprecated.StringgetWSAAction()Deprecated.StringgetWSAMessageID()Deprecated.org.apache.axiom.om.xpath.AXIOMXPathgetXpathResult(String expression)Deprecated.Returns the Axiom xpath.booleanisContinuationEnabled()Deprecated.booleanisDoingGET()Deprecated.booleanisDoingMTOM()Deprecated.booleanisDoingPOX()Deprecated.booleanisDoingSWA()Deprecated.booleanisFaultResponse()Deprecated.booleanisResponse()Deprecated.booleanisSOAP11()Deprecated.ObjectjsonObject(org.apache.synapse.MessageContext messageContext)Deprecated.Returns the JavaScript Object saved in this message context.ObjectjsonSerializerCallMember(String key, String value)Deprecated.DocumentparseXml(String text)Deprecated.Returns the parsed xml document.voidpushContinuationState(org.apache.synapse.ContinuationState continuationState)Deprecated.voidpushFaultHandler(org.apache.synapse.FaultHandler fault)Deprecated.voidremoveProperty(String key, String scope)Deprecated.Remove property from the message.voidsetConfiguration(org.apache.synapse.config.SynapseConfiguration cfg)Deprecated.voidsetContextEntries(Map<String,Object> entries)Deprecated.voidsetContinuationEnabled(boolean contStateStackEnabled)Deprecated.voidsetDoingGET(boolean b)Deprecated.voidsetDoingMTOM(boolean b)Deprecated.voidsetDoingPOX(boolean b)Deprecated.voidsetDoingSWA(boolean b)Deprecated.voidsetEnvelope(org.apache.axiom.soap.SOAPEnvelope envelope)Deprecated.voidsetEnvironment(org.apache.synapse.core.SynapseEnvironment se)Deprecated.voidsetFaultResponse(boolean b)Deprecated.voidsetFaultTo(String reference)Deprecated.This is used to set the value which specifies the receiver of the faults relating to the message.voidsetFaultTo(org.apache.axis2.addressing.EndpointReference reference)Deprecated.voidsetFrom(String reference)Deprecated.This is used to set the value which specifies the sender of the message.voidsetFrom(org.apache.axis2.addressing.EndpointReference reference)Deprecated.booleansetJsonObject(org.apache.synapse.MessageContext messageContext, Object jsonObject)Deprecated.Saves the JavaScript Object to the message context.booleansetJsonText(org.apache.synapse.MessageContext messageContext, Object jsonObject)Deprecated.Saves the JSON String to the message context.voidsetMessageFlowTracingState(int state)Deprecated.voidsetMessageID(String string)Deprecated.voidsetPayloadJSON(Object jsonPayload)Deprecated.Saves the payload of this message context as a JSON payload.voidsetPayloadXML(Object payload)Deprecated.Set the SOAP body payload from XML.voidsetProperty(String key, Object value)Deprecated.Add a new property to the message.voidsetProperty(String key, Object value, String scope)Deprecated.Add a new property to the message.voidsetRelatesTo(org.apache.axis2.addressing.RelatesTo[] reference)Deprecated.voidsetReplyTo(String reference)Deprecated.This is used to set the value which specifies the receiver of the replies to the message.voidsetReplyTo(org.apache.axis2.addressing.EndpointReference reference)Deprecated.voidsetResponse(boolean b)Deprecated.voidsetScriptEngine(ScriptEngine scriptEngine)Deprecated.Set a script engine.voidsetSoapAction(String string)Deprecated.voidsetTo(String reference)Deprecated.This is used to set the value which specifies the receiver of the message.voidsetTo(org.apache.axis2.addressing.EndpointReference reference)Deprecated.voidsetTracingState(int tracingState)Deprecated.voidsetWSAAction(String actionURI)Deprecated.voidsetWSAMessageID(String messageID)Deprecated.
-
-
-
Constructor Detail
-
OpenJDKNashornJavaScriptMessageContext
public OpenJDKNashornJavaScriptMessageContext(org.apache.synapse.MessageContext mc, org.apache.bsf.xml.XMLHelper xmlHelper, ScriptEngine engine) throws ScriptExceptionDeprecated.- Throws:
ScriptException
-
-
Method Detail
-
jsonSerializerCallMember
public Object jsonSerializerCallMember(String key, String value)
Deprecated.
-
getPayloadXML
public Object getPayloadXML()
Deprecated.Get the XML representation of SOAP Body payload. The payload is the first element inside the SOAP tags- Specified by:
getPayloadXMLin interfaceScriptMessageContext- Returns:
- the XML SOAP Body
-
setPayloadXML
public void setPayloadXML(Object payload) throws org.apache.axiom.om.OMException, ScriptException
Deprecated.Set the SOAP body payload from XML.- Specified by:
setPayloadXMLin interfaceScriptMessageContext- Parameters:
payload- Message payload- Throws:
ScriptException- For errors in converting xml To OMorg.apache.axiom.om.OMException- For errors in OM manipulation
-
getPayloadJSON
public Object getPayloadJSON()
Deprecated.Get the JSON object representation of the JSON message body of the request.- Specified by:
getPayloadJSONin interfaceScriptMessageContext- Returns:
- JSON object of the message body
-
setPayloadJSON
public void setPayloadJSON(Object jsonPayload) throws ScriptException
Deprecated.Saves the payload of this message context as a JSON payload.- Specified by:
setPayloadJSONin interfaceScriptMessageContext- Parameters:
jsonPayload- Javascript native object to be set as the message body- Throws:
ScriptException- in case of creating a JSON object out of the javascript native object.
-
getJsonText
public Object getJsonText()
Deprecated.Get the Message Payload as a text.- Specified by:
getJsonTextin interfaceScriptMessageContext- Returns:
- Payload as text
-
getPayloadText
public String getPayloadText()
Deprecated.Get the Message Payload as a text.- Specified by:
getPayloadTextin interfaceScriptMessageContext- Returns:
- Payload as text
-
setJsonObject
public boolean setJsonObject(org.apache.synapse.MessageContext messageContext, Object jsonObject)Deprecated.Saves the JavaScript Object to the message context.- Specified by:
setJsonObjectin interfaceScriptMessageContext- Parameters:
messageContext- The message context of the sequencejsonObject- JavaScript Object which is passed to be saved in message context- Returns:
- true
-
setJsonText
public boolean setJsonText(org.apache.synapse.MessageContext messageContext, Object jsonObject)Deprecated.Saves the JSON String to the message context.- Specified by:
setJsonTextin interfaceScriptMessageContext- Parameters:
messageContext- The message context of the sequencejsonObject- JavaScript string which is passed to be saved in message context- Returns:
- false if messageContext is null return true otherwise
-
jsonObject
public Object jsonObject(org.apache.synapse.MessageContext messageContext)
Deprecated.Returns the JavaScript Object saved in this message context.- Specified by:
jsonObjectin interfaceScriptMessageContext- Parameters:
messageContext- The message context of the sequence- Returns:
- o JavaScript Object saved in this message context
-
setScriptEngine
public void setScriptEngine(ScriptEngine scriptEngine)
Deprecated.Set a script engine.- Specified by:
setScriptEnginein interfaceScriptMessageContext- Parameters:
scriptEngine- a ScriptEngine instance
-
parseXml
public Document parseXml(String text) throws ScriptException
Deprecated.Returns the parsed xml document.- Parameters:
text- xml string or document needed to be parser- Returns:
- parsed document
- Throws:
ScriptException
-
getParsedOMElement
public org.apache.axiom.om.OMElement getParsedOMElement(InputStream stream)
Deprecated.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(String expression) throws org.jaxen.JaxenException
Deprecated.Returns the Axiom xpath.- Parameters:
expression- Xpath expression- Returns:
- Axiom xpath is returned
- Throws:
org.jaxen.JaxenException
-
addHeader
public void addHeader(boolean mustUnderstand, Object content) throws ScriptExceptionDeprecated.Add a new SOAP header to the message.- Specified by:
addHeaderin interfaceScriptMessageContext- Parameters:
mustUnderstand- the value for thesoapenv:mustUnderstandattributecontent- the XML for the new header- Throws:
ScriptException- if an error occurs when converting the XML to OM
-
getEnvelopeXML
public Object getEnvelopeXML() throws ScriptException
Deprecated.Get the XML representation of the complete SOAP envelope.- Specified by:
getEnvelopeXMLin interfaceScriptMessageContext- Returns:
- return an object that represents the payload in the current scripting language
- Throws:
ScriptException- in-case of an error in getting the XML representation of SOAP envelope
-
getConfiguration
public org.apache.synapse.config.SynapseConfiguration getConfiguration()
Deprecated.- Specified by:
getConfigurationin interfaceorg.apache.synapse.MessageContext
-
setConfiguration
public void setConfiguration(org.apache.synapse.config.SynapseConfiguration cfg)
Deprecated.- Specified by:
setConfigurationin interfaceorg.apache.synapse.MessageContext
-
getEnvironment
public org.apache.synapse.core.SynapseEnvironment getEnvironment()
Deprecated.- Specified by:
getEnvironmentin interfaceorg.apache.synapse.MessageContext
-
setEnvironment
public void setEnvironment(org.apache.synapse.core.SynapseEnvironment se)
Deprecated.- Specified by:
setEnvironmentin interfaceorg.apache.synapse.MessageContext
-
getContextEntries
public Map<String,Object> getContextEntries()
Deprecated.- Specified by:
getContextEntriesin interfaceorg.apache.synapse.MessageContext
-
setContextEntries
public void setContextEntries(Map<String,Object> entries)
Deprecated.- Specified by:
setContextEntriesin interfaceorg.apache.synapse.MessageContext
-
getProperty
public Object getProperty(String key)
Deprecated.- Specified by:
getPropertyin interfaceorg.apache.synapse.MessageContext
-
getEntry
public Object getEntry(String key)
Deprecated.- Specified by:
getEntryin interfaceorg.apache.synapse.MessageContext
-
getLocalEntry
public Object getLocalEntry(String key)
Deprecated.- Specified by:
getLocalEntryin interfaceorg.apache.synapse.MessageContext
-
setProperty
public void setProperty(String key, Object value)
Deprecated.Add a new property to the message.- Specified by:
setPropertyin interfaceorg.apache.synapse.MessageContext- Parameters:
key- unique identifier of propertyvalue- value of property
-
setProperty
public void setProperty(String key, Object value, String scope)
Deprecated.Add a new property to the message.- Specified by:
setPropertyin interfaceScriptMessageContext- Parameters:
key- unique identifier of propertyvalue- value of propertyscope- scope of the property
-
removeProperty
public void removeProperty(String key, String scope)
Deprecated.Remove property from the message.- Specified by:
removePropertyin interfaceScriptMessageContext- Parameters:
key- unique identifier of propertyscope- scope of the property
-
getPropertyKeySet
public Set getPropertyKeySet()
Deprecated.- Specified by:
getPropertyKeySetin interfaceorg.apache.synapse.MessageContext
-
getMainSequence
public org.apache.synapse.Mediator getMainSequence()
Deprecated.- Specified by:
getMainSequencein interfaceorg.apache.synapse.MessageContext
-
getFaultSequence
public org.apache.synapse.Mediator getFaultSequence()
Deprecated.- Specified by:
getFaultSequencein interfaceorg.apache.synapse.MessageContext
-
getSequence
public org.apache.synapse.Mediator getSequence(String key)
Deprecated.- Specified by:
getSequencein interfaceorg.apache.synapse.MessageContext
-
getFormat
public org.apache.axiom.om.OMElement getFormat(String s)
Deprecated.- Specified by:
getFormatin interfaceorg.apache.synapse.MessageContext
-
getEndpoint
public org.apache.synapse.endpoints.Endpoint getEndpoint(String key)
Deprecated.- Specified by:
getEndpointin interfaceorg.apache.synapse.MessageContext
-
getEnvelope
public org.apache.axiom.soap.SOAPEnvelope getEnvelope()
Deprecated.- Specified by:
getEnvelopein interfaceorg.apache.synapse.MessageContext
-
setEnvelope
public void setEnvelope(org.apache.axiom.soap.SOAPEnvelope envelope) throws org.apache.axis2.AxisFaultDeprecated.- Specified by:
setEnvelopein interfaceorg.apache.synapse.MessageContext- Throws:
org.apache.axis2.AxisFault
-
getFaultTo
public org.apache.axis2.addressing.EndpointReference getFaultTo()
Deprecated.- Specified by:
getFaultToin interfaceorg.apache.synapse.MessageContext
-
setFaultTo
public void setFaultTo(String reference)
Deprecated.This is used to set the value which specifies the receiver of the faults relating to the message.- Specified by:
setFaultToin interfaceScriptMessageContext- Parameters:
reference- specifies the receiver of the faults relating to the message
-
setFaultTo
public void setFaultTo(org.apache.axis2.addressing.EndpointReference reference)
Deprecated.- Specified by:
setFaultToin interfaceorg.apache.synapse.MessageContext
-
getFrom
public org.apache.axis2.addressing.EndpointReference getFrom()
Deprecated.- Specified by:
getFromin interfaceorg.apache.synapse.MessageContext
-
setFrom
public void setFrom(String reference)
Deprecated.This is used to set the value which specifies the sender of the message.- Specified by:
setFromin interfaceScriptMessageContext- Parameters:
reference- specifies the sender of the message
-
setFrom
public void setFrom(org.apache.axis2.addressing.EndpointReference reference)
Deprecated.- Specified by:
setFromin interfaceorg.apache.synapse.MessageContext
-
getMessageID
public String getMessageID()
Deprecated.- Specified by:
getMessageIDin interfaceorg.apache.synapse.MessageContext
-
setMessageID
public void setMessageID(String string)
Deprecated.- Specified by:
setMessageIDin interfaceorg.apache.synapse.MessageContext
-
getRelatesTo
public org.apache.axis2.addressing.RelatesTo getRelatesTo()
Deprecated.- Specified by:
getRelatesToin interfaceorg.apache.synapse.MessageContext
-
setRelatesTo
public void setRelatesTo(org.apache.axis2.addressing.RelatesTo[] reference)
Deprecated.- Specified by:
setRelatesToin interfaceorg.apache.synapse.MessageContext
-
getReplyTo
public org.apache.axis2.addressing.EndpointReference getReplyTo()
Deprecated.- Specified by:
getReplyToin interfaceorg.apache.synapse.MessageContext
-
setReplyTo
public void setReplyTo(String reference)
Deprecated.This is used to set the value which specifies the receiver of the replies to the message.- Specified by:
setReplyToin interfaceScriptMessageContext- Parameters:
reference- specifies the receiver of the replies to the message
-
setReplyTo
public void setReplyTo(org.apache.axis2.addressing.EndpointReference reference)
Deprecated.- Specified by:
setReplyToin interfaceorg.apache.synapse.MessageContext
-
getTo
public org.apache.axis2.addressing.EndpointReference getTo()
Deprecated.- Specified by:
getToin interfaceorg.apache.synapse.MessageContext
-
setTo
public void setTo(String reference)
Deprecated.This is used to set the value which specifies the receiver of the message.- Specified by:
setToin interfaceScriptMessageContext- Parameters:
reference- specifies the receiver of the message
-
setTo
public void setTo(org.apache.axis2.addressing.EndpointReference reference)
Deprecated.- Specified by:
setToin interfaceorg.apache.synapse.MessageContext
-
getWSAAction
public String getWSAAction()
Deprecated.- Specified by:
getWSAActionin interfaceorg.apache.synapse.MessageContext
-
setWSAAction
public void setWSAAction(String actionURI)
Deprecated.- Specified by:
setWSAActionin interfaceorg.apache.synapse.MessageContext
-
getSoapAction
public String getSoapAction()
Deprecated.- Specified by:
getSoapActionin interfaceorg.apache.synapse.MessageContext
-
setSoapAction
public void setSoapAction(String string)
Deprecated.- Specified by:
setSoapActionin interfaceorg.apache.synapse.MessageContext
-
getWSAMessageID
public String getWSAMessageID()
Deprecated.- Specified by:
getWSAMessageIDin interfaceorg.apache.synapse.MessageContext
-
setWSAMessageID
public void setWSAMessageID(String messageID)
Deprecated.- Specified by:
setWSAMessageIDin interfaceorg.apache.synapse.MessageContext
-
isDoingMTOM
public boolean isDoingMTOM()
Deprecated.- Specified by:
isDoingMTOMin interfaceorg.apache.synapse.MessageContext
-
setDoingMTOM
public void setDoingMTOM(boolean b)
Deprecated.- Specified by:
setDoingMTOMin interfaceorg.apache.synapse.MessageContext
-
isDoingSWA
public boolean isDoingSWA()
Deprecated.- Specified by:
isDoingSWAin interfaceorg.apache.synapse.MessageContext
-
setDoingSWA
public void setDoingSWA(boolean b)
Deprecated.- Specified by:
setDoingSWAin interfaceorg.apache.synapse.MessageContext
-
isDoingPOX
public boolean isDoingPOX()
Deprecated.- Specified by:
isDoingPOXin interfaceorg.apache.synapse.MessageContext
-
setDoingPOX
public void setDoingPOX(boolean b)
Deprecated.- Specified by:
setDoingPOXin interfaceorg.apache.synapse.MessageContext
-
isDoingGET
public boolean isDoingGET()
Deprecated.- Specified by:
isDoingGETin interfaceorg.apache.synapse.MessageContext
-
setDoingGET
public void setDoingGET(boolean b)
Deprecated.- Specified by:
setDoingGETin interfaceorg.apache.synapse.MessageContext
-
isSOAP11
public boolean isSOAP11()
Deprecated.- Specified by:
isSOAP11in interfaceorg.apache.synapse.MessageContext
-
isResponse
public boolean isResponse()
Deprecated.- Specified by:
isResponsein interfaceorg.apache.synapse.MessageContext
-
setResponse
public void setResponse(boolean b)
Deprecated.- Specified by:
setResponsein interfaceorg.apache.synapse.MessageContext
-
isFaultResponse
public boolean isFaultResponse()
Deprecated.- Specified by:
isFaultResponsein interfaceorg.apache.synapse.MessageContext
-
setFaultResponse
public void setFaultResponse(boolean b)
Deprecated.- Specified by:
setFaultResponsein interfaceorg.apache.synapse.MessageContext
-
getTracingState
public int getTracingState()
Deprecated.- Specified by:
getTracingStatein interfaceorg.apache.synapse.MessageContext
-
setTracingState
public void setTracingState(int tracingState)
Deprecated.- Specified by:
setTracingStatein interfaceorg.apache.synapse.MessageContext
-
getFaultStack
public Stack<org.apache.synapse.FaultHandler> getFaultStack()
Deprecated.- Specified by:
getFaultStackin interfaceorg.apache.synapse.MessageContext
-
pushFaultHandler
public void pushFaultHandler(org.apache.synapse.FaultHandler fault)
Deprecated.- Specified by:
pushFaultHandlerin interfaceorg.apache.synapse.MessageContext
-
pushContinuationState
public void pushContinuationState(org.apache.synapse.ContinuationState continuationState)
Deprecated.- Specified by:
pushContinuationStatein interfaceorg.apache.synapse.MessageContext
-
getContinuationStateStack
public Stack<org.apache.synapse.ContinuationState> getContinuationStateStack()
Deprecated.- Specified by:
getContinuationStateStackin interfaceorg.apache.synapse.MessageContext
-
isContinuationEnabled
public boolean isContinuationEnabled()
Deprecated.- Specified by:
isContinuationEnabledin interfaceorg.apache.synapse.MessageContext
-
setContinuationEnabled
public void setContinuationEnabled(boolean contStateStackEnabled)
Deprecated.- Specified by:
setContinuationEnabledin interfaceorg.apache.synapse.MessageContext
-
getServiceLog
public org.apache.commons.logging.Log getServiceLog()
Deprecated.- Specified by:
getServiceLogin interfaceorg.apache.synapse.MessageContext
-
getSequenceTemplate
public org.apache.synapse.Mediator getSequenceTemplate(String key)
Deprecated.- Specified by:
getSequenceTemplatein interfaceorg.apache.synapse.MessageContext
-
getDefaultConfiguration
public org.apache.synapse.Mediator getDefaultConfiguration(String arg0)
Deprecated.- Specified by:
getDefaultConfigurationin interfaceorg.apache.synapse.MessageContext
-
getMessageString
public String getMessageString()
Deprecated.- Specified by:
getMessageStringin interfaceorg.apache.synapse.MessageContext
-
getMessageFlowTracingState
public int getMessageFlowTracingState()
Deprecated.- Specified by:
getMessageFlowTracingStatein interfaceorg.apache.synapse.MessageContext
-
setMessageFlowTracingState
public void setMessageFlowTracingState(int state)
Deprecated.- Specified by:
setMessageFlowTracingStatein interfaceorg.apache.synapse.MessageContext
-
-