# Print output for @column tags ?>
public
static
final
class
VcnGatewayConnectionConfig.Builder
extends Object
java.lang.Object | |
↳ | android.net.vcn.VcnGatewayConnectionConfig.Builder |
This class is used to incrementally build VcnGatewayConnectionConfig
objects.
Public constructors | |
---|---|
Builder(String gatewayConnectionName, IkeTunnelConnectionParams tunnelConnectionParams)
Construct a Builder object. |
Public methods | |
---|---|
VcnGatewayConnectionConfig.Builder
|
addExposedCapability(int exposedCapability)
Add a capability that this VCN Gateway Connection will support. |
VcnGatewayConnectionConfig
|
build()
Builds and validates the VcnGatewayConnectionConfig. |
VcnGatewayConnectionConfig.Builder
|
removeExposedCapability(int exposedCapability)
Remove a capability that this VCN Gateway Connection will support. |
VcnGatewayConnectionConfig.Builder
|
setMaxMtu(int maxMtu)
Sets the maximum MTU allowed for this VCN Gateway Connection. |
VcnGatewayConnectionConfig.Builder
|
setRetryIntervalsMillis(long[] retryIntervalsMs)
Set the retry interval between VCN establishment attempts upon successive failures. |
Inherited methods | |
---|---|
public Builder (String gatewayConnectionName, IkeTunnelConnectionParams tunnelConnectionParams)
Construct a Builder object.
Parameters | |
---|---|
gatewayConnectionName |
String : the String GatewayConnection name for this
VcnGatewayConnectionConfig. Each VcnGatewayConnectionConfig within a VcnConfig must be given a unique name. This name is used by the caller to
distinguish between VcnGatewayConnectionConfigs configured on a single VcnConfig . This will be used as the identifier in VcnStatusCallback invocations.
This value cannot be null . |
tunnelConnectionParams |
IkeTunnelConnectionParams : the IKE tunnel connection configuration
This value cannot be null . |
Throws | |
---|---|
IllegalArgumentException |
if the provided IkeTunnelConnectionParams is not configured to support MOBIKE |
public VcnGatewayConnectionConfig.Builder addExposedCapability (int exposedCapability)
Add a capability that this VCN Gateway Connection will support.
Parameters | |
---|---|
exposedCapability |
int : the app-facing capability to be exposed by this VCN Gateway
Connection (i.e., the capabilities that this VCN Gateway Connection will support).
Value is NetworkCapabilities.NET_CAPABILITY_MMS , NetworkCapabilities.NET_CAPABILITY_SUPL , NetworkCapabilities.NET_CAPABILITY_DUN , NetworkCapabilities.NET_CAPABILITY_FOTA , NetworkCapabilities.NET_CAPABILITY_IMS , NetworkCapabilities.NET_CAPABILITY_CBS , NetworkCapabilities.NET_CAPABILITY_IA , NetworkCapabilities.NET_CAPABILITY_RCS , NetworkCapabilities.NET_CAPABILITY_XCAP , NetworkCapabilities.NET_CAPABILITY_EIMS , NetworkCapabilities.NET_CAPABILITY_INTERNET , or NetworkCapabilities.NET_CAPABILITY_MCX |
Returns | |
---|---|
VcnGatewayConnectionConfig.Builder |
this Builder instance, for chaining
This value cannot be null . |
public VcnGatewayConnectionConfig build ()
Builds and validates the VcnGatewayConnectionConfig.
Returns | |
---|---|
VcnGatewayConnectionConfig |
an immutable VcnGatewayConnectionConfig instance
This value cannot be null . |
public VcnGatewayConnectionConfig.Builder removeExposedCapability (int exposedCapability)
Remove a capability that this VCN Gateway Connection will support.
Parameters | |
---|---|
exposedCapability |
int : the app-facing capability to not be exposed by this VCN Gateway
Connection (i.e., the capabilities that this VCN Gateway Connection will support)
Value is NetworkCapabilities.NET_CAPABILITY_MMS , NetworkCapabilities.NET_CAPABILITY_SUPL , NetworkCapabilities.NET_CAPABILITY_DUN , NetworkCapabilities.NET_CAPABILITY_FOTA , NetworkCapabilities.NET_CAPABILITY_IMS , NetworkCapabilities.NET_CAPABILITY_CBS , NetworkCapabilities.NET_CAPABILITY_IA , NetworkCapabilities.NET_CAPABILITY_RCS , NetworkCapabilities.NET_CAPABILITY_XCAP , NetworkCapabilities.NET_CAPABILITY_EIMS , NetworkCapabilities.NET_CAPABILITY_INTERNET , or NetworkCapabilities.NET_CAPABILITY_MCX |
Returns | |
---|---|
VcnGatewayConnectionConfig.Builder |
this Builder instance, for chaining
This value cannot be null . |
public VcnGatewayConnectionConfig.Builder setMaxMtu (int maxMtu)
Sets the maximum MTU allowed for this VCN Gateway Connection.
This MTU is applied to the VCN Gateway Connection exposed Networks, and represents the MTU of the virtualized network.
The system may reduce the MTU below the maximum specified based on signals such as the MTU of the underlying networks (and adjusted for Gateway Connection overhead).
Parameters | |
---|---|
maxMtu |
int : the maximum MTU allowed for this Gateway Connection. Must be greater than
the IPv6 minimum MTU of 1280. Defaults to 1500.
Value is MIN_MTU_V6 or greater |
Returns | |
---|---|
VcnGatewayConnectionConfig.Builder |
this Builder instance, for chaining
This value cannot be null . |
public VcnGatewayConnectionConfig.Builder setRetryIntervalsMillis (long[] retryIntervalsMs)
Set the retry interval between VCN establishment attempts upon successive failures.
The last retry interval will be repeated until safe mode is entered, or a connection is successfully established, at which point the retry timers will be reset. For power reasons, the last (repeated) retry interval MUST be at least 15 minutes.
Retry intervals MAY be subject to system power saving modes. That is to say that if the system enters a power saving mode, the retry may not occur until the device leaves the specified power saving mode. Intervals are sequential, and intervals will NOT be skipped if system power saving results in delaying retries (even if it exceed multiple retry intervals).
Each Gateway Connection will retry according to the retry intervals configured, but if safe mode is enabled, all Gateway Connection(s) will be disabled.
Parameters | |
---|---|
retryIntervalsMs |
long : an array of between 1 and 10 millisecond intervals after which
the VCN will attempt to retry a session initiation. The last (repeating) retry
interval must be at least 15 minutes. Defaults to: [1s, 2s, 5s, 30s, 1m, 5m,
15m]
This value cannot be null . |
Returns | |
---|---|
VcnGatewayConnectionConfig.Builder |
this Builder instance, for chaining
This value cannot be null . |