public static final class PublishSettings.Builder extends Object
PublishSettings
objects.Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
PublishSettings |
build()
Build
PublishSettings given the current requests made on the
builder. |
PublishSettings.Builder |
setPublishCount(int publishCount)
Sets the number of times a solicited (
setPublishType(int) ) publish session
will transmit a packet. |
PublishSettings.Builder |
setPublishType(int publishType)
Sets the type of the publish session: solicited (aka active - publish
packets are transmitted over-the-air), or unsolicited (aka passive -
no publish packets are transmitted, a match is made against an active
subscribe session whose packets are transmitted over-the-air).
|
PublishSettings.Builder |
setTtlSec(int ttlSec)
Sets the time interval (in seconds) a solicited (
setPublishCount(int) ) publish session
will be alive - i.e. transmitting a packet. |
public PublishSettings.Builder setPublishType(int publishType)
publishType
- Publish session type: solicited (
PublishSettings.PUBLISH_TYPE_SOLICITED
) or
unsolicited (
PublishSettings.PUBLISH_TYPE_UNSOLICITED
).builder.setXXX(..).setXXX(..)
.public PublishSettings.Builder setPublishCount(int publishCount)
setPublishType(int)
) publish session
will transmit a packet. When the count is reached an event will be
generated for WifiNanSessionListener.onPublishTerminated(int)
with reason=WifiNanSessionListener.TERMINATE_REASON_DONE
.publishCount
- Number of publish packets to transmit.builder.setXXX(..).setXXX(..)
.public PublishSettings.Builder setTtlSec(int ttlSec)
setPublishCount(int)
) publish session
will be alive - i.e. transmitting a packet. When the TTL is reached
an event will be generated for
WifiNanSessionListener.onPublishTerminated(int)
with reason=
WifiNanSessionListener.TERMINATE_REASON_DONE
.ttlSec
- Lifetime of a publish session in seconds.builder.setXXX(..).setXXX(..)
.public PublishSettings build()
PublishSettings
given the current requests made on the
builder.