Package org.apache.synapse.config
Class SynapseConfiguration
- java.lang.Object
-
- org.apache.synapse.config.SynapseConfiguration
-
- All Implemented Interfaces:
ManagedLifecycle
,SynapseArtifact
public class SynapseConfiguration extends Object implements ManagedLifecycle, SynapseArtifact
The SynapseConfiguration holds the global configuration for a Synapse instance.
-
-
Constructor Summary
Constructors Constructor Description SynapseConfiguration()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Object
acquireLock(String key)
void
addAPI(String name, API api)
void
addAPI(String name, API api, boolean reOrder)
void
addEndpoint(String key, Entry entry)
Deprecated.void
addEndpoint(String key, Endpoint endpoint)
Define a named endpoint with the given key.void
addEndpointTemplate(String name, Template template)
void
addEntry(String key, Entry entry)
Define a resource to the local registry.void
addEventSource(String name, SynapseEventSource eventSource)
Add an event source to the configuration.void
addInboundEndpoint(String name, InboundEndpoint inboundEndpoint)
void
addMessageProcessor(String name, MessageProcessor processor)
Add message processor to the synapse configuration with given namevoid
addMessageStore(String name, MessageStore messageStore)
Add MessageStore to the configuration with a given name.static void
addNewDeployedLib(String name, Library library)
void
addPriorityExecutor(String name, org.apache.synapse.commons.executors.PriorityExecutor executor)
Add an executorvoid
addProxyService(String name, ProxyService proxy)
Add a Proxy service to the configuration.void
addSequence(String key, Entry entry)
Deprecated.void
addSequence(String key, Mediator mediator)
Add a named sequence into the local registry.void
addSequenceTemplate(String key, TemplateMediator mediator)
Add a sequence-template into the local registry.void
addStartup(Startup startup)
Add a startup to the startups map in the configuration.void
addSwaggerDefinition(String apiName, String swaggerDefinition)
Add swagger definition of an API.void
addSynapseImport(String name, SynapseImport synImport)
Add Synapse Import to a configuration with given namevoid
addSynapseLibrary(String name, Library library)
Add Synapse library to configuration with given namevoid
addToCommentedTextList(String comment)
Add new comment text entry to the existing list*void
clearCache()
Clears the cache of all the remote entries which has been cached in the configurationvoid
clearCachedEntry(String key)
Clears the cache of the remote entry with the key specifiedvoid
destroy()
This method will be called on the soft shutdown or destroying the configuration and will destroy all the stateful managed parts of the configuration.void
destroy(boolean preserverState)
API
getAPI(String name)
Collection<API>
getAPIs()
Collection<API>
getAPIs(String bindTo)
Get the API specifying the binds to optionSynapseArtifactDeploymentStore
getArtifactDeploymentStore()
Get the SynapseArtifactDeploymentStore which is used to store the information about the deployed artifactsorg.apache.axis2.engine.AxisConfiguration
getAxisConfiguration()
Get the Axis2 AxisConfiguration for the SynapseConfigurationMap<String,Entry>
getCachedEntries()
Gives the set of remote entries that are cached in localRegistry as mapping of entry key to the Entry definitionList<String>
getCommentedTextList()
Returns CommentedText ListCompletedStructureStore
getCompletedStructureStore()
This method returns the CompletedStructureStore responsible for collecting completed statistics for this synapse instance.Map<String,Object>
getDecryptedCacheMap()
Returns the map which contains the Decrypted values read via the secure vault providerMediator
getDefaultConfiguration(String key)
QName
getDefaultQName()
Get the default QName of the configuration.Map<String,Endpoint>
getDefinedEndpoints()
Returns the map of defined endpoints in the configuration excluding the fetched endpoints from remote registryMap<String,Entry>
getDefinedEntries()
Returns the map of defined entries in the configuration excluding the fetched entries from remote registry.Map<String,SequenceMediator>
getDefinedSequences()
Returns the map of defined sequences in the configuration excluding the fetched sequences from remote registry.static Library
getDeployedLib(String name)
static int
getDeployedLibCount(String name)
String
getDescription()
Gets the configuration descriptionEndpoint
getEndpoint(String key)
Get the definition of the endpoint with the given keyTemplate
getEndpointTemplate(String key)
Map<String,Template>
getEndpointTemplates()
Returns the map of defined synapse endpoint templates in the configuration excluding the fetched sequences from remote registry.Object
getEntry(String key)
Get the resource with the given keyEntry
getEntryDefinition(String key)
Get the Entry object mapped to the given keySynapseEventSource
getEventSource(String name)
Collection<SynapseEventSource>
getEventSources()
Mediator
getFaultSequence()
Return the fault sequence to be executed when Synapse encounters a fault scenario during processingorg.apache.axiom.om.OMElement
getFormat(String key)
Return the format of the payload factory specified by the given keyInboundEndpoint
getInboundEndpoint(String name)
Collection<InboundEndpoint>
getInboundEndpoints()
Map
getLocalRegistry()
Return an unmodifiable copy of the local registryObject
getLocalRegistryEntry(String key)
Get the resource from local registryMediator
getMainSequence()
Return the main/default sequence to be executed.Mediator
getMandatorySequence()
Gets the mandatory sequence, from the direct reference.Map<String,MessageProcessor>
getMessageProcessors()
Get all Message processors in the Synapse configurationMessageStore
getMessageStore(String name)
Get the Message store for the configuration with a given name.Map<String,MessageStore>
getMessageStores()
Get Message stores definedList<SynapseObserver>
getObservers()
String
getPathToConfigFile()
The path to the currently loaded configuration fileMap<String,org.apache.synapse.commons.executors.PriorityExecutor>
getPriorityExecutors()
Get the executors mapProperties
getProperties()
Gets the properties to configure the Synapse environment.String
getProperty(String propKey)
Gets the property value if the property specified by the propKey is there or null elselong
getProperty(String propKey, long def)
Gets the String representation of the property value if there is a property for the given propKey or returns the default value passedString
getProperty(String propKey, String def)
Gets the String representation of the property value if there is a property for the given propKey or returns the default value passedProxyService
getProxyService(String name)
Get the Proxy service with the given nameCollection<ProxyService>
getProxyServices()
Return the list of defined proxy servicesRegistry
getRegistry()
Get the remote registry defined (if any)Mediator
getSequence(String key)
Return the sequence specified with the given keyTemplateMediator
getSequenceTemplate(String key)
Return the template specified with the given keyMap<String,TemplateMediator>
getSequenceTemplates()
Returns the map of defined synapse templates in the configuration excluding the fetched sequences from remote registry.Startup
getStartup(String id)
Get the Startup with the specified nameCollection<Startup>
getStartups()
Get the startup collection in the configurationString
getSwaggerOfTheAPI(String apiName)
Get swagger definition of a given API.Map<String,SynapseImport>
getSynapseImports()
Get all Synapse libraries in the Synapse configurationMap<String,Library>
getSynapseLibraries()
Get all Synapse libraries in the Synapse configurationTimer
getSynapseTimer()
Get the timer object for the Synapse Configurationorg.apache.synapse.task.TaskManager
getTaskManager()
void
init(SynapseEnvironment se)
This method will be called in the startup of Synapse or in an initiation and will initialize all the managed parts of the Synapse Configurationboolean
isAllowHotUpdate()
void
reconstructAPITable()
This method reconstructs the apiTable, and inboundApiMappings in descending order of contextvoid
registerObserver(SynapseObserver o)
void
removeAPI(String name)
void
removeEndpoint(String key)
Deletes the endpoint with the given key.void
removeEndpointTemplate(String name)
void
removeEntry(String key)
Deletes any reference mapped to the given key from the local registryvoid
removeEventSource(String name)
Remove an event source from the configuration.org.apache.synapse.commons.executors.PriorityExecutor
removeExecutor(String name)
Removes an executor from the configurationvoid
removeInboundEndpoint(String name)
MessageProcessor
removeMessageProcessor(String name)
remove the message processor from the synapse configurationMessageStore
removeMessageStore(String name)
Removes a Message store from the configurationstatic void
removeOneDeployedLib(String name)
void
removeProxyService(String name)
Deletes the Proxy Service named with the given name.void
removeSequence(String key)
Removes a sequence from the local registryvoid
removeSequenceTemplate(String name)
Removes a template from the local registryvoid
removeStartup(String name)
Removes the startup specified by the name.void
removeSwaggerFromTheAPI(String name)
Remove the swagger definition from Synapse Context if it exists.SynapseImport
removeSynapseImport(String name)
remove the Synapse library from the synapse configurationLibrary
removeSynapseLibrary(String name)
remove the Synapse library from the synapse configurationvoid
setAllowHotUpdate(boolean allowHotUpdate)
void
setAxisConfiguration(org.apache.axis2.engine.AxisConfiguration axisConfig)
Set the Axis2 AxisConfiguration to the SynapseConfigurationvoid
setDefaultQName(QName defaultQName)
Set the default QName of the Synapse Configurationvoid
setDescription(String description)
Sets the description of the configurationvoid
setEventSources(Map<String,SynapseEventSource> eventSources)
void
setMandatorySequence(Mediator mandatorySequence)
Sets the mandatory sequence direct referencevoid
setPathToConfigFile(String pathToConfigFile)
Set the path to the loaded synapse.xmlvoid
setProperties(Properties properties)
Deprecated.void
setProperty(String key, String value)
Sets the specified property to the Synapse configurationvoid
setRegistry(Registry registry)
Set the remote registry for the configurationvoid
setSynapseTimer(Timer synapseTimer)
Set the SynapseTimer of the Synapse Configurationvoid
setTaskManager(org.apache.synapse.task.TaskManager taskManager)
void
unregisterObserver(SynapseObserver observer)
void
updateAPI(String name, API api)
void
updateEndpoint(String key, Endpoint endpoint)
void
updateEndpointTemplate(String name, Template template)
void
updateEntry(String key, Entry entry)
void
updateInboundEndpoint(String name, InboundEndpoint inboundEndpoint)
void
updatePriorityExecutor(String name, org.apache.synapse.commons.executors.PriorityExecutor executor)
void
updateSequence(String key, Mediator mediator)
void
updateSequenceTemplate(String key, TemplateMediator mediator)
Update a sequence-template into the local registry.void
updateStartup(Startup startup)
void
validateSwaggerTable()
Remove swagger contents without corresponding API.
-
-
-
Method Detail
-
addSequence
public void addSequence(String key, Mediator mediator)
Add a named sequence into the local registry. If a sequence already exists by the specified key a runtime exception is thrown.- Parameters:
key
- the name for the sequencemediator
- a Sequence mediator
-
addSequenceTemplate
public void addSequenceTemplate(String key, TemplateMediator mediator)
Add a sequence-template into the local registry. If a template already exists by the specified key a runtime exception is thrown.- Parameters:
key
- the name for the sequencemediator
- a Sequence mediator
-
updateSequenceTemplate
public void updateSequenceTemplate(String key, TemplateMediator mediator)
Update a sequence-template into the local registry. If a template already exists by the specified key a runtime exception is thrown.- Parameters:
key
- the name for the sequencemediator
- a Sequence mediator
-
addSequence
public void addSequence(String key, Entry entry)
Deprecated.Allow a dynamic sequence to be cached and made available through the local registry. If a sequence already exists by the specified key a runtime exception is thrown.- Parameters:
key
- the key to lookup the sequence from the remote registryentry
- the Entry object which holds meta information and the cached resource
-
getDefinedSequences
public Map<String,SequenceMediator> getDefinedSequences()
Returns the map of defined sequences in the configuration excluding the fetched sequences from remote registry.- Returns:
- Map of SequenceMediators defined in the local configuration
-
getSequenceTemplates
public Map<String,TemplateMediator> getSequenceTemplates()
Returns the map of defined synapse templates in the configuration excluding the fetched sequences from remote registry.- Returns:
- Map of Templates defined in the local configuration
-
getEndpointTemplates
public Map<String,Template> getEndpointTemplates()
Returns the map of defined synapse endpoint templates in the configuration excluding the fetched sequences from remote registry.- Returns:
- Map of Templates defined in the local configuration
-
addInboundEndpoint
public void addInboundEndpoint(String name, InboundEndpoint inboundEndpoint)
-
getInboundEndpoint
public InboundEndpoint getInboundEndpoint(String name)
-
getInboundEndpoints
public Collection<InboundEndpoint> getInboundEndpoints()
-
updateInboundEndpoint
public void updateInboundEndpoint(String name, InboundEndpoint inboundEndpoint)
-
removeInboundEndpoint
public void removeInboundEndpoint(String name)
-
addSwaggerDefinition
public void addSwaggerDefinition(String apiName, String swaggerDefinition)
Add swagger definition of an API.- Parameters:
apiName
- name of the API.swaggerDefinition
- Swagger definition as string.
-
validateSwaggerTable
public void validateSwaggerTable()
Remove swagger contents without corresponding API. This discrepancy can happen by a faulty CAPP.
-
getSwaggerOfTheAPI
public String getSwaggerOfTheAPI(String apiName)
Get swagger definition of a given API.- Parameters:
apiName
- deployed name of the API.- Returns:
- Swagger definition on the API, else null.
-
getAPIs
public Collection<API> getAPIs()
-
getAPIs
public Collection<API> getAPIs(String bindTo)
Get the API specifying the binds to option- Parameters:
bindTo
- Name of inbound/binds-to- Returns:
- list of APIs bound to the specified inbound
-
removeAPI
public void removeAPI(String name)
-
removeSwaggerFromTheAPI
public void removeSwaggerFromTheAPI(String name)
Remove the swagger definition from Synapse Context if it exists.- Parameters:
name
- artifact name of the API.
-
getSequenceTemplate
public TemplateMediator getSequenceTemplate(String key)
Return the template specified with the given key- Parameters:
key
- the key being referenced for the template- Returns:
- the template referenced by the key from local/remote registry
-
getMandatorySequence
public Mediator getMandatorySequence()
Gets the mandatory sequence, from the direct reference. This is also available in thegetSequence(String)
but this method improves the performance hence this will be required for all messages- Returns:
- mandatory sequence direct reference in the local configuration
-
setMandatorySequence
public void setMandatorySequence(Mediator mandatorySequence)
Sets the mandatory sequence direct reference- Parameters:
mandatorySequence
- to be set as the direct reference
-
getSequence
public Mediator getSequence(String key)
Return the sequence specified with the given key- Parameters:
key
- the key being referenced- Returns:
- the sequence referenced by the key
-
getFormat
public org.apache.axiom.om.OMElement getFormat(String key)
Return the format of the payload factory specified by the given key- Parameters:
key
-- Returns:
- OMElement
-
removeSequence
public void removeSequence(String key)
Removes a sequence from the local registry- Parameters:
key
- of the sequence to be removed
-
removeSequenceTemplate
public void removeSequenceTemplate(String name)
Removes a template from the local registry- Parameters:
name
- of the template to be removed
-
getMainSequence
public Mediator getMainSequence()
Return the main/default sequence to be executed. This is the sequence which will execute for all messages when message mediation takes place- Returns:
- the main mediator sequence
-
getFaultSequence
public Mediator getFaultSequence()
Return the fault sequence to be executed when Synapse encounters a fault scenario during processing- Returns:
- the fault sequence
-
addEntry
public void addEntry(String key, Entry entry)
Define a resource to the local registry. All static resources (e.g. URL source) are loaded during this definition phase, and the inability to load such a resource will not allow the definition of the resource to the local registry. If an entry already exists by the specified key a runtime exception is thrown.- Parameters:
key
- the key associated with the resourceentry
- the Entry that holds meta information about the resource and its contents (or cached contents if the Entry refers to a dynamic resource off a remote registry)
-
getCachedEntries
public Map<String,Entry> getCachedEntries()
Gives the set of remote entries that are cached in localRegistry as mapping of entry key to the Entry definition- Returns:
- Map of locally cached entries
-
getDefinedEntries
public Map<String,Entry> getDefinedEntries()
Returns the map of defined entries in the configuration excluding the fetched entries from remote registry.- Returns:
- Map of Entries defined in the local configuration
-
getLocalRegistryEntry
public Object getLocalRegistryEntry(String key)
Get the resource from local registry- Parameters:
key
- the key of the resource required- Returns:
- value for the key
-
getEntry
public Object getEntry(String key)
Get the resource with the given key- Parameters:
key
- the key of the resource required- Returns:
- its value
-
getEntryDefinition
public Entry getEntryDefinition(String key)
Get the Entry object mapped to the given key- Parameters:
key
- the key for which the Entry is required- Returns:
- its value
-
removeEntry
public void removeEntry(String key)
Deletes any reference mapped to the given key from the local registry- Parameters:
key
- the key of the reference to be removed
-
clearCachedEntry
public void clearCachedEntry(String key)
Clears the cache of the remote entry with the key specified- Parameters:
key
- - String key of the entry
-
clearCache
public void clearCache()
Clears the cache of all the remote entries which has been cached in the configuration
-
addEndpoint
public void addEndpoint(String key, Endpoint endpoint)
Define a named endpoint with the given key. If an endpoint already exists by the specified name a runtime exception is thrown.- Parameters:
key
- the key for the endpointendpoint
- the endpoint definition
-
addEndpoint
public void addEndpoint(String key, Entry entry)
Deprecated.Add a dynamic endpoint definition to the local registry. If an endpoint already exists by the specified name a runtime exception is thrown.- Parameters:
key
- the key for the endpoint definitionentry
- the actual endpoint definition to be added
-
getDefinedEndpoints
public Map<String,Endpoint> getDefinedEndpoints()
Returns the map of defined endpoints in the configuration excluding the fetched endpoints from remote registry- Returns:
- Map of Endpoints defined in the local configuration
-
getEndpoint
public Endpoint getEndpoint(String key)
Get the definition of the endpoint with the given key- Parameters:
key
- the key of the endpoint- Returns:
- the endpoint definition
-
removeEndpoint
public void removeEndpoint(String key)
Deletes the endpoint with the given key. If an endpoint does not exist by the specified key a runtime exception is thrown.- Parameters:
key
- of the endpoint to be deleted
-
addProxyService
public void addProxyService(String name, ProxyService proxy)
Add a Proxy service to the configuration. If a proxy service already exists by the specified name a runtime exception is thrown.- Parameters:
name
- the name of the Proxy serviceproxy
- the Proxy service instance
-
getProxyService
public ProxyService getProxyService(String name)
Get the Proxy service with the given name- Parameters:
name
- the name being looked up- Returns:
- the Proxy service
-
removeProxyService
public void removeProxyService(String name)
Deletes the Proxy Service named with the given name. If a proxy service does not exist by the specified name a runtime exception is thrown.- Parameters:
name
- of the Proxy Service to be deleted
-
getProxyServices
public Collection<ProxyService> getProxyServices()
Return the list of defined proxy services- Returns:
- the proxy services defined
-
getLocalRegistry
public Map getLocalRegistry()
Return an unmodifiable copy of the local registry- Returns:
- an unmodifiable copy of the local registry
-
getRegistry
public Registry getRegistry()
Get the remote registry defined (if any)- Returns:
- the currently defined remote registry
-
setRegistry
public void setRegistry(Registry registry)
Set the remote registry for the configuration- Parameters:
registry
- the remote registry for the configuration
-
setAxisConfiguration
public void setAxisConfiguration(org.apache.axis2.engine.AxisConfiguration axisConfig)
Set the Axis2 AxisConfiguration to the SynapseConfiguration- Parameters:
axisConfig
- AxisConfiguration to be set
-
getAxisConfiguration
public org.apache.axis2.engine.AxisConfiguration getAxisConfiguration()
Get the Axis2 AxisConfiguration for the SynapseConfiguration- Returns:
- AxisConfiguration of the Axis2
-
getPathToConfigFile
public String getPathToConfigFile()
The path to the currently loaded configuration file- Returns:
- file path to synapse.xml
-
setPathToConfigFile
public void setPathToConfigFile(String pathToConfigFile)
Set the path to the loaded synapse.xml- Parameters:
pathToConfigFile
- path to the synapse.xml loaded
-
setDefaultQName
public void setDefaultQName(QName defaultQName)
Set the default QName of the Synapse Configuration- Parameters:
defaultQName
- QName specifying the default QName of the configuration
-
getDefaultQName
public QName getDefaultQName()
Get the default QName of the configuration.- Returns:
- default QName of the configuration
-
getSynapseTimer
public Timer getSynapseTimer()
Get the timer object for the Synapse Configuration- Returns:
- synapseTimer timer object of the configuration
-
setSynapseTimer
public void setSynapseTimer(Timer synapseTimer)
Set the SynapseTimer of the Synapse Configuration- Parameters:
synapseTimer
- SynapseTimer of the Synapse Configuration
-
getStartups
public Collection<Startup> getStartups()
Get the startup collection in the configuration- Returns:
- collection of startup objects registered
-
getStartup
public Startup getStartup(String id)
Get the Startup with the specified name- Parameters:
id
- - String name of the startup to be retrieved- Returns:
- Startup object with the specified name or null
-
addStartup
public void addStartup(Startup startup)
Add a startup to the startups map in the configuration. If a startup already exists by the specified name a runtime exception is thrown.- Parameters:
startup
- - Startup object to be added
-
updateStartup
public void updateStartup(Startup startup)
-
removeStartup
public void removeStartup(String name)
Removes the startup specified by the name. If no startup exists by the specified name a runtime exception is thrown.- Parameters:
name
- - name of the startup that needs to be removed
-
getProperties
public Properties getProperties()
Gets the properties to configure the Synapse environment.- Returns:
- set of properties as Properties
-
setProperty
public void setProperty(String key, String value)
Sets the specified property to the Synapse configuration- Parameters:
key
- Name of the propertyvalue
- Value of the property to be set
-
setProperties
public void setProperties(Properties properties)
Deprecated.Sets the properties to configure the Synapse environment.- Parameters:
properties
- - Properties which needs to be set
-
getProperty
public String getProperty(String propKey, String def)
Gets the String representation of the property value if there is a property for the given propKey or returns the default value passed- Parameters:
propKey
- - key for the property lookupdef
- - default value- Returns:
- String representation of the property value with the given key or the def value
-
getProperty
public long getProperty(String propKey, long def)
Gets the String representation of the property value if there is a property for the given propKey or returns the default value passed- Parameters:
propKey
- - key for the property lookupdef
- - default value- Returns:
- String representation of the property value with the given key or the def value
-
getProperty
public String getProperty(String propKey)
Gets the property value if the property specified by the propKey is there or null else- Parameters:
propKey
- - key for the property lookup- Returns:
- String representation of the property value if found or null else
-
destroy
public void destroy()
This method will be called on the soft shutdown or destroying the configuration and will destroy all the stateful managed parts of the configuration.- Specified by:
destroy
in interfaceManagedLifecycle
-
destroy
public void destroy(boolean preserverState)
-
init
public void init(SynapseEnvironment se)
This method will be called in the startup of Synapse or in an initiation and will initialize all the managed parts of the Synapse Configuration- Specified by:
init
in interfaceManagedLifecycle
- Parameters:
se
- SynapseEnvironment specifying the env to be initialized
-
addEventSource
public void addEventSource(String name, SynapseEventSource eventSource)
Add an event source to the configuration. If an event source already exists by the specified name a runtime exception is thrown.- Parameters:
name
- name of the event sourceeventSource
- the event source to be added
-
getEventSource
public SynapseEventSource getEventSource(String name)
-
removeEventSource
public void removeEventSource(String name)
Remove an event source from the configuration. If the specified event source does not exist a runtime exception is thrown.- Parameters:
name
- name of the event source to be removed
-
getEventSources
public Collection<SynapseEventSource> getEventSources()
-
setEventSources
public void setEventSources(Map<String,SynapseEventSource> eventSources)
-
registerObserver
public void registerObserver(SynapseObserver o)
-
getObservers
public List<SynapseObserver> getObservers()
-
unregisterObserver
public void unregisterObserver(SynapseObserver observer)
-
addPriorityExecutor
public void addPriorityExecutor(String name, org.apache.synapse.commons.executors.PriorityExecutor executor)
Add an executor- Parameters:
name
- name of the executorexecutor
- executor
-
updatePriorityExecutor
public void updatePriorityExecutor(String name, org.apache.synapse.commons.executors.PriorityExecutor executor)
-
getPriorityExecutors
public Map<String,org.apache.synapse.commons.executors.PriorityExecutor> getPriorityExecutors()
Get the executors map- Returns:
- executors map, stored as name of executor and executor
-
removeExecutor
public org.apache.synapse.commons.executors.PriorityExecutor removeExecutor(String name)
Removes an executor from the configuration- Parameters:
name
- name of the executor- Returns:
- removed executor
-
getMessageStore
public MessageStore getMessageStore(String name)
Get the Message store for the configuration with a given name.- Parameters:
name
- Name of the message store- Returns:
- a MessageStore instance or null
-
addMessageStore
public void addMessageStore(String name, MessageStore messageStore)
Add MessageStore to the configuration with a given name.- Parameters:
name
- Name of the message storemessageStore
- a MessageStore instance
-
getMessageStores
public Map<String,MessageStore> getMessageStores()
Get Message stores defined- Returns:
- message store map stored as name of the message store and message store
-
removeMessageStore
public MessageStore removeMessageStore(String name)
Removes a Message store from the configuration- Parameters:
name
- name of the message store- Returns:
- The message store with the specified name
-
addMessageProcessor
public void addMessageProcessor(String name, MessageProcessor processor)
Add message processor to the synapse configuration with given name- Parameters:
name
- of the Message processorprocessor
- instance
-
getMessageProcessors
public Map<String,MessageProcessor> getMessageProcessors()
Get all Message processors in the Synapse configuration- Returns:
- Return Map that contains all the message processors
-
removeMessageProcessor
public MessageProcessor removeMessageProcessor(String name)
remove the message processor from the synapse configuration- Parameters:
name
- of the message- Returns:
- Removed Message processor instance
-
addSynapseLibrary
public void addSynapseLibrary(String name, Library library)
Add Synapse library to configuration with given name- Parameters:
name
- of synapse liblibrary
- instance
-
getSynapseLibraries
public Map<String,Library> getSynapseLibraries()
Get all Synapse libraries in the Synapse configuration- Returns:
- Return Map that contains all the Synapse libraries
-
getDeployedLibCount
public static int getDeployedLibCount(String name)
-
removeOneDeployedLib
public static void removeOneDeployedLib(String name)
-
removeSynapseLibrary
public Library removeSynapseLibrary(String name)
remove the Synapse library from the synapse configuration- Parameters:
name
- of the lib- Returns:
- Removed Synapse library instance
-
addSynapseImport
public void addSynapseImport(String name, SynapseImport synImport)
Add Synapse Import to a configuration with given name- Parameters:
name
- of synapse libsynImport
- instance
-
getSynapseImports
public Map<String,SynapseImport> getSynapseImports()
Get all Synapse libraries in the Synapse configuration- Returns:
- Return Map that contains all the Synapse libraries
-
removeSynapseImport
public SynapseImport removeSynapseImport(String name)
remove the Synapse library from the synapse configuration- Parameters:
name
- of the lib- Returns:
- Removed Synapse library instance
-
setDescription
public void setDescription(String description)
Sets the description of the configuration- Specified by:
setDescription
in interfaceSynapseArtifact
- Parameters:
description
- tobe set to the artifact
-
getDescription
public String getDescription()
Gets the configuration description- Specified by:
getDescription
in interfaceSynapseArtifact
- Returns:
- description of the configuration
-
getArtifactDeploymentStore
public SynapseArtifactDeploymentStore getArtifactDeploymentStore()
Get the SynapseArtifactDeploymentStore which is used to store the information about the deployed artifacts- Returns:
- the SynapseArtifactDeploymentStore for this configuration
-
getDecryptedCacheMap
public Map<String,Object> getDecryptedCacheMap()
Returns the map which contains the Decrypted values read via the secure vault provider- Returns:
-
getTaskManager
public org.apache.synapse.task.TaskManager getTaskManager()
-
setTaskManager
public void setTaskManager(org.apache.synapse.task.TaskManager taskManager)
-
removeEndpointTemplate
public void removeEndpointTemplate(String name)
-
isAllowHotUpdate
public boolean isAllowHotUpdate()
-
setAllowHotUpdate
public void setAllowHotUpdate(boolean allowHotUpdate)
-
getCommentedTextList
public List<String> getCommentedTextList()
Returns CommentedText List- Returns:
- ArrayList of String contains commented text segments
-
addToCommentedTextList
public void addToCommentedTextList(String comment)
Add new comment text entry to the existing list*- Parameters:
comment
- String comment
-
getCompletedStructureStore
public CompletedStructureStore getCompletedStructureStore()
This method returns the CompletedStructureStore responsible for collecting completed statistics for this synapse instance.- Returns:
- CompletedStructureStore for this synapse instance
-
reconstructAPITable
public void reconstructAPITable()
This method reconstructs the apiTable, and inboundApiMappings in descending order of context
-
-