Class TwitterConfiguration
- java.lang.Object
-
- org.apache.camel.component.twitter.TwitterConfiguration
-
@UriParams public class TwitterConfiguration extends Object
-
-
Constructor Summary
Constructors Constructor Description TwitterConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckComplete()Ensures required fields are available.StringgetAccessToken()The access token.StringgetAccessTokenSecret()The access secret.twitter4j.conf.ConfigurationgetConfiguration()Builds a Twitter4J Configuration using the OAuth params.StringgetConsumerKey()StringgetConsumerSecret()IntegergetCount()StringgetDistanceMetric()StringgetHttpProxyHost()StringgetHttpProxyPassword()IntegergetHttpProxyPort()StringgetHttpProxyUser()StringgetLang()DoublegetLatitude()StringgetLocations()DoublegetLongitude()IntegergetNumberOfPages()DoublegetRadius()longgetSinceId()twitter4j.TwittergetTwitter()EndpointTypegetType()StringgetUserIds()booleanisExtendedMode()booleanisFilterOld()booleanisSortById()voidsetAccessToken(String accessToken)voidsetAccessTokenSecret(String accessTokenSecret)voidsetConsumerKey(String consumerKey)The consumer key.voidsetConsumerSecret(String consumerSecret)The consumer secret.voidsetCount(Integer count)Limiting number of results per page.voidsetDistanceMetric(String distanceMetric)Used by the geography search, to search by radius using the configured metrics.voidsetExtendedMode(Boolean extendedMode)Used for enabling full text from twitter (eg receive tweets that contains more than 140 characters).voidsetFilterOld(boolean filterOld)Filter out old tweets, that has previously been polled.voidsetHttpProxyHost(String httpProxyHost)The http proxy host which can be used for the camel-twitter.voidsetHttpProxyPassword(String httpProxyPassword)The http proxy password which can be used for the camel-twitter.voidsetHttpProxyPort(Integer httpProxyPort)The http proxy port which can be used for the camel-twitter.voidsetHttpProxyUser(String httpProxyUser)The http proxy user which can be used for the camel-twitter.voidsetLang(String lang)The lang string ISO_639-1 which will be used for searchingvoidsetLatitude(Double latitude)Used by the geography search to search by latitude.voidsetLocations(String locations)Bounding boxes, created by pairs of lat/lons.voidsetLongitude(Double longitude)Used by the geography search to search by longitude.voidsetNumberOfPages(Integer numberOfPages)The number of pages result which you want camel-twitter to consume.voidsetRadius(Double radius)Used by the geography search to search by radius.voidsetSinceId(long sinceId)The last tweet id which will be used for pulling the tweets.voidsetSortById(boolean sortById)Sorts by id, so the oldest are first, and newest last.voidsetTwitter(twitter4j.Twitter twitter)voidsetType(EndpointType type)Endpoint type to use.voidsetUserIds(String userIds)To filter by user ids for filter.
-
-
-
Method Detail
-
checkComplete
public void checkComplete()
Ensures required fields are available.
-
getConfiguration
public twitter4j.conf.Configuration getConfiguration()
Builds a Twitter4J Configuration using the OAuth params.- Returns:
- Configuration
-
getTwitter
public twitter4j.Twitter getTwitter()
-
setTwitter
public void setTwitter(twitter4j.Twitter twitter)
-
getConsumerKey
public String getConsumerKey()
-
setConsumerKey
public void setConsumerKey(String consumerKey)
The consumer key. Can also be configured on the TwitterComponent level instead.
-
getConsumerSecret
public String getConsumerSecret()
-
setConsumerSecret
public void setConsumerSecret(String consumerSecret)
The consumer secret. Can also be configured on the TwitterComponent level instead.
-
getAccessToken
public String getAccessToken()
The access token. Can also be configured on the TwitterComponent level instead.
-
setAccessToken
public void setAccessToken(String accessToken)
-
getAccessTokenSecret
public String getAccessTokenSecret()
The access secret. Can also be configured on the TwitterComponent level instead.
-
setAccessTokenSecret
public void setAccessTokenSecret(String accessTokenSecret)
-
getType
public EndpointType getType()
-
setType
public void setType(EndpointType type)
Endpoint type to use.
-
getLocations
public String getLocations()
-
setLocations
public void setLocations(String locations)
Bounding boxes, created by pairs of lat/lons. Can be used for filter. A pair is defined as lat,lon. And multiple pairs can be separated by semicolon.
-
getUserIds
public String getUserIds()
-
setUserIds
public void setUserIds(String userIds)
To filter by user ids for filter. Multiple values can be separated by comma.
-
isFilterOld
public boolean isFilterOld()
-
setFilterOld
public void setFilterOld(boolean filterOld)
Filter out old tweets, that has previously been polled. This state is stored in memory only, and based on last tweet id.
-
getSinceId
public long getSinceId()
-
setSinceId
public void setSinceId(long sinceId)
The last tweet id which will be used for pulling the tweets. It is useful when the camel route is restarted after a long running.
-
getLang
public String getLang()
-
setLang
public void setLang(String lang)
The lang string ISO_639-1 which will be used for searching
-
getCount
public Integer getCount()
-
setCount
public void setCount(Integer count)
Limiting number of results per page.
-
getNumberOfPages
public Integer getNumberOfPages()
-
setNumberOfPages
public void setNumberOfPages(Integer numberOfPages)
The number of pages result which you want camel-twitter to consume.
-
isSortById
public boolean isSortById()
-
setSortById
public void setSortById(boolean sortById)
Sorts by id, so the oldest are first, and newest last.
-
setHttpProxyHost
public void setHttpProxyHost(String httpProxyHost)
The http proxy host which can be used for the camel-twitter. Can also be configured on the TwitterComponent level instead.
-
getHttpProxyHost
public String getHttpProxyHost()
-
setHttpProxyUser
public void setHttpProxyUser(String httpProxyUser)
The http proxy user which can be used for the camel-twitter. Can also be configured on the TwitterComponent level instead.
-
getHttpProxyUser
public String getHttpProxyUser()
-
setHttpProxyPassword
public void setHttpProxyPassword(String httpProxyPassword)
The http proxy password which can be used for the camel-twitter. Can also be configured on the TwitterComponent level instead.
-
getHttpProxyPassword
public String getHttpProxyPassword()
-
setHttpProxyPort
public void setHttpProxyPort(Integer httpProxyPort)
The http proxy port which can be used for the camel-twitter. Can also be configured on the TwitterComponent level instead.
-
getHttpProxyPort
public Integer getHttpProxyPort()
-
getLongitude
public Double getLongitude()
-
setLongitude
public void setLongitude(Double longitude)
Used by the geography search to search by longitude. You need to configure all the following options: longitude, latitude, radius, and distanceMetric.
-
getLatitude
public Double getLatitude()
-
setLatitude
public void setLatitude(Double latitude)
Used by the geography search to search by latitude. You need to configure all the following options: longitude, latitude, radius, and distanceMetric.
-
getRadius
public Double getRadius()
-
setRadius
public void setRadius(Double radius)
Used by the geography search to search by radius. You need to configure all the following options: longitude, latitude, radius, and distanceMetric.
-
getDistanceMetric
public String getDistanceMetric()
-
setDistanceMetric
public void setDistanceMetric(String distanceMetric)
Used by the geography search, to search by radius using the configured metrics. The unit can either be mi for miles, or km for kilometers. You need to configure all the following options: longitude, latitude, radius, and distanceMetric.
-
setExtendedMode
public void setExtendedMode(Boolean extendedMode)
Used for enabling full text from twitter (eg receive tweets that contains more than 140 characters).
-
isExtendedMode
public boolean isExtendedMode()
-
-