public static class ChirpPublisher.Builder
extends java.lang.Object
ChirpPublisher.| Constructor and Description |
|---|
Builder(java.lang.String serviceName) |
| Modifier and Type | Method and Description |
|---|---|
ChirpPublisher.Builder |
payload(java.util.Map<java.lang.String,java.lang.Object> p)
Sets a payload with arbitrary data to be associated with the service
|
ChirpPublisher |
start(Application app)
Starts the publisher and returns it
|
ChirpPublisher.Builder |
ttl(int ttl)
Sets the TTL of the service.
|
public ChirpPublisher.Builder payload(java.util.Map<java.lang.String,java.lang.Object> p)
p - the payloadBuilder object for method chainingpublic ChirpPublisher.Builder ttl(int ttl)
ttl - the ttl to use for the serviceBuilder object for method chainingpublic ChirpPublisher start(Application app)
app - the Application object is used instead of a Context
to make sure an Activity, which could leak, isn't passed inChirpPublisher