client_java
client_java copied to clipboard
Deprecate public HTTPServer constructors/Recommend using HTTPServer.Builder
Description
Deprecate public HTTPServer
constructors and recommend using HTTPServer.Builder
Background
As part of recent work, an HTTPServer.Builder
class was added to build HTTPServer
instances. HTTPServer
has multiple constructors which can cause confusion.
Use of the HTTPServer.Builder
is cleaner than the multiple/various multiple arguments constructors.
Proposal
Mark all public HTTPServer
constructors as deprecated.
Impact
Use of existing constructors will generate deprecation warnings, but will not cause code to be refactored.
Long Term
Remove public HTTPServer
constructors and force code to be refactored to use the HTTPServer.Builder
.
Related PR https://github.com/prometheus/client_java/pull/747