-
- All Implemented Interfaces:
-
com.polygamma.ogm.util.ProtobufMessage
public final class NetworkDescriptor implements ProtobufMessage
Device network descriptor.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classNetworkDescriptor.BuilderDevice network descriptor builder.
-
Field Summary
Fields Modifier and Type Field Description public final static intCAPABILITY_VALIDATEDpublic final static intCAPABILITY_INTERNETpublic final static intCAPABILITY_MMSpublic final static intCAPABILITY_NOT_ROAMINGpublic final static intCAPABILITY_UNMETERED
-
Method Summary
Modifier and Type Method Description static NetworkDescriptor.BuilderofBuilder()Construct new empty builder. NetworkDescriptormergeFrom(ProtobufReader reader)Read and merge from Protobuf wire-codec reader. voidwriteTo(ProtobufWriter writer)Write {@code this}to a Protobuf wire-codec writer.NetworkDescriptor.BuildertoBuilder()Construct new builder initialized with {@code this}.SparseBooleanArrayconnectionTypes()Connection types supported by network. booleanhasConnectionType(int type)Test whether a connection type is supported. bytecapabilities()Network capabilities mask. booleanhasCapability(int cap)Test whether a capability is present. intdownstreamKbps()Downstream bandwidth, in Kbps. intupstreamKbps()Upstream bandwidth, in Kbps. List<InetAddress>linkNames()Names identifying network link. StringhttpProxyHost()Host and port of proxy through which HTTP requests should be proxied. Stringbssid()Basic service set identifier (BSSID) of current WiFi access point. inthashCode()booleanequals(@Nullable() Object other)StringtoString()-
-
Method Detail
-
ofBuilder
static NetworkDescriptor.Builder ofBuilder()
Construct new empty builder.
-
mergeFrom
NetworkDescriptor mergeFrom(ProtobufReader reader)
Read and merge from Protobuf wire-codec reader.
- Parameters:
reader- reader to merge from
-
writeTo
void writeTo(ProtobufWriter writer)
Write
{@code this}to a Protobuf wire-codec writer.- Parameters:
writer- writer to write to
-
toBuilder
NetworkDescriptor.Builder toBuilder()
Construct new builder initialized with
{@code this}.
-
connectionTypes
SparseBooleanArray connectionTypes()
Connection types supported by network.
-
hasConnectionType
boolean hasConnectionType(int type)
Test whether a connection type is supported.
- Parameters:
type- connection type to test
-
capabilities
byte capabilities()
Network capabilities mask.
-
hasCapability
boolean hasCapability(int cap)
Test whether a capability is present.
- Parameters:
cap- capability to test
-
downstreamKbps
int downstreamKbps()
Downstream bandwidth, in Kbps.
-
upstreamKbps
int upstreamKbps()
Upstream bandwidth, in Kbps.
-
linkNames
List<InetAddress> linkNames()
Names identifying network link.
-
httpProxyHost
String httpProxyHost()
Host and port of proxy through which HTTP requests should be proxied.
-
bssid
String bssid()
Basic service set identifier (BSSID) of current WiFi access point.
This may be set if, and only if, the WiFi connection type is supported.
-
hashCode
int hashCode()
-
-
-
-