public class MessageInjector extends Object implements org.apache.synapse.task.Task, ManagedLifecycle
| Modifier and Type | Field and Description |
|---|---|
static String |
GET_FORMAT |
static String |
POX_FORMAT |
static String |
SOAP11_FORMAT |
static String |
SOAP12_FORMAT |
| Constructor and Description |
|---|
MessageInjector() |
| Modifier and Type | Method and Description |
|---|---|
void |
addRuntimeProperty(String key,
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
|
String |
getRegistryKey() |
Object |
getRuntimeProperty(String key)
Get a property stored for runtime use
|
void |
init(SynapseEnvironment se)
Initializes the Injector
|
void |
setFormat(String format)
Sets the format of the message
|
void |
setInjectTo(String injectTo)
Artifact type which message should be injected
|
void |
setMessage(org.apache.axiom.om.OMElement elem)
Set the message to be injected
|
void |
setProxyName(String proxyName)
Set name of the proxy service which message should be injected
|
void |
setRegistryKey(String registryKey) |
void |
setSequenceName(String sequenceName)
Set name of the sequence which message should be injected
|
void |
setSoapAction(String soapAction)
Sets the SOAPAction and valid only when the format is given as soap11
|
void |
setTo(String url)
Set the to address of the message to be injected
|
public static final String SOAP11_FORMAT
public static final String SOAP12_FORMAT
public static final String POX_FORMAT
public static final String GET_FORMAT
public void init(SynapseEnvironment se)
init in interface ManagedLifecyclese - SynapseEnvironment of synapsepublic void setMessage(org.apache.axiom.om.OMElement elem)
elem - OMElement describing the messagepublic void setTo(String url)
url - String containing the to addresspublic void setFormat(String format)
format - could be one of either "soap11" | "soap12" | "pox" | "get"public void setSoapAction(String soapAction)
soapAction - SOAPAction header value to be setpublic void setInjectTo(String injectTo)
injectTo - Could be one of "proxy" | "sequence" | "main"public void setSequenceName(String sequenceName)
sequenceName - sequence namepublic void setProxyName(String proxyName)
proxyName - proxy service namepublic String getRegistryKey()
public void setRegistryKey(String registryKey)
public void addRuntimeProperty(String key, Object value)
key - Key of the propertyvalue - Value of the propertypublic Object getRuntimeProperty(String key) throws NullPointerException
key - Key of the property to retrieveNullPointerExceptionpublic void execute()
execute in interface org.apache.synapse.task.Taskpublic void destroy()
destroy in interface ManagedLifecycleCopyright © 2005–2019 Apache Software Foundation. All rights reserved.