ProxyConfiguration Class
- java.
lang. Object - com.
microsoft. azure. eventhubs. ProxyConfiguration
- com.
Implements
public class ProxyConfiguration
implements AutoCloseable
Field Summary
Modifier and Type | Field and Description |
---|---|
static final
Proxy |
SYSTEM_DEFAULTS
Gets the system defaults for proxy configuration and authentication. |
Constructor Summary
Constructor | Description |
---|---|
ProxyConfiguration(ProxyConfiguration.ProxyAuthenticationType authentication, Proxy proxyAddress, String username, String password) |
Creates a proxy configuration that uses the |
Method Summary
Modifier and Type | Method and Description |
---|---|
Proxy |
authentication()
Gets the proxy authentication type to use. |
void | close() |
Password |
credentials()
Gets credentials to authenticate against proxy with. |
boolean |
hasUserDefinedCredentials()
Gets whether the user has defined credentials. |
boolean |
isProxyAddressConfigured()
Gets whether the proxy address has been configured. |
Proxy |
proxyAddress()
Gets the proxy address. |
Methods inherited from java.lang.Object
Field Details
SYSTEM_DEFAULTS
public static final ProxyConfiguration SYSTEM_DEFAULTS
Gets the system defaults for proxy configuration and authentication.
Constructor Details
ProxyConfiguration
public ProxyConfiguration(ProxyConfiguration.ProxyAuthenticationType authentication, Proxy proxyAddress, String username, String password)
Creates a proxy configuration that uses the proxyAddress
and authenticates with provided username
, password
and authentication
.
Parameters:
Method Details
authentication
public ProxyConfiguration.ProxyAuthenticationType authentication()
Gets the proxy authentication type to use.
Returns:
null
if no authentication type was set. This occurs
when user uses SYSTEM_DEFAULTS.close
public void close()
credentials
public PasswordAuthentication credentials()
Gets credentials to authenticate against proxy with.
Returns:
null
if no credentials were set. This
occurs when user uses SYSTEM_DEFAULTS.hasUserDefinedCredentials
public boolean hasUserDefinedCredentials()
Gets whether the user has defined credentials.
Returns:
isProxyAddressConfigured
public boolean isProxyAddressConfigured()
Gets whether the proxy address has been configured. Used to determine whether to use system-defined or user-defined proxy.
Returns:
proxyAddress
public Proxy proxyAddress()
Gets the proxy address.
Returns:
null
if user creates proxy credentials with
SYSTEM_DEFAULTS.Applies to
Azure SDK for Java
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기