File tree 1 file changed +11
-1
lines changed
src/main/java/org/kairosdb/client
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -106,13 +106,23 @@ public HttpClient(String url) throws MalformedURLException
106
106
public HttpClient (HttpClientBuilder builder , String url ) throws MalformedURLException
107
107
{
108
108
checkNotNullOrEmpty (url , "url cannot be null" );
109
- checkNotNull (builder , "builder cannot be null" );
109
+ checkNotNull (builder , "builder must not be null" );
110
110
this .url = url ;
111
111
new URL (url ); // validate url
112
112
client = builder .build ();
113
113
typeRegistry = new DataPointTypeRegistry ();
114
114
}
115
115
116
+ public HttpClient (CloseableHttpClient client , String url ) throws MalformedURLException
117
+ {
118
+ checkNotNullOrEmpty (url , "url cannot be null" );
119
+ checkNotNull (client , "client must not be null" );
120
+ this .url = url ;
121
+ new URL (url ); // validate url
122
+ this .client = client ;
123
+ typeRegistry = new DataPointTypeRegistry ();
124
+ }
125
+
116
126
public void registerCustomDataType (String groupType , Class dataPointClass )
117
127
{
118
128
checkNotNullOrEmpty (groupType , "groupType may not be null or empty" );
You can’t perform that action at this time.
0 commit comments