| Constructor |
| public Policy.Builder() Creates an instance of Policy. |
| Return type | Method name |
| Policy | build() Creates an instance of Policy. |
| Policy.Builder | setFindingMode(int findingMode) Sets the scanning mode. |
| Policy.Builder | setDistanceType(int distanceType) For message publishing, the published message will only be delivered to subscribing devices that are at the most specified distance. For message subscription, messages will only be delivered if the publishing device is at the most specified distance. |
| Policy.Builder | setTtlSeconds(int ttlSeconds) Sets the time to live (TTL) of a published or subscribed message. |
| Constructor |
| public Policy.Builder() |
| Creates an instance of Policy. |
| Method |
| public Policy build() |
| Creates an instance of Policy. |
| Method |
| public Policy.Builder setFindingMode(int findingMode) |
| Sets the scanning mode, which determines how devices detect each other. |
Parameters
| Parameter name | Parameter desc |
| findingMode | Mode to detect devices, which is one of Policy.POLICY_FINDING_MODE_*. |
Parameters
| Parameter name | Parameter desc |
| distanceType | Distance type, which is one of Policy.POLICY_DISTANCE_TYPE_*. |
Parameters
| Parameter name | Parameter desc |
| ttlSeconds | TTL. |