|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttwitter4j.TwitterFactory
public final class TwitterFactory
A factory class for Twitter.
An instance of this class is completely thread safe and can be re-used and used concurrently.
| Constructor Summary | |
|---|---|
TwitterFactory()
Creates a TwitterFactory with the root configuration. |
|
TwitterFactory(Configuration conf)
Creates a TwitterFactory with the given configuration. |
|
TwitterFactory(String configTreePath)
Creates a TwitterFactory with a specified config tree |
|
| Method Summary | |
|---|---|
Twitter |
getInstance()
Returns a instance associated with the configuration bound to this factory. |
Twitter |
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. |
Twitter |
getInstance(Authorization auth)
|
static Twitter |
getSingleton()
Returns default singleton Twitter instance. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TwitterFactory()
public TwitterFactory(Configuration conf)
conf - the configuration to usepublic TwitterFactory(String configTreePath)
configTreePath - the path| Method Detail |
|---|
public Twitter getInstance()
public Twitter getInstance(AccessToken accessToken)
OAuthSupport.setOAuthAccessToken(twitter4j.auth.AccessToken), this factory method potentially returns a cached instance.
accessToken - access token
public Twitter getInstance(Authorization auth)
public static Twitter getSingleton()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||