public class SynapseConfigUtils extends Object
Constructor and Description |
---|
SynapseConfigUtils() |
Modifier and Type | Method and Description |
---|---|
static int |
getConnectTimeout() |
static long |
getGlobalTimeoutInterval() |
static InputSource |
getInputSourceFormURI(URI uri) |
static InputStream |
getInputStream(Object o) |
static Object |
getObject(URL url,
Properties properties)
Get an object from a given URL.
|
static org.apache.axiom.om.OMNode |
getOMElementFromURL(String urlStr,
String synapseHome)
Return an OMElement from a URL source
|
static int |
getReadTimeout() |
static StatisticsCollector |
getStatisticsCollector(ServerContextInformation contextInfo)
Get the StatisticsCollector from synapse env.
|
static StreamSource |
getStreamSource(Object o)
Return a StreamSource for the given Object
|
static SynapseEnvironment |
getSynapseEnvironment(org.apache.axis2.engine.AxisConfiguration axisCfg) |
static long |
getTimeoutHandlerInterval() |
static URLConnection |
getURLConnection(URL url)
Returns a URLCOnnection for given URL.
|
static URL |
getURLFromPath(String path,
String synapseHome)
Utility method to resolve url(only If need) path using synapse home system property
|
static XMLToObjectMapper |
getXmlToObjectMapper(String contentType)
Return a suitable XMLToObjectMapper for the given content type if one
is available, else return null;
|
static boolean |
isFailSafeEnabled(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(URL url)
Helper method to handle non-XMl resources
|
static String |
resolveRelativeURI(String parentLocation,
String relativeLocation) |
static URI |
resolveRelativeURI(URI uri,
String basePath)
Resolve a relative URI.
|
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(String xml) |
public static StreamSource getStreamSource(Object o)
o
- the objectpublic static InputStream getInputStream(Object o)
public static Object getObject(URL url, 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(URL url)
url
- The resource urlpublic static org.apache.axiom.om.OMNode getOMElementFromURL(String urlStr, String synapseHome) throws IOException
urlStr
- a URL stringsynapseHome
- synapse home parameter to be usedIOException
- for invalid URL's or IO errorspublic static InputSource getInputSourceFormURI(URI uri)
public static URLConnection getURLConnection(URL url)
url
- URLpublic static XMLToObjectMapper getXmlToObjectMapper(String contentType)
contentType
- the content type for which a mapper is requiredpublic static URL getURLFromPath(String path, String synapseHome)
path
- Path to the URLsynapseHome
- synapse home parameter value to be usedpublic static URI resolveRelativeURI(URI uri, String basePath)
uri
- the URI to resolvebasePath
- the base pathpublic static String resolveRelativeURI(String parentLocation, 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 StatisticsCollector getStatisticsCollector(ServerContextInformation contextInfo)
contextInfo
- server informationpublic static org.apache.axiom.om.OMElement stringToOM(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(String componentName)
Copyright © 2005-2017 Apache Software Foundation. All Rights Reserved.