public class MessageInjector extends java.lang.Object implements org.apache.synapse.task.Task, ManagedLifecycle
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
GET_FORMAT |
static java.lang.String |
POX_FORMAT |
static java.lang.String |
SOAP11_FORMAT |
static java.lang.String |
SOAP12_FORMAT |
Constructor and Description |
---|
MessageInjector() |
Modifier and Type | Method and Description |
---|---|
void |
addRuntimeProperty(java.lang.String key,
java.lang.Object value)
Set a property to be used at runtime.
|
void |
destroy()
Destroys the Injector
|
void |
execute()
This will be invoked by the scheduler to inject the message
in to the SynapseEnvironment
|
java.lang.String |
getRegistryKey() |
java.lang.Object |
getRuntimeProperty(java.lang.String key)
Get a property stored for runtime use
|
void |
init(SynapseEnvironment se)
Initializes the Injector
|
void |
setFormat(java.lang.String format)
Sets the format of the message
|
void |
setInjectTo(java.lang.String injectTo)
Artifact type which message should be injected
|
void |
setInvokeHandlers(java.lang.String invokeHandlers)
Enable / Disable invoking the handlers.
|
void |
setMessage(org.apache.axiom.om.OMElement elem)
Set the message to be injected
|
void |
setProxyName(java.lang.String proxyName)
Set name of the proxy service which message should be injected
|
void |
setRegistryKey(java.lang.String registryKey) |
void |
setSequenceName(java.lang.String sequenceName)
Set name of the sequence which message should be injected
|
void |
setSoapAction(java.lang.String soapAction)
Sets the SOAPAction and valid only when the format is given as soap11
|
void |
setTo(java.lang.String url)
Set the to address of the message to be injected
|
public static final java.lang.String SOAP11_FORMAT
public static final java.lang.String SOAP12_FORMAT
public static final java.lang.String POX_FORMAT
public static final java.lang.String GET_FORMAT
public void init(SynapseEnvironment se)
init
in interface ManagedLifecycle
se
- SynapseEnvironment of synapsepublic void setMessage(org.apache.axiom.om.OMElement elem)
elem
- OMElement describing the messagepublic void setTo(java.lang.String url)
url
- String containing the to addresspublic void setFormat(java.lang.String format)
format
- could be one of either "soap11" | "soap12" | "pox" | "get"public void setInvokeHandlers(java.lang.String invokeHandlers)
invokeHandlers
- should be "true" | "false"public void setSoapAction(java.lang.String soapAction)
soapAction
- SOAPAction header value to be setpublic void setInjectTo(java.lang.String injectTo)
injectTo
- Could be one of "proxy" | "sequence" | "main"public void setSequenceName(java.lang.String sequenceName)
sequenceName
- sequence namepublic void setProxyName(java.lang.String proxyName)
proxyName
- proxy service namepublic java.lang.String getRegistryKey()
public void setRegistryKey(java.lang.String registryKey)
public void addRuntimeProperty(java.lang.String key, java.lang.Object value)
key
- Key of the propertyvalue
- Value of the propertypublic java.lang.Object getRuntimeProperty(java.lang.String key) throws java.lang.NullPointerException
key
- Key of the property to retrievejava.lang.NullPointerException
public void execute()
execute
in interface org.apache.synapse.task.Task
public void destroy()
destroy
in interface ManagedLifecycle
Copyright © 2005-2021 Apache Software Foundation. All Rights Reserved.