Class TwitterConfiguration
java.lang.Object
org.apache.camel.component.twitter.TwitterConfiguration
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected twitter4j.TwitterBuildsTwitterwith the current configuration.voidEnsures required fields are available.The access token.The access secret.getCount()getLang()longtwitter4j.TwittergetType()booleanbooleanbooleanvoidsetAccessToken(String accessToken) voidsetAccessTokenSecret(String accessTokenSecret) voidsetConsumerKey(String consumerKey) The consumer key.voidsetConsumerSecret(String consumerSecret) The consumer secret.voidLimiting 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.voidThe 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.voidUsed 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.
-
Constructor Details
-
TwitterConfiguration
public TwitterConfiguration()
-
-
Method Details
-
checkComplete
public void checkComplete()Ensures required fields are available. -
buildTwitter
protected twitter4j.Twitter buildTwitter()BuildsTwitterwith the current configuration. -
getTwitter
public twitter4j.Twitter getTwitter() -
setTwitter
public void setTwitter(twitter4j.Twitter twitter) -
getConsumerKey
-
setConsumerKey
The consumer key. Can also be configured on the TwitterComponent level instead. -
getConsumerSecret
-
setConsumerSecret
The consumer secret. Can also be configured on the TwitterComponent level instead. -
getAccessToken
The access token. Can also be configured on the TwitterComponent level instead. -
setAccessToken
-
getAccessTokenSecret
The access secret. Can also be configured on the TwitterComponent level instead. -
setAccessTokenSecret
-
getType
-
setType
Endpoint type to use. -
getLocations
-
setLocations
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
-
setUserIds
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
-
setLang
The lang string ISO_639-1 which will be used for searching -
getCount
-
setCount
Limiting number of results per page. -
getNumberOfPages
-
setNumberOfPages
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
The http proxy host which can be used for the camel-twitter. Can also be configured on the TwitterComponent level instead. -
getHttpProxyHost
-
setHttpProxyUser
The http proxy user which can be used for the camel-twitter. Can also be configured on the TwitterComponent level instead. -
getHttpProxyUser
-
setHttpProxyPassword
The http proxy password which can be used for the camel-twitter. Can also be configured on the TwitterComponent level instead. -
getHttpProxyPassword
-
setHttpProxyPort
The http proxy port which can be used for the camel-twitter. Can also be configured on the TwitterComponent level instead. -
getHttpProxyPort
-
getLongitude
-
setLongitude
Used by the geography search to search by longitude. You need to configure all the following options: longitude, latitude, radius, and distanceMetric. -
getLatitude
-
setLatitude
Used by the geography search to search by latitude. You need to configure all the following options: longitude, latitude, radius, and distanceMetric. -
getRadius
-
setRadius
Used by the geography search to search by radius. You need to configure all the following options: longitude, latitude, radius, and distanceMetric. -
getDistanceMetric
-
setDistanceMetric
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
Used for enabling full text from twitter (eg receive tweets that contains more than 140 characters). -
isExtendedMode
public boolean isExtendedMode()
-