org.springframework.social.twitter.api
Class UserStreamParameters

java.lang.Object
  extended by org.springframework.social.twitter.api.UserStreamParameters

public class UserStreamParameters
extends Object

Defines the parameters of a user stream. No parameters are required, indicating that only the messages pertaining to the authenticated user will be delivered.


Nested Class Summary
static class UserStreamParameters.WithOptions
           
 
Field Summary
protected  StringBuffer locations
           
protected  boolean stallWarnings
           
protected  StringBuffer track
           
 
Constructor Summary
UserStreamParameters()
           
 
Method Summary
 org.springframework.social.twitter.api.AbstractStreamParameters addLocation(float west, float south, float east, float north)
          Add a location to the filter Does not replace any existing locations in the filter.
 String getLocationsParameterValue()
           
 String getTrackParameterValue()
           
 UserStreamParameters includeReplies(boolean includeReplies)
          Specify whether or not replies should be included in stream.
 org.springframework.social.twitter.api.AbstractStreamParameters stallWarnings(boolean stallWarnings)
           
 MultiValueMap<String,String> toParameterMap()
           
 org.springframework.social.twitter.api.AbstractStreamParameters track(String track)
          Add tracking keywords to the filter.
 UserStreamParameters with(UserStreamParameters.WithOptions with)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

track

protected StringBuffer track

locations

protected StringBuffer locations

stallWarnings

protected boolean stallWarnings
Constructor Detail

UserStreamParameters

public UserStreamParameters()
Method Detail

with

public UserStreamParameters with(UserStreamParameters.WithOptions with)

includeReplies

public UserStreamParameters includeReplies(boolean includeReplies)
Specify whether or not replies should be included in stream. The default behavior is to only include replies to the authenticated user, but not replies to tweets from those that the user follows. If set to true, then replies to tweets from followed users will be included in the stream.

Parameters:
includeReplies - true to include replies to followed users, false to only include replies to authenticated user.
Returns:
this UserStreamParameters for building up filter parameters.

toParameterMap

public MultiValueMap<String,String> toParameterMap()

track

public org.springframework.social.twitter.api.AbstractStreamParameters track(String track)
Add tracking keywords to the filter. Does not replace any existing tracking keywords in the filter.

Parameters:
track - the keywords to track.
Returns:
this StreamFilter for building up filter parameters.

addLocation

public org.springframework.social.twitter.api.AbstractStreamParameters addLocation(float west,
                                                                                   float south,
                                                                                   float east,
                                                                                   float north)
Add a location to the filter Does not replace any existing locations in the filter.

Parameters:
west - the longitude of the western side of the location's bounding box.
south - the latitude of the southern side of the location's bounding box.
east - the longitude of the eastern side of the location's bounding box.
north - the latitude of the northern side of the location's bounding box.
Returns:
this StreamFilter for building up filter parameters.

stallWarnings

public org.springframework.social.twitter.api.AbstractStreamParameters stallWarnings(boolean stallWarnings)

getTrackParameterValue

public String getTrackParameterValue()
Returns:
the track parameters as they'll be sent in the streaming request.

getLocationsParameterValue

public String getLocationsParameterValue()
Returns:
the locations parameters as they'll be sent in the streaming request.