public class SynapseConfigUtils
extends java.lang.Object
Constructor and Description |
---|
SynapseConfigUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
addSynapseConfiguration(java.lang.String tenantDomain,
SynapseConfiguration synapseConfiguration) |
static int |
getConnectTimeout() |
static long |
getGlobalTimeoutInterval() |
static org.xml.sax.InputSource |
getInputSourceFormURI(java.net.URI uri) |
static java.io.InputStream |
getInputStream(java.lang.Object o) |
static java.lang.Object |
getObject(java.net.URL url,
java.util.Properties properties)
Get an object from a given URL.
|
static org.apache.axiom.om.OMNode |
getOMElementFromURL(java.lang.String urlStr,
java.lang.String synapseHome)
Return an OMElement from a URL source
|
static int |
getReadTimeout() |
static javax.xml.transform.stream.StreamSource |
getStreamSource(java.lang.Object o)
Return a StreamSource for the given Object
|
static SynapseConfiguration |
getSynapseConfiguration(java.lang.String tenantDomain) |
static SynapseEnvironment |
getSynapseEnvironment(org.apache.axis2.engine.AxisConfiguration axisCfg) |
static long |
getTimeoutHandlerInterval() |
static java.net.URLConnection |
getURLConnection(java.net.URL url)
Returns a URLCOnnection for given URL.
|
static java.net.URL |
getURLFromPath(java.lang.String path,
java.lang.String synapseHome)
Utility method to resolve url(only If need) path using synapse home system property
|
static XMLToObjectMapper |
getXmlToObjectMapper(java.lang.String contentType)
Return a suitable XMLToObjectMapper for the given content type if one
is available, else return null;
|
static boolean |
isFailSafeEnabled(java.lang.String componentName) |
static SynapseConfiguration |
newConfiguration()
Construct a fresh SynapseConfiguration instance and registers the observers
with it as specified in the synapse.properties file.
|
static org.apache.axiom.om.OMNode |
readNonXML(java.net.URL url)
Helper method to handle non-XMl resources
|
static java.lang.String |
resolveRelativeURI(java.lang.String parentLocation,
java.lang.String relativeLocation) |
static void |
setDefaultFaultSequence(SynapseConfiguration config)
Return the fault sequence if one is not defined.
|
static void |
setDefaultMainSequence(SynapseConfiguration config)
Return the main sequence if one is not defined.
|
static org.apache.axiom.om.OMElement |
stringToOM(java.lang.String xml) |
public static javax.xml.transform.stream.StreamSource getStreamSource(java.lang.Object o)
o
- the objectpublic static java.io.InputStream getInputStream(java.lang.Object o)
public static java.lang.Object getObject(java.net.URL url, java.util.Properties properties)
url
- the URL to the resourceproperties
- bag of properties to pass in any information to the factorypublic static org.apache.axiom.om.OMNode readNonXML(java.net.URL url)
url
- The resource urlpublic static org.apache.axiom.om.OMNode getOMElementFromURL(java.lang.String urlStr, java.lang.String synapseHome) throws java.io.IOException
urlStr
- a URL stringsynapseHome
- synapse home parameter to be usedjava.io.IOException
- for invalid URL's or IO errorspublic static org.xml.sax.InputSource getInputSourceFormURI(java.net.URI uri)
public static java.net.URLConnection getURLConnection(java.net.URL url)
url
- URLpublic static XMLToObjectMapper getXmlToObjectMapper(java.lang.String contentType)
contentType
- the content type for which a mapper is requiredpublic static java.net.URL getURLFromPath(java.lang.String path, java.lang.String synapseHome)
path
- Path to the URLsynapseHome
- synapse home parameter value to be usedpublic static java.lang.String resolveRelativeURI(java.lang.String parentLocation, java.lang.String relativeLocation)
public static int getConnectTimeout()
public static int getReadTimeout()
public static long getTimeoutHandlerInterval()
public static long getGlobalTimeoutInterval()
public static SynapseEnvironment getSynapseEnvironment(org.apache.axis2.engine.AxisConfiguration axisCfg)
public static org.apache.axiom.om.OMElement stringToOM(java.lang.String xml)
public static SynapseConfiguration newConfiguration()
public static void setDefaultMainSequence(SynapseConfiguration config)
config
- the configuration to be updatedpublic static void setDefaultFaultSequence(SynapseConfiguration config)
config
- the configuration to be updatedpublic static boolean isFailSafeEnabled(java.lang.String componentName)
public static SynapseConfiguration getSynapseConfiguration(java.lang.String tenantDomain)
public static void addSynapseConfiguration(java.lang.String tenantDomain, SynapseConfiguration synapseConfiguration)
Copyright © 2005-2021 Apache Software Foundation. All Rights Reserved.