public class Axis2SynapseEnvironment extends Object implements SynapseEnvironment
Constructor and Description |
---|
Axis2SynapseEnvironment(org.apache.axis2.context.ConfigurationContext cfgCtx,
SynapseConfiguration synapseConfig) |
Axis2SynapseEnvironment(org.apache.axis2.context.ConfigurationContext cfgCtx,
SynapseConfiguration synapseConfig,
ServerContextInformation contextInformation) |
Axis2SynapseEnvironment(SynapseConfiguration synCfg) |
Modifier and Type | Method and Description |
---|---|
void |
addUnavailableArtifactRef(String key)
Add an artifact reference not available in the environment.
|
void |
clearUnavailabilityOfArtifact(String key)
Clear unavailability of an artifact if it is
previously marked as unavailable in the environment
|
MessageContext |
createMessageContext()
This method will be used to create a new MessageContext in the Axis2 environment for
Synapse.
|
org.apache.axiom.util.blob.OverflowBlob |
createOverflowBlob()
Factory method to create the TemporaryData object as per on the parameters specified in the
synapse.properties file, so that the TemporaryData parameters like threshold chunk size
can be customized by using the properties file.
|
org.apache.axis2.context.ConfigurationContext |
getAxis2ConfigurationContext()
Retrieves the
ConfigurationContext associated with this axis2SynapseEnv |
ExecutorService |
getExecutorService()
This will give the access to the synapse thread pool for the
advanced mediation tasks.
|
long |
getGlobalTimeout()
Get the global timeout interval for callbacks
|
MessageDataStore |
getMessageDataStore()
This method returns message data store which holds a queue of event holder objects.
|
ServerContextInformation |
getServerContextInformation()
Retrieve the
ServerContextInformation from the environment. |
SynapseConfiguration |
getSynapseConfiguration()
Retrieves the
SynapseConfiguration from the environment |
SynapseDebugManager |
getSynapseDebugManager()
method to get the reference to debug manager instance which manages debug capabilities in synapse
kept in environment level, made available who ever has access to message context will be able to
get access to the debug manager
|
List<SynapseHandler> |
getSynapseHandlers()
Get all synapse handlers
|
org.apache.synapse.task.SynapseTaskManager |
getTaskManager()
Retrieve the
SynapseTaskManager from the
environment . |
TenantInfoConfigurator |
getTenantInfoConfigurator() |
org.apache.synapse.commons.util.ext.TenantInfoInitiator |
getTenantInfoInitiator() |
Map<QName,SynapseXpathFunctionContextProvider> |
getXpathFunctionExtensions()
Returns all declared xpath Function Extensions
|
Map<QName,SynapseXpathVariableResolver> |
getXpathVariableExtensions()
Returns all declared xpath Variable Extensions
|
void |
injectAsync(MessageContext synCtx,
SequenceMediator seq)
This method injects a new message into the Synapse engine for the mediation
by the specified sequence.
|
boolean |
injectInbound(MessageContext synCtx,
SequenceMediator seq,
boolean sequential)
Used by inbound polling endpoints to inject the message to synapse engine
|
boolean |
injectMessage(MessageContext synCtx)
This method injects a new message into the Synapse engine.
|
boolean |
injectMessage(MessageContext smc,
SequenceMediator seq)
Inject message to the sequence in synchronous manner
|
boolean |
isContinuationEnabled()
Whether continuation is enabled in the environment.
|
boolean |
isDebuggerEnabled()
Whether debugging is enabled in the environment.
|
boolean |
isInitialized()
Has this environment properly initialized?
|
void |
registerSynapseHandler(SynapseHandler handler)
Register a synapse handler to the synapse environment
|
void |
removeUnavailableArtifactRef(String key)
Remove the artifact reference which is previously marked as unavailable in environment
from the unavailable list
|
void |
send(EndpointDefinition endpoint,
MessageContext synCtx)
This will be used for sending the message provided, to the endpoint specified by the
EndpointDefinition using the axis2 environment.
|
void |
setDebugEnabled(boolean isDebugEnabled)
set debugging enabled in the environment.
|
void |
setInitialized(boolean state)
Mark this environment as ready for processing
|
void |
setSeverDebugMode(ServerContextInformation contextInformation)
this method is to set the debug mode is enabled and initializes the debug manager
debug mode is enabled is set for each time Synapse configuration is changed and Synapse
environment initializes
|
void |
setSynapseDebugManager(SynapseDebugManager synapseDebugManager)
sets debug manager when synapse environment initializes if the server instance is started in debug mode
|
void |
setTenantInfoConfigurator(TenantInfoConfigurator configurator) |
void |
setTenantInfoInitiator(org.apache.synapse.commons.util.ext.TenantInfoInitiator initiator) |
void |
setXpathFunctionExtensions(SynapseXpathFunctionContextProvider functionExt) |
void |
setXpathVariableExtensions(SynapseXpathVariableResolver variableExt) |
void |
updateCallMediatorCount(boolean isIncrement)
Increment/Decrement the Call mediator count in the environment by 1.
|
public Axis2SynapseEnvironment(SynapseConfiguration synCfg)
public Axis2SynapseEnvironment(org.apache.axis2.context.ConfigurationContext cfgCtx, SynapseConfiguration synapseConfig)
public Axis2SynapseEnvironment(org.apache.axis2.context.ConfigurationContext cfgCtx, SynapseConfiguration synapseConfig, ServerContextInformation contextInformation)
public void setSeverDebugMode(ServerContextInformation contextInformation)
public boolean injectMessage(MessageContext synCtx)
SynapseEnvironment
injectMessage
in interface SynapseEnvironment
synCtx
- - Synapse MessageContext to be injectedpublic void injectAsync(MessageContext synCtx, SequenceMediator seq)
SynapseEnvironment
injectAsync
in interface SynapseEnvironment
synCtx
- - Synapse message context to be injectedseq
- - Sequence to be used for mediationpublic boolean injectInbound(MessageContext synCtx, SequenceMediator seq, boolean sequential) throws SynapseException
injectInbound
in interface SynapseEnvironment
synCtx
- message contextsequential
- whether message should be injected in sequential manner
without spawning new threadsseq
- - Sequence to be used for mediationSynapseException
- - in case error occured during the mediationpublic void send(EndpointDefinition endpoint, MessageContext synCtx)
send
in interface SynapseEnvironment
endpoint
- - EndpointDefinition to be used to find the endpoint information
and the properties of the sending processsynCtx
- - Synapse MessageContext to be sentpublic MessageContext createMessageContext()
createMessageContext
in interface SynapseEnvironment
public org.apache.axiom.util.blob.OverflowBlob createOverflowBlob()
createOverflowBlob
in interface SynapseEnvironment
public ExecutorService getExecutorService()
getExecutorService
in interface SynapseEnvironment
public boolean isInitialized()
isInitialized
in interface SynapseEnvironment
public void setInitialized(boolean state)
setInitialized
in interface SynapseEnvironment
state
- true means ready for processingpublic SynapseConfiguration getSynapseConfiguration()
SynapseConfiguration
from the environment
getSynapseConfiguration
in interface SynapseEnvironment
public MessageDataStore getMessageDataStore()
SynapseEnvironment
getMessageDataStore
in interface SynapseEnvironment
public org.apache.synapse.task.SynapseTaskManager getTaskManager()
SynapseTaskManager
from the
environment
.getTaskManager
in interface SynapseEnvironment
public ServerContextInformation getServerContextInformation()
ServerContextInformation
from the environment.
getServerContextInformation
in interface SynapseEnvironment
public org.apache.axis2.context.ConfigurationContext getAxis2ConfigurationContext()
ConfigurationContext
associated with this axis2SynapseEnv
public Map<QName,SynapseXpathFunctionContextProvider> getXpathFunctionExtensions()
getXpathFunctionExtensions
in interface SynapseEnvironment
public Map<QName,SynapseXpathVariableResolver> getXpathVariableExtensions()
getXpathVariableExtensions
in interface SynapseEnvironment
public TenantInfoConfigurator getTenantInfoConfigurator()
getTenantInfoConfigurator
in interface SynapseEnvironment
public org.apache.synapse.commons.util.ext.TenantInfoInitiator getTenantInfoInitiator()
public void setXpathFunctionExtensions(SynapseXpathFunctionContextProvider functionExt)
public void setXpathVariableExtensions(SynapseXpathVariableResolver variableExt)
public void setTenantInfoConfigurator(TenantInfoConfigurator configurator)
public void setTenantInfoInitiator(org.apache.synapse.commons.util.ext.TenantInfoInitiator initiator)
public void updateCallMediatorCount(boolean isIncrement)
updateCallMediatorCount
in interface SynapseEnvironment
isIncrement
- whether to increment the countpublic boolean isContinuationEnabled()
isContinuationEnabled
in interface SynapseEnvironment
public void addUnavailableArtifactRef(String key)
addUnavailableArtifactRef
in interface SynapseEnvironment
key
- artifact reference keypublic void removeUnavailableArtifactRef(String key)
removeUnavailableArtifactRef
in interface SynapseEnvironment
key
- artifact reference keypublic void clearUnavailabilityOfArtifact(String key)
clearUnavailabilityOfArtifact
in interface SynapseEnvironment
key
- artifact reference keypublic List<SynapseHandler> getSynapseHandlers()
getSynapseHandlers
in interface SynapseEnvironment
public void registerSynapseHandler(SynapseHandler handler)
registerSynapseHandler
in interface SynapseEnvironment
handler
- synapse handlerpublic long getGlobalTimeout()
SynapseEnvironment
getGlobalTimeout
in interface SynapseEnvironment
public boolean injectMessage(MessageContext smc, SequenceMediator seq)
SynapseEnvironment
injectMessage
in interface SynapseEnvironment
smc
- - Synapse message context to be injectedseq
- - Sequence to be used for mediationpublic SynapseDebugManager getSynapseDebugManager()
getSynapseDebugManager
in interface SynapseEnvironment
public void setSynapseDebugManager(SynapseDebugManager synapseDebugManager)
public boolean isDebuggerEnabled()
isDebuggerEnabled
in interface SynapseEnvironment
public void setDebugEnabled(boolean isDebugEnabled)
Copyright © 2005–2018 Apache Software Foundation. All rights reserved.