Class AbstractStreamProvider
java.lang.Object
org.apache.catalina.tribes.membership.cloud.AbstractStreamProvider
- All Implemented Interfaces:
StreamProvider
- Direct Known Subclasses:
CertificateStreamProvider
,InsecureStreamProvider
,TokenStreamProvider
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final TrustManager[]
protected static final StringManager
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static TrustManager[]
configureCaCert
(String caCertFile) protected abstract SSLSocketFactory
openConnection
(String url, Map<String, String> headers, int connectTimeout, int readTimeout) Open URL connection to the specified URL.openStream
(String url, Map<String, String> headers, int connectTimeout, int readTimeout) Open stream to the specified URL.
-
Field Details
-
sm
-
INSECURE_TRUST_MANAGERS
-
-
Constructor Details
-
AbstractStreamProvider
public AbstractStreamProvider()
-
-
Method Details
-
getSocketFactory
- Returns:
- the socket factory, or null if not needed
-
openConnection
public URLConnection openConnection(String url, Map<String, String> headers, int connectTimeout, int readTimeout) throws IOExceptionOpen URL connection to the specified URL.- Parameters:
url
- the urlheaders
- the headers mapconnectTimeout
- connection timeout in msreadTimeout
- read timeout in ms- Returns:
- the URL connection
- Throws:
IOException
- when an error occurs
-
openStream
public InputStream openStream(String url, Map<String, String> headers, int connectTimeout, int readTimeout) throws IOExceptionDescription copied from interface:StreamProvider
Open stream to the specified URL.- Specified by:
openStream
in interfaceStreamProvider
- Parameters:
url
- the urlheaders
- the headers mapconnectTimeout
- connection timeout in msreadTimeout
- read timeout in ms- Returns:
- the stream
- Throws:
IOException
- when an error occurs
-
configureCaCert
- Throws:
Exception
-