Class DefaultUrlConnectionFactory
- java.lang.Object
-
- jetbrains.buildServer.serverSide.db.DefaultUrlConnectionFactory
-
- All Implemented Interfaces:
JdbcDriverDownloader.UrlConnectionFactory
@Immutable public final class DefaultUrlConnectionFactory extends Object implements JdbcDriverDownloader.UrlConnectionFactory
The default
JdbcDriverDownloader.UrlConnectionFactory
, which usesjava.net.*
API.- Since:
- 2018.1
- Author:
- Andrey Shcheglov <mailto:andrey.shcheglov@jetbrains.com>
-
-
Constructor Summary
Constructors Constructor Description DefaultUrlConnectionFactory(String requestMethod, boolean followRedirects)
Creates the defaultJdbcDriverDownloader.UrlConnectionFactory
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JdbcDriverDownloader.UrlConnectionWrapper
openConnection(URL url)
Opens the connection to the given URL and returns the object which wraps the connection opened.String
toString()
-
-
-
Constructor Detail
-
DefaultUrlConnectionFactory
public DefaultUrlConnectionFactory(@NotNull String requestMethod, boolean followRedirects)
Creates the default
JdbcDriverDownloader.UrlConnectionFactory
.- Parameters:
requestMethod
- the method for the HTTP URL request, one of:- GET;
- POST;
- HEAD;
- OPTIONS;
- PUT;
- DELETE;
- TRACE;
followRedirects
- whether HTTP redirects (requests with response code 3xx) should be automatically followed.
-
-
Method Detail
-
openConnection
@NotNull public JdbcDriverDownloader.UrlConnectionWrapper openConnection(@NotNull URL url) throws IOException
Opens the connection to the given URL and returns the object which wraps the connection opened.
- Specified by:
openConnection
in interfaceJdbcDriverDownloader.UrlConnectionFactory
- Parameters:
url
- the URL to open connection to.- Returns:
- the object which wraps the connection opened.
- Throws:
IOException
- if an I/O error occurs.- See Also:
JdbcDriverDownloader.UrlConnectionFactory.openConnection(URL)
-
toString
@NotNull public String toString()
- Overrides:
toString
in classObject
- See Also:
Object.toString()
-
-