public final class AsyncTwitterFactory extends Object implements Serializable
Constructor and Description |
---|
AsyncTwitterFactory()
Creates an AsyncTwitterFactory with the root configuration, with no listener.
|
AsyncTwitterFactory(Configuration conf)
Creates an AsyncTwitterFactory with the given configuration.
|
AsyncTwitterFactory(String configTreePath)
Creates a AsyncTwitterFactory with the specified config tree, with given listener
|
Modifier and Type | Method and Description |
---|---|
AsyncTwitter |
getInstance()
Returns an instance associated with the configuration bound to this factory.
|
AsyncTwitter |
getInstance(AccessToken accessToken)
Returns a OAuth Authenticated instance.
consumer key and consumer Secret must be provided by twitter4j.properties, or system properties. Unlike OAuthSupport.setOAuthAccessToken(twitter4j.auth.AccessToken) , this factory method potentially returns a cached instance. |
AsyncTwitter |
getInstance(Authorization auth) |
AsyncTwitter |
getInstance(Twitter twitter)
a kind of copy factory method constructs an AsyncTwitter from Twitter instance
|
static AsyncTwitter |
getSingleton()
Returns default singleton AsyncTwitter instance.
|
public AsyncTwitterFactory()
public AsyncTwitterFactory(Configuration conf)
conf
- the configuration to usepublic AsyncTwitterFactory(String configTreePath)
configTreePath
- the pathpublic AsyncTwitter getInstance()
public AsyncTwitter getInstance(AccessToken accessToken)
OAuthSupport.setOAuthAccessToken(twitter4j.auth.AccessToken)
, this factory method potentially returns a cached instance.accessToken
- access tokenpublic AsyncTwitter getInstance(Authorization auth)
auth
- authorizationpublic AsyncTwitter getInstance(Twitter twitter)
twitter
- Twitter instancepublic static AsyncTwitter getSingleton()
Copyright © 2018. All rights reserved.