Skip to content

Commit 1ecc1eb

Browse files
committed
Add egressSites for SiteConfig
1 parent 41cc1f9 commit 1ecc1eb

File tree

2 files changed

+33
-11
lines changed

2 files changed

+33
-11
lines changed

src/main/java/org/commonjava/util/jhttpc/model/SiteConfig.java

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ public final class SiteConfig
5454

5555
private final String proxyAllowHttpJobTypes;
5656

57+
private final String egressSites;
58+
5759
private final SiteTrustType trustType;
5860

5961
private final String keyCertPem;
@@ -89,12 +91,13 @@ public final class SiteConfig
8991
private final Integer baseSampleRate;
9092

9193
SiteConfig( String id, String uri, String user, String proxyHost, Integer proxyPort, String proxyUser,
92-
String proxyAllowHttpJobTypes, SiteTrustType trustType, String keyCertPem, String serverCertPem,
93-
Integer requestTimeoutSeconds, Integer connectionPoolTimeoutSeconds, Integer maxConnections,
94-
Integer maxPerRoute, final ConnectionConfig connectionConfig, final SocketConfig socketConfig,
95-
final RequestConfig requestConfig, HttpClientContext clientContextPrototype,
96-
boolean ignoreHostnameVerification, Map<String, Object> attributes, Boolean metricEnabled,
97-
String honeycombDataset, String honeycombWriteKey, Integer baseSampleRate )
94+
String proxyAllowHttpJobTypes, String egressSites, SiteTrustType trustType, String keyCertPem,
95+
String serverCertPem, Integer requestTimeoutSeconds, Integer connectionPoolTimeoutSeconds,
96+
Integer maxConnections, Integer maxPerRoute, final ConnectionConfig connectionConfig,
97+
final SocketConfig socketConfig, final RequestConfig requestConfig,
98+
HttpClientContext clientContextPrototype, boolean ignoreHostnameVerification,
99+
Map<String, Object> attributes, Boolean metricEnabled, String honeycombDataset,
100+
String honeycombWriteKey, Integer baseSampleRate )
98101
{
99102
this.id = id;
100103
this.uri = uri;
@@ -103,6 +106,7 @@ public final class SiteConfig
103106
this.proxyPort = proxyPort;
104107
this.proxyUser = proxyUser;
105108
this.proxyAllowHttpJobTypes = proxyAllowHttpJobTypes;
109+
this.egressSites = egressSites;
106110
this.trustType = trustType;
107111
this.keyCertPem = keyCertPem;
108112
this.serverCertPem = serverCertPem;
@@ -177,6 +181,11 @@ public String getProxyAllowHttpJobTypes()
177181
return proxyAllowHttpJobTypes;
178182
}
179183

184+
public String getEgressSites()
185+
{
186+
return egressSites;
187+
}
188+
180189
public String getKeyCertPem()
181190
{
182191
return keyCertPem;

src/main/java/org/commonjava/util/jhttpc/model/SiteConfigBuilder.java

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ public class SiteConfigBuilder
5050

5151
private String proxyAllowHttpJobTypes;
5252

53+
private String egressSites;
54+
5355
private SiteTrustType trustType;
5456

5557
private String keyCertPem;
@@ -101,11 +103,11 @@ public SiteConfigBuilder( String id, String uri )
101103

102104
public SiteConfig build()
103105
{
104-
return new SiteConfig( id, uri, user, proxyHost, proxyPort, proxyUser, proxyAllowHttpJobTypes, trustType,
105-
keyCertPem, serverCertPem, requestTimeoutSeconds, connectionPoolTimeoutSeconds,
106-
maxConnections, maxPerRoute, connectionConfig, socketConfig, requestConfig,
107-
clientContextProtoype, ignoreHostnameVerification, attributes, metricEnabled,
108-
honeycombDataset, honeycombWriteKey, baseSampleRate );
106+
return new SiteConfig( id, uri, user, proxyHost, proxyPort, proxyUser, proxyAllowHttpJobTypes, egressSites,
107+
trustType, keyCertPem, serverCertPem, requestTimeoutSeconds,
108+
connectionPoolTimeoutSeconds, maxConnections, maxPerRoute, connectionConfig,
109+
socketConfig, requestConfig, clientContextProtoype, ignoreHostnameVerification,
110+
attributes, metricEnabled, honeycombDataset, honeycombWriteKey, baseSampleRate );
109111
}
110112

111113
public String getId()
@@ -157,6 +159,11 @@ public String getProxyAllowHttpJobTypes()
157159
return proxyAllowHttpJobTypes;
158160
}
159161

162+
public String getEgressSites()
163+
{
164+
return egressSites;
165+
}
166+
160167
public String getKeyCertPem()
161168
{
162169
return keyCertPem;
@@ -241,6 +248,12 @@ public SiteConfigBuilder withProxyAllowHttpJobTypes( String proxyAllowHttpJobTyp
241248
return this;
242249
}
243250

251+
public SiteConfigBuilder withEgressSites( String egressSites )
252+
{
253+
this.egressSites = egressSites;
254+
return this;
255+
}
256+
244257
public SiteConfigBuilder withTrustType( SiteTrustType trustType )
245258
{
246259
this.trustType = trustType;

0 commit comments

Comments
 (0)