Package com.bandwidth
Class BandwidthClient
java.lang.Object
com.bandwidth.BandwidthClient
- All Implemented Interfaces:
Configuration
public final class BandwidthClient extends java.lang.Object implements Configuration
Gateway class for the library.
This class acts as a factory for Controllers.
It holds the state of the SDK.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BandwidthClient.Builder
Class to build instances ofBandwidthClient
. -
Method Summary
Modifier and Type Method Description java.util.Map<java.lang.String,AuthManager>
getAuthManagers()
The list of auth managers.java.lang.String
getBaseUri()
Get base URI by current environment.java.lang.String
getBaseUri(Server server)
Get base URI by current environment.java.lang.String
getBaseUrl()
baseUrl value.Environment
getEnvironment()
Current API environment.HttpClient
getHttpClient()
The HTTP Client instance to use for making HTTP requests.ReadonlyHttpClientConfiguration
getHttpClientConfig()
Http Client Configuration instance.MessagingBasicAuthCredentials
getMessagingBasicAuthCredentials()
The credentials to use with MessagingBasicAuth.MessagingClient
getMessagingClient()
Provides access to messagingClient Client.long
getTimeout()
The timeout to use for making HTTP requests.TwoFactorAuthBasicAuthCredentials
getTwoFactorAuthBasicAuthCredentials()
The credentials to use with TwoFactorAuthBasicAuth.TwoFactorAuthClient
getTwoFactorAuthClient()
Provides access to twoFactorAuthClient Client.VoiceBasicAuthCredentials
getVoiceBasicAuthCredentials()
The credentials to use with VoiceBasicAuth.VoiceClient
getVoiceClient()
Provides access to voiceClient Client.WebRtcBasicAuthCredentials
getWebRtcBasicAuthCredentials()
The credentials to use with WebRtcBasicAuth.WebRtcClient
getWebRtcClient()
Provides access to webRtcClient Client.BandwidthClient.Builder
newBuilder()
Builds a newBandwidthClient.Builder
object.static void
shutdown()
Shutdown the underlying HttpClient instance.java.lang.String
toString()
Converts this BandwidthClient into string format.
-
Method Details
-
shutdown
public static void shutdown()Shutdown the underlying HttpClient instance. -
getMessagingClient
Provides access to messagingClient Client.- Returns:
- Returns the MessagingClient instance
-
getTwoFactorAuthClient
Provides access to twoFactorAuthClient Client.- Returns:
- Returns the TwoFactorAuthClient instance
-
getVoiceClient
Provides access to voiceClient Client.- Returns:
- Returns the VoiceClient instance
-
getWebRtcClient
Provides access to webRtcClient Client.- Returns:
- Returns the WebRtcClient instance
-
getEnvironment
Current API environment.- Specified by:
getEnvironment
in interfaceConfiguration
- Returns:
- environment
-
getBaseUrl
public java.lang.String getBaseUrl()baseUrl value.- Specified by:
getBaseUrl
in interfaceConfiguration
- Returns:
- baseUrl
-
getHttpClient
The HTTP Client instance to use for making HTTP requests.- Returns:
- httpClient
-
getTimeout
public long getTimeout()The timeout to use for making HTTP requests.- Specified by:
getTimeout
in interfaceConfiguration
- Returns:
- timeout
-
getHttpClientConfig
Http Client Configuration instance.- Specified by:
getHttpClientConfig
in interfaceConfiguration
- Returns:
- httpClientConfig
-
getMessagingBasicAuthCredentials
The credentials to use with MessagingBasicAuth.- Specified by:
getMessagingBasicAuthCredentials
in interfaceConfiguration
- Returns:
- messagingBasicAuthCredentials
-
getTwoFactorAuthBasicAuthCredentials
The credentials to use with TwoFactorAuthBasicAuth.- Specified by:
getTwoFactorAuthBasicAuthCredentials
in interfaceConfiguration
- Returns:
- twoFactorAuthBasicAuthCredentials
-
getVoiceBasicAuthCredentials
The credentials to use with VoiceBasicAuth.- Specified by:
getVoiceBasicAuthCredentials
in interfaceConfiguration
- Returns:
- voiceBasicAuthCredentials
-
getWebRtcBasicAuthCredentials
The credentials to use with WebRtcBasicAuth.- Specified by:
getWebRtcBasicAuthCredentials
in interfaceConfiguration
- Returns:
- webRtcBasicAuthCredentials
-
getAuthManagers
The list of auth managers.- Returns:
- authManagers
-
getBaseUri
Get base URI by current environment.- Specified by:
getBaseUri
in interfaceConfiguration
- Parameters:
server
- Server for which to get the base URI- Returns:
- Processed base URI
-
getBaseUri
public java.lang.String getBaseUri()Get base URI by current environment.- Specified by:
getBaseUri
in interfaceConfiguration
- Returns:
- Processed base URI
-
toString
public java.lang.String toString()Converts this BandwidthClient into string format.- Overrides:
toString
in classjava.lang.Object
- Returns:
- String representation of this class
-
newBuilder
Builds a newBandwidthClient.Builder
object. Creates the instance with the state of the current client.- Returns:
- a new
BandwidthClient.Builder
object
-