# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Ctors | Methods | Inherited Methods

# VcnGatewayConnectionConfig.Builder

`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.

## Summary

### 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
From class `java.lang.Object`
`Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
`int` | `hashCode()` Returns a hash code value for the object.
`final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
`final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
`String` | `toString()` Returns a string representation of the object.
`final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.

## Public constructors

### Builder

    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

See also:

- `IkeTunnelConnectionParams`
- `VcnManager.VcnStatusCallback.onGatewayConnectionError(String, int, Throwable)`

## Public methods

### addExposedCapability

    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`.

See also:

- `for a list of capabilities may be exposed by a Gateway Connection`

### build

    public VcnGatewayConnectionConfig build ()

Builds and validates the VcnGatewayConnectionConfig.

Returns
`VcnGatewayConnectionConfig` | an immutable VcnGatewayConnectionConfig instance This value cannot be `null`.

### removeExposedCapability

    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`.

See also:

- `for a list of capabilities may be exposed by a Gateway Connection`

### setMaxMtu

    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`.

### setRetryIntervalsMillis

    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`.

See also:

- `for additional discussion on fail-safe mode`

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*