Package twitter4j
Class Twitter.TwitterBuilder
java.lang.Object
twitter4j.Twitter.TwitterBuilder
- Enclosing interface:
builder for Twitter
-
Method Summary
Modifier and TypeMethodDescriptionapplicationOnlyAuthEnabled
(boolean applicationOnlyAuthEnabled) build()
connectionLifeCycleListener
(@NotNull ConnectionLifeCycleListener listener) contributingTo
(long contributingTo) boolean
gzipEnabled
(boolean gzipEnabled) int
hashCode()
httpConnectionTimeout
(int httpConnectionTimeout) httpProxyHost
(String httpProxyHost) httpProxyPassword
(String httpProxyPassword) httpProxyPort
(int httpProxyPort) httpProxySocks
(boolean httpProxySocks) httpProxyUser
(String httpProxyUser) httpReadTimeout
(int httpReadTimeout) httpRetryCount
(int httpRetryCount) httpRetryIntervalSeconds
(int httpRetryIntervalSeconds) httpStreamingReadTimeout
(int httpStreamingReadTimeout) includeEntitiesEnabled
(boolean enabled) includeExtAltTextEnabled
(boolean enabled) jsonStoreEnabled
(boolean enabled) listener
(@NotNull RawStreamListener rawStreamListener) listener
(@NotNull StreamListener streamListener) load
(Properties props) mBeanEnabled
(boolean enabled) oAuth2Scope
(String oAuth2Scope) oAuth2Token
(String oAuth2TokenType, String oAuth2AccessToken) oAuth2Token
(OAuth2Token oAuth2Token) oAuthAccessToken
(String oAuthAccessToken, String oAuthAccessTokenSecret) oAuthAccessToken
(AccessToken accessToken) oAuthConsumer
(String oAuthConsumerKey, String oAuthConsumerSecret) onException
(Consumer<Exception> onException) Registers a RateLimitStatusListener for account associated rate limitsRegisters a lambda action for account associated rate limitsprettyDebugEnabled
(boolean prettyDebugEnabled) toString()
trimUserEnabled
(boolean enabled) tweetModeExtended
(boolean enabled)
-
Method Details
-
build
- Returns:
- constructs Twitter instance
-
connectionLifeCycleListener
public Twitter.TwitterBuilder connectionLifeCycleListener(@NotNull @NotNull ConnectionLifeCycleListener listener) - Parameters:
listener
- listener- Returns:
- this instance
-
listener
- Parameters:
streamListener
- adds listener- Returns:
- this instance
-
listener
- Parameters:
rawStreamListener
- listener- Returns:
- this instance
-
onStatus
- Parameters:
onStatus
- listener- Returns:
- this instance
-
onException
- Parameters:
onException
- listener- Returns:
- this instance
-
equals
-
hashCode
public int hashCode() -
toString
-
prettyDebugEnabled
- Parameters:
prettyDebugEnabled
- enabled- Returns:
- this instance
-
gzipEnabled
- Parameters:
gzipEnabled
- enabled- Returns:
- this instance
-
applicationOnlyAuthEnabled
- Parameters:
applicationOnlyAuthEnabled
- applicationOnlyAuthEnabled- Returns:
- this instance
-
load
- Parameters:
props
- props- Returns:
- this instance
-
httpProxyHost
- Parameters:
httpProxyHost
- http proxy host- Returns:
- this instance
-
httpProxyUser
- Parameters:
httpProxyUser
- http proxy user- Returns:
- this instance
-
httpProxyPassword
- Parameters:
httpProxyPassword
- http proxy password- Returns:
- this instance
-
httpProxyPort
- Parameters:
httpProxyPort
- http proxy port- Returns:
- this instance
-
httpProxySocks
- Parameters:
httpProxySocks
- http proxy socks- Returns:
- this instance
-
httpConnectionTimeout
- Parameters:
httpConnectionTimeout
- http connection timeout in milliseconds- Returns:
- this instance
-
httpReadTimeout
- Parameters:
httpReadTimeout
- http read timeout in milliseconds- Returns:
- this instance
-
httpStreamingReadTimeout
- Parameters:
httpStreamingReadTimeout
- http streaming timeout in milliseconds- Returns:
- this instance
-
httpRetryCount
- Parameters:
httpRetryCount
- http retry count- Returns:
- this instance
-
httpRetryIntervalSeconds
- Parameters:
httpRetryIntervalSeconds
- http retry interval in seconds- Returns:
- this instance
-
oAuthConsumer
- Parameters:
oAuthConsumerKey
- OAuth consumer keyoAuthConsumerSecret
- OAuth consumer secret- Returns:
- this instance
-
oAuthAccessToken
public Twitter.TwitterBuilder oAuthAccessToken(String oAuthAccessToken, String oAuthAccessTokenSecret) - Parameters:
oAuthAccessToken
- OAuth access tokenoAuthAccessTokenSecret
- OAuth access token secret- Returns:
- this instance
-
oAuthAccessToken
- Parameters:
accessToken
- access token- Returns:
- this instance
-
oAuth2Token
- Parameters:
oAuth2TokenType
- OAuth2 token typeoAuth2AccessToken
- OAuth2 access token- Returns:
- this instance
-
oAuth2Token
- Parameters:
oAuth2Token
- OAuth2 token- Returns:
- this instance
-
oAuth2Scope
- Parameters:
oAuth2Scope
- OAuth2 scope- Returns:
- this instance
-
contributingTo
- Parameters:
contributingTo
- contributing to user id- Returns:
- this instance
-
trimUserEnabled
- Parameters:
enabled
- trim user enabled- Returns:
- this instance
-
includeExtAltTextEnabled
- Parameters:
enabled
- include ext alt text enabled- Returns:
- this instance
-
tweetModeExtended
- Parameters:
enabled
- tweet mode extended- Returns:
- this instance
-
includeEntitiesEnabled
- Parameters:
enabled
- enabled- Returns:
- this instance
-
jsonStoreEnabled
- Parameters:
enabled
- enabled- Returns:
- this instance
-
mBeanEnabled
- Parameters:
enabled
- mbean enabled- Returns:
- this instance
-
onRateLimitStatus
Registers a lambda action for account associated rate limits- Parameters:
action
- the action to be added- Returns:
- this instance
- Since:
- Twitter4J 4.0.4
- See Also:
-
onRateLimitReached
Registers a RateLimitStatusListener for account associated rate limits- Parameters:
action
- the action to be added- Returns:
- this instance
- Since:
- Twitter4J 4.0.4
- See Also:
-