VcnCellUnderlyingNetworkTemplate.Builder

public static final class VcnCellUnderlyingNetworkTemplate.Builder
extends Object

java.lang.Object
   ↳ android.net.vcn.VcnCellUnderlyingNetworkTemplate.Builder


This class is used to incrementally build VcnCellUnderlyingNetworkTemplate objects.

Summary

Public constructors

Builder()

Construct a Builder object.

Public methods

VcnCellUnderlyingNetworkTemplate build()

Build the VcnCellUnderlyingNetworkTemplate.

VcnCellUnderlyingNetworkTemplate.Builder setCbs(int matchCriteria)

Sets the matching criteria for CBS networks.

VcnCellUnderlyingNetworkTemplate.Builder setDun(int matchCriteria)

Sets the matching criteria for DUN networks.

VcnCellUnderlyingNetworkTemplate.Builder setIms(int matchCriteria)

Sets the matching criteria for IMS networks.

VcnCellUnderlyingNetworkTemplate.Builder setInternet(int matchCriteria)

Sets the matching criteria for INTERNET networks.

VcnCellUnderlyingNetworkTemplate.Builder setMetered(int matchCriteria)

Set the matching criteria for metered networks.

VcnCellUnderlyingNetworkTemplate.Builder setMinDownstreamBandwidthKbps(int minEntryDownstreamBandwidthKbps, int minExitDownstreamBandwidthKbps)

Set the minimum upstream bandwidths that this template will match.

VcnCellUnderlyingNetworkTemplate.Builder setMinUpstreamBandwidthKbps(int minEntryUpstreamBandwidthKbps, int minExitUpstreamBandwidthKbps)

Set the minimum upstream bandwidths that this template will match.

VcnCellUnderlyingNetworkTemplate.Builder setMms(int matchCriteria)

Sets the matching criteria for MMS networks.

VcnCellUnderlyingNetworkTemplate.Builder setOperatorPlmnIds(Set<String> operatorPlmnIds)

Set operator PLMN IDs with which a network can match this template.

VcnCellUnderlyingNetworkTemplate.Builder setOpportunistic(int matchCriteria)

Set the matching criteria for opportunistic cellular subscriptions.

VcnCellUnderlyingNetworkTemplate.Builder setRcs(int matchCriteria)

Sets the matching criteria for RCS networks.

VcnCellUnderlyingNetworkTemplate.Builder setRoaming(int matchCriteria)

Set the matching criteria for roaming networks.

VcnCellUnderlyingNetworkTemplate.Builder setSimSpecificCarrierIds(Set<Integer> simSpecificCarrierIds)

Set sim specific carrier IDs with which a network can match this template.

Inherited methods

Public constructors

Builder

Added in API level 33
public Builder ()

Construct a Builder object.

Public methods

build

Added in API level 33
public VcnCellUnderlyingNetworkTemplate build ()

Build the VcnCellUnderlyingNetworkTemplate.

Returns
VcnCellUnderlyingNetworkTemplate This value cannot be null.

setCbs

Added in API level 34
public VcnCellUnderlyingNetworkTemplate.Builder setCbs (int matchCriteria)

Sets the matching criteria for CBS networks.

A template where setCbs(MATCH_REQUIRED) is called will only match CBS networks (ones with NET_CAPABILITY_CBS). A template where setCbs(MATCH_FORBIDDEN) is called will only match networks that do not support CBS (ones without NET_CAPABILITY_CBS).

Parameters
matchCriteria int: the matching criteria for CBS networks. Defaults to VcnUnderlyingNetworkTemplate.MATCH_ANY. Value is VcnUnderlyingNetworkTemplate.MATCH_ANY, VcnUnderlyingNetworkTemplate.MATCH_REQUIRED, or VcnUnderlyingNetworkTemplate.MATCH_FORBIDDEN

Returns
VcnCellUnderlyingNetworkTemplate.Builder This value cannot be null.

setDun

Added in API level 34
public VcnCellUnderlyingNetworkTemplate.Builder setDun (int matchCriteria)

Sets the matching criteria for DUN networks.

A template where setDun(MATCH_REQUIRED) is called will only match DUN networks (ones with NET_CAPABILITY_DUN). A template where setDun(MATCH_FORBIDDEN) is called will only match networks that do not support DUN (ones without NET_CAPABILITY_DUN).

Parameters
matchCriteria int: the matching criteria for DUN networks. Defaults to VcnUnderlyingNetworkTemplate.MATCH_ANY. Value is VcnUnderlyingNetworkTemplate.MATCH_ANY, VcnUnderlyingNetworkTemplate.MATCH_REQUIRED, or VcnUnderlyingNetworkTemplate.MATCH_FORBIDDEN

Returns
VcnCellUnderlyingNetworkTemplate.Builder This value cannot be null.

setIms

Added in API level 34
public VcnCellUnderlyingNetworkTemplate.Builder setIms (int matchCriteria)

Sets the matching criteria for IMS networks.

A template where setIms(MATCH_REQUIRED) is called will only match IMS networks (ones with NET_CAPABILITY_IMS). A template where setIms(MATCH_FORBIDDEN) is called will only match networks that do not support IMS (ones without NET_CAPABILITY_IMS).

Parameters
matchCriteria int: the matching criteria for IMS networks. Defaults to VcnUnderlyingNetworkTemplate.MATCH_ANY. Value is VcnUnderlyingNetworkTemplate.MATCH_ANY, VcnUnderlyingNetworkTemplate.MATCH_REQUIRED, or VcnUnderlyingNetworkTemplate.MATCH_FORBIDDEN

Returns
VcnCellUnderlyingNetworkTemplate.Builder This value cannot be null.

setInternet

Added in API level 34
public VcnCellUnderlyingNetworkTemplate.Builder setInternet (int matchCriteria)

Sets the matching criteria for INTERNET networks.

A template where setInternet(MATCH_REQUIRED) is called will only match INTERNET networks (ones with NET_CAPABILITY_INTERNET). A template where setInternet(MATCH_FORBIDDEN) is called will only match networks that do not support INTERNET (ones without NET_CAPABILITY_INTERNET).

Parameters
matchCriteria int: the matching criteria for INTERNET networks. Defaults to VcnUnderlyingNetworkTemplate.MATCH_REQUIRED. Value is VcnUnderlyingNetworkTemplate.MATCH_ANY, VcnUnderlyingNetworkTemplate.MATCH_REQUIRED, or VcnUnderlyingNetworkTemplate.MATCH_FORBIDDEN

Returns
VcnCellUnderlyingNetworkTemplate.Builder This value cannot be null.

setMetered

Added in API level 33
public VcnCellUnderlyingNetworkTemplate.Builder setMetered (int matchCriteria)

Set the matching criteria for metered networks.

A template where setMetered(MATCH_REQUIRED) will only match metered networks (one without NET_CAPABILITY_NOT_METERED). A template where setMetered(MATCH_FORBIDDEN) will only match a network that is not metered (one with NET_CAPABILITY_NOT_METERED).

Parameters
matchCriteria int: the matching criteria for metered networks. Defaults to VcnUnderlyingNetworkTemplate.MATCH_ANY. Value is VcnUnderlyingNetworkTemplate.MATCH_ANY, VcnUnderlyingNetworkTemplate.MATCH_REQUIRED, or VcnUnderlyingNetworkTemplate.MATCH_FORBIDDEN

Returns
VcnCellUnderlyingNetworkTemplate.Builder This value cannot be null.

setMinDownstreamBandwidthKbps

Added in API level 33
public VcnCellUnderlyingNetworkTemplate.Builder setMinDownstreamBandwidthKbps (int minEntryDownstreamBandwidthKbps, 
                int minExitDownstreamBandwidthKbps)

Set the minimum upstream bandwidths that this template will match.

This template will not match a network that does not provide at least the bandwidth passed as the entry bandwidth, except in the case that the network is selected as the VCN Gateway Connection's underlying network, where it will continue to match until the bandwidth drops under the exit bandwidth.

The entry criteria MUST be greater than, or equal to the exit criteria to avoid the invalid case where a network fulfills the entry criteria, but at the same time fails the exit criteria.

Estimated bandwidth of a network is provided by the transport layer, and reported in NetworkCapabilities. The provided estimates will be used without modification.

Parameters
minEntryDownstreamBandwidthKbps int: the minimum accepted downstream bandwidth for networks that ARE NOT the already-selected underlying network, or 0 to disable this requirement. Disabled by default.

minExitDownstreamBandwidthKbps int: the minimum accepted downstream bandwidth for a network that IS the already-selected underlying network, or 0 to disable this requirement. Disabled by default.

Returns
VcnCellUnderlyingNetworkTemplate.Builder this Builder instance, for chaining This value cannot be null.

setMinUpstreamBandwidthKbps

Added in API level 33
public VcnCellUnderlyingNetworkTemplate.Builder setMinUpstreamBandwidthKbps (int minEntryUpstreamBandwidthKbps, 
                int minExitUpstreamBandwidthKbps)

Set the minimum upstream bandwidths that this template will match.

This template will not match a network that does not provide at least the bandwidth passed as the entry bandwidth, except in the case that the network is selected as the VCN Gateway Connection's underlying network, where it will continue to match until the bandwidth drops under the exit bandwidth.

The entry criteria MUST be greater than, or equal to the exit criteria to avoid the invalid case where a network fulfills the entry criteria, but at the same time fails the exit criteria.

Estimated bandwidth of a network is provided by the transport layer, and reported in NetworkCapabilities. The provided estimates will be used without modification.

Parameters
minEntryUpstreamBandwidthKbps int: the minimum accepted upstream bandwidth for networks that ARE NOT the already-selected underlying network, or 0 to disable this requirement. Disabled by default.

minExitUpstreamBandwidthKbps int: the minimum accepted upstream bandwidth for a network that IS the already-selected underlying network, or 0 to disable this requirement. Disabled by default.

Returns
VcnCellUnderlyingNetworkTemplate.Builder this Builder instance, for chaining This value cannot be null.

setMms

Added in API level 34
public VcnCellUnderlyingNetworkTemplate.Builder setMms (int matchCriteria)

Sets the matching criteria for MMS networks.

A template where setMms(MATCH_REQUIRED) is called will only match MMS networks (ones with NET_CAPABILITY_MMS). A template where setMms(MATCH_FORBIDDEN) is called will only match networks that do not support MMS (ones without NET_CAPABILITY_MMS).

Parameters
matchCriteria int: the matching criteria for MMS networks. Defaults to VcnUnderlyingNetworkTemplate.MATCH_ANY. Value is VcnUnderlyingNetworkTemplate.MATCH_ANY, VcnUnderlyingNetworkTemplate.MATCH_REQUIRED, or VcnUnderlyingNetworkTemplate.MATCH_FORBIDDEN

Returns
VcnCellUnderlyingNetworkTemplate.Builder This value cannot be null.

setOperatorPlmnIds

Added in API level 33
public VcnCellUnderlyingNetworkTemplate.Builder setOperatorPlmnIds (Set<String> operatorPlmnIds)

Set operator PLMN IDs with which a network can match this template.

This is used to distinguish cases where roaming agreements may dictate a different priority from a partner's networks.

Parameters
operatorPlmnIds Set: the matching operator PLMN IDs in String. Network with one of the matching PLMN IDs can match this template. If the set is empty, any PLMN ID will match. The default is an empty set. A valid PLMN is a concatenation of MNC and MCC, and thus consists of 5 or 6 decimal digits. This value cannot be null.

Returns
VcnCellUnderlyingNetworkTemplate.Builder This value cannot be null.

setOpportunistic

Added in API level 33
public VcnCellUnderlyingNetworkTemplate.Builder setOpportunistic (int matchCriteria)

Set the matching criteria for opportunistic cellular subscriptions.

Parameters
matchCriteria int: the matching criteria for opportunistic cellular subscriptions. Defaults to VcnUnderlyingNetworkTemplate.MATCH_ANY. Value is VcnUnderlyingNetworkTemplate.MATCH_ANY, VcnUnderlyingNetworkTemplate.MATCH_REQUIRED, or VcnUnderlyingNetworkTemplate.MATCH_FORBIDDEN

Returns
VcnCellUnderlyingNetworkTemplate.Builder This value cannot be null.

setRcs

Added in API level 34
public VcnCellUnderlyingNetworkTemplate.Builder setRcs (int matchCriteria)

Sets the matching criteria for RCS networks.

A template where setRcs(MATCH_REQUIRED) is called will only match RCS networks (ones with NET_CAPABILITY_RCS). A template where setRcs(MATCH_FORBIDDEN) is called will only match networks that do not support RCS (ones without NET_CAPABILITY_RCS).

Parameters
matchCriteria int: the matching criteria for RCS networks. Defaults to VcnUnderlyingNetworkTemplate.MATCH_ANY. Value is VcnUnderlyingNetworkTemplate.MATCH_ANY, VcnUnderlyingNetworkTemplate.MATCH_REQUIRED, or VcnUnderlyingNetworkTemplate.MATCH_FORBIDDEN

Returns
VcnCellUnderlyingNetworkTemplate.Builder This value cannot be null.

setRoaming

Added in API level 33
public VcnCellUnderlyingNetworkTemplate.Builder setRoaming (int matchCriteria)

Set the matching criteria for roaming networks.

A template where setRoaming(MATCH_REQUIRED) will only match roaming networks (one without NET_CAPABILITY_NOT_ROAMING). A template where setRoaming(MATCH_FORBIDDEN) will only match a network that is not roaming (one with NET_CAPABILITY_NOT_ROAMING).

Parameters
matchCriteria int: the matching criteria for roaming networks. Defaults to VcnUnderlyingNetworkTemplate.MATCH_ANY. Value is VcnUnderlyingNetworkTemplate.MATCH_ANY, VcnUnderlyingNetworkTemplate.MATCH_REQUIRED, or VcnUnderlyingNetworkTemplate.MATCH_FORBIDDEN

Returns
VcnCellUnderlyingNetworkTemplate.Builder This value cannot be null.

setSimSpecificCarrierIds

Added in API level 33
public VcnCellUnderlyingNetworkTemplate.Builder setSimSpecificCarrierIds (Set<Integer> simSpecificCarrierIds)

Set sim specific carrier IDs with which a network can match this template.

Parameters
simSpecificCarrierIds Set: the matching sim specific carrier IDs. Network with one of the sim specific carrier IDs can match this template. If the set is empty, any carrier ID will match. The default is an empty set. This value cannot be null.

Returns
VcnCellUnderlyingNetworkTemplate.Builder This value cannot be null.