Package io.microsphere.spring.net
Class SpringEnvironmentURLConnectionFactory
- java.lang.Object
-
- io.microsphere.spring.net.SpringSubProtocolURLConnectionFactory
-
- io.microsphere.spring.net.SpringEnvironmentURLConnectionFactory
-
- All Implemented Interfaces:
io.microsphere.net.SubProtocolURLConnectionFactory
public class SpringEnvironmentURLConnectionFactory extends SpringSubProtocolURLConnectionFactory
SpringEnvironment
SubProtocolURLConnectionFactory
The URL pattern : "spring:env:{type}://...",
- {type} : the source type(optional),
"property-sources"
(as default when type is absent) or"profiles"
- Since:
- 1.0.0
- Author:
- Mercy
- See Also:
Environment
,SubProtocolURLConnectionFactory
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PROFILES_TYPE
static java.lang.String
PROPERTY_SOURCES_TYPE
-
Constructor Summary
Constructors Constructor Description SpringEnvironmentURLConnectionFactory(org.springframework.core.env.ConfigurableEnvironment environment, org.springframework.core.convert.support.ConfigurableConversionService conversionService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.net.URLConnection
create(java.net.URL url, java.util.List<java.lang.String> subProtocols, java.net.Proxy proxy)
protected java.lang.String
getSubProtocol()
Get the sub-protocol-
Methods inherited from class io.microsphere.spring.net.SpringSubProtocolURLConnectionFactory
supports
-
-
-
-
Field Detail
-
PROPERTY_SOURCES_TYPE
public static final java.lang.String PROPERTY_SOURCES_TYPE
- See Also:
- Constant Field Values
-
PROFILES_TYPE
public static final java.lang.String PROFILES_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getSubProtocol
protected java.lang.String getSubProtocol()
Description copied from class:SpringSubProtocolURLConnectionFactory
Get the sub-protocol- Specified by:
getSubProtocol
in classSpringSubProtocolURLConnectionFactory
- Returns:
- non-null;
-
create
public java.net.URLConnection create(java.net.URL url, java.util.List<java.lang.String> subProtocols, java.net.Proxy proxy) throws java.io.IOException
- Throws:
java.io.IOException
-
-