Sync Android SDK  0.8.7
com.twilio.sync.Stream Class Reference

Stream is an ordered message delivery queue. More...

Classes

class  Message
 Single message in a Stream. More...
 

Public Member Functions

void setTtl (int ttl, SuccessListener< Void > listener)
 Set time to live for stream object in seconds. More...
 

Public Attributes

final int InfiniteDuration = 0
 Time to live for a stream, specifying no expiry.
 

Detailed Description

Stream is an ordered message delivery queue.

You can publish messages and listen for incoming messages.

To obtain an instance of a Stream use SyncClient#openStream.

Member Function Documentation

void com.twilio.sync.Stream.setTtl ( int  ttl,
SuccessListener< Void >  listener 
)

Set time to live for stream object in seconds.

This TTL specifies the minimum time the Stream will live, sometime soon after this time the object will be deleted.

If time to live is not specified, object lives infinitely long.

TTL could be used in order to auto-recycle old unused objects, but it is not recommended to build some app logic like timers using ttl.

Parameters
ttlTime to live in seconds from now or InfiniteDuration to indicate no expiry.
listenerAsync result listener. See SuccessListener.