Package io.micrometer.core.ipc.http
Class HttpUrlConnectionSender
- java.lang.Object
-
- io.micrometer.core.ipc.http.HttpUrlConnectionSender
-
- All Implemented Interfaces:
HttpSender
public class HttpUrlConnectionSender extends java.lang.Object implements HttpSender
HttpURLConnection
-basedHttpSender
.- Since:
- 1.1.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.micrometer.core.ipc.http.HttpSender
HttpSender.Method, HttpSender.Request, HttpSender.Response
-
-
Constructor Summary
Constructors Constructor Description HttpUrlConnectionSender()
Use the default timeouts and proxy settings for the sender.HttpUrlConnectionSender(java.time.Duration connectTimeout, java.time.Duration readTimeout)
Creates a sender with the specified timeouts but uses the default proxy settings.HttpUrlConnectionSender(java.time.Duration connectTimeout, java.time.Duration readTimeout, java.net.Proxy proxy)
Creates a sender with the specified timeouts and proxy settings.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpSender.Response
send(HttpSender.Request request)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.micrometer.core.ipc.http.HttpSender
delete, get, head, newRequest, options, post, put
-
-
-
-
Constructor Detail
-
HttpUrlConnectionSender
public HttpUrlConnectionSender(java.time.Duration connectTimeout, java.time.Duration readTimeout)
Creates a sender with the specified timeouts but uses the default proxy settings.- Parameters:
connectTimeout
- connect timeout when establishing a connectionreadTimeout
- read timeout when receiving a response
-
HttpUrlConnectionSender
public HttpUrlConnectionSender(java.time.Duration connectTimeout, java.time.Duration readTimeout, java.net.Proxy proxy)
Creates a sender with the specified timeouts and proxy settings.- Parameters:
connectTimeout
- connect timeout when establishing a connectionreadTimeout
- read timeout when receiving a responseproxy
- proxy to use when establishing a connection- Since:
- 1.2.0
-
HttpUrlConnectionSender
public HttpUrlConnectionSender()
Use the default timeouts and proxy settings for the sender.
-
-
Method Detail
-
send
public HttpSender.Response send(HttpSender.Request request) throws java.io.IOException
- Specified by:
send
in interfaceHttpSender
- Throws:
java.io.IOException
-
-