Skip to content

Commit bd185d8

Browse files
committed
feat(client-configuration): add proxy configuration in client configuration interface
1 parent 5ed7b39 commit bd185d8

2 files changed

Lines changed: 41 additions & 0 deletions

File tree

src/main/java/io/apimatic/coreinterfaces/http/ClientConfiguration.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package io.apimatic.coreinterfaces.http;
22

3+
import io.apimatic.coreinterfaces.http.proxy.ProxyConfiguration;
34
import java.util.Set;
45

56
/**
@@ -73,4 +74,12 @@ public interface ClientConfiguration {
7374
* @return a copy of skipSslCertVerification
7475
*/
7576
boolean skipSslCertVerification();
77+
78+
/**
79+
* Retrieves the proxy configuration containing the address, port, and optional credentials
80+
* used to connect through a proxy server.
81+
*
82+
* @return the {@link ProxyConfiguration} instance if no proxy is configured
83+
*/
84+
ProxyConfiguration getProxyConfiguration();
7685
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
package io.apimatic.coreinterfaces.http.proxy;
2+
3+
public interface ProxyConfiguration {
4+
5+
/**
6+
* Returns the address (hostname or IP) of the proxy server.
7+
*
8+
* @return the proxy server address as a {@link String}
9+
*/
10+
String getAddress();
11+
12+
/**
13+
* Returns the port number on which the proxy server is listening.
14+
*
15+
* @return the proxy server port
16+
*/
17+
int getPort();
18+
19+
/**
20+
* Returns the username used for proxy authentication.
21+
*
22+
* @return the proxy authentication username as a {@link String}
23+
*/
24+
String getUsername();
25+
26+
/**
27+
* Returns the password associated with the proxy authentication username.
28+
*
29+
* @return the proxy authentication password as a {@link String}
30+
*/
31+
String getPassword();
32+
}

0 commit comments

Comments
 (0)