forked from eclipse-vertx/vert.x
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request eclipse-vertx#5070 from eclipse-vertx/http-client-…
…connection-api Implementation of an HTTP client connection API.
- Loading branch information
Showing
55 changed files
with
1,318 additions
and
773 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 79 additions & 0 deletions
79
src/main/generated/io/vertx/core/http/HttpConnectOptionsConverter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
package io.vertx.core.http; | ||
|
||
import io.vertx.core.json.JsonObject; | ||
import io.vertx.core.json.JsonArray; | ||
import io.vertx.core.json.impl.JsonUtil; | ||
import java.time.Instant; | ||
import java.time.format.DateTimeFormatter; | ||
import java.util.Base64; | ||
|
||
/** | ||
* Converter and mapper for {@link io.vertx.core.http.HttpConnectOptions}. | ||
* NOTE: This class has been automatically generated from the {@link io.vertx.core.http.HttpConnectOptions} original class using Vert.x codegen. | ||
*/ | ||
public class HttpConnectOptionsConverter { | ||
|
||
|
||
private static final Base64.Decoder BASE64_DECODER = JsonUtil.BASE64_DECODER; | ||
private static final Base64.Encoder BASE64_ENCODER = JsonUtil.BASE64_ENCODER; | ||
|
||
static void fromJson(Iterable<java.util.Map.Entry<String, Object>> json, HttpConnectOptions obj) { | ||
for (java.util.Map.Entry<String, Object> member : json) { | ||
switch (member.getKey()) { | ||
case "proxyOptions": | ||
if (member.getValue() instanceof JsonObject) { | ||
obj.setProxyOptions(new io.vertx.core.net.ProxyOptions((io.vertx.core.json.JsonObject)member.getValue())); | ||
} | ||
break; | ||
case "host": | ||
if (member.getValue() instanceof String) { | ||
obj.setHost((String)member.getValue()); | ||
} | ||
break; | ||
case "port": | ||
if (member.getValue() instanceof Number) { | ||
obj.setPort(((Number)member.getValue()).intValue()); | ||
} | ||
break; | ||
case "ssl": | ||
if (member.getValue() instanceof Boolean) { | ||
obj.setSsl((Boolean)member.getValue()); | ||
} | ||
break; | ||
case "sslOptions": | ||
if (member.getValue() instanceof JsonObject) { | ||
obj.setSslOptions(new io.vertx.core.net.ClientSSLOptions((io.vertx.core.json.JsonObject)member.getValue())); | ||
} | ||
break; | ||
case "connectTimeout": | ||
if (member.getValue() instanceof Number) { | ||
obj.setConnectTimeout(((Number)member.getValue()).longValue()); | ||
} | ||
break; | ||
} | ||
} | ||
} | ||
|
||
static void toJson(HttpConnectOptions obj, JsonObject json) { | ||
toJson(obj, json.getMap()); | ||
} | ||
|
||
static void toJson(HttpConnectOptions obj, java.util.Map<String, Object> json) { | ||
if (obj.getProxyOptions() != null) { | ||
json.put("proxyOptions", obj.getProxyOptions().toJson()); | ||
} | ||
if (obj.getHost() != null) { | ||
json.put("host", obj.getHost()); | ||
} | ||
if (obj.getPort() != null) { | ||
json.put("port", obj.getPort()); | ||
} | ||
if (obj.isSsl() != null) { | ||
json.put("ssl", obj.isSsl()); | ||
} | ||
if (obj.getSslOptions() != null) { | ||
json.put("sslOptions", obj.getSslOptions().toJson()); | ||
} | ||
json.put("connectTimeout", obj.getConnectTimeout()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.