-
public abstract class NetworkDescriptor.BuilderDevice network descriptor builder.
-
-
Method Summary
Modifier and Type Method Description NetworkDescriptor.BuilderconnectionType(int type, boolean has)Add or remove supported connection type. NetworkDescriptor.BuilderclearConnectionTypes()Remove all supported connection types. NetworkDescriptor.Buildercapability(int cap, boolean has)Add or remove supported capability. NetworkDescriptor.BuilderclearCapabilities()Remove all supported capabilities. abstract NetworkDescriptor.BuilderdownstreamKbps(int kbps)Set downstream bandwidth, in Kbps. abstract NetworkDescriptor.BuilderupstreamKbps(int kbps)Set upstream bandwidth, in Kbps. abstract NetworkDescriptor.BuilderlinkNames(List<InetAddress> names)Set names identifying network link. abstract NetworkDescriptor.BuilderhttpProxyHost(String host)Set host of proxy through which HTTP requests should be proxied. abstract NetworkDescriptor.Builderbssid(String bssid)Set basic service set identifier (BSSID) of current WiFi access point. abstract NetworkDescriptorbuild()Build resulting descriptor. -
-
Method Detail
-
connectionType
NetworkDescriptor.Builder connectionType(int type, boolean has)
Add or remove supported connection type.
If
{@code has}is{@code true}or{@code false}and{@code type}already exists ordoes not exist, respectively, this simply returns.- Parameters:
type- connection type to add or removehas-{@code true}or{@code false}to add or remove{@code type}, respectively
-
clearConnectionTypes
NetworkDescriptor.Builder clearConnectionTypes()
Remove all supported connection types.
-
capability
NetworkDescriptor.Builder capability(int cap, boolean has)
Add or remove supported capability.
If
{@code has}is{@code true}or{@code false}and{@code cap}already exists ordoes not exist, respectively, this simply returns.- Parameters:
cap- capability to add or removehas-{@code true}or{@code false}to add or remove{@code cap}, respectively
-
clearCapabilities
NetworkDescriptor.Builder clearCapabilities()
Remove all supported capabilities.
-
downstreamKbps
@ReturnThis() abstract NetworkDescriptor.Builder downstreamKbps(int kbps)
Set downstream bandwidth, in Kbps.
- Parameters:
kbps- bandwidth or{@code 0}if unknown
-
upstreamKbps
@ReturnThis() abstract NetworkDescriptor.Builder upstreamKbps(int kbps)
Set upstream bandwidth, in Kbps.
- Parameters:
kbps- bandwidth or{@code 0}if unknown
-
linkNames
@ReturnThis() abstract NetworkDescriptor.Builder linkNames(List<InetAddress> names)
Set names identifying network link.
- Parameters:
names- link names or empty if unavailable
-
httpProxyHost
@ReturnThis() abstract NetworkDescriptor.Builder httpProxyHost(String host)
Set host of proxy through which HTTP requests should be proxied.
- Parameters:
host- proxy host or empty if requests should not beproxied
-
bssid
@ReturnThis() abstract NetworkDescriptor.Builder bssid(String bssid)
Set basic service set identifier (BSSID) of current WiFi access point.
- Parameters:
bssid- access point BSSID or, empty if unknown orunavailable
-
build
abstract NetworkDescriptor build()
Build resulting descriptor.
-
-
-
-