|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecttwitter4j.TwitterStreamFactory
public final class TwitterStreamFactory
A factory class for TwitterFactory.
An instance of this class is completely thread safe and can be re-used and used concurrently.
Note that TwitterStream is NOT compatible with Google App Engine as GAE is not capable of handling requests longer than 30 seconds.
| Constructor Summary | |
|---|---|
TwitterStreamFactory()
Creates a TwitterStreamFactory with the root configuration. |
|
TwitterStreamFactory(twitter4j.conf.Configuration conf)
Creates a TwitterStreamFactory with the given configuration. |
|
TwitterStreamFactory(String configTreePath)
Creates a TwitterStreamFactory with a specified config tree. |
|
| Method Summary | |
|---|---|
TwitterStream |
getInstance()
Returns a instance associated with the configuration bound to this factory. |
TwitterStream |
getInstance(twitter4j.auth.AccessToken accessToken)
Returns a OAuth Authenticated instance. consumer key and consumer Secret must be provided by twitter4j.properties, or system properties. |
TwitterStream |
getInstance(twitter4j.auth.Authorization auth)
Returns a instance. |
static TwitterStream |
getSingleton()
Returns default singleton TwitterStream instance. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TwitterStreamFactory()
public TwitterStreamFactory(twitter4j.conf.Configuration conf)
conf - the configuration to usepublic TwitterStreamFactory(String configTreePath)
configTreePath - the path| Method Detail |
|---|
public TwitterStream getInstance()
public TwitterStream getInstance(twitter4j.auth.AccessToken accessToken)
OAuthSupport.setOAuthAccessToken(twitter4j.auth.AccessToken), this factory method potentially returns a cached instance.
accessToken - access token
public TwitterStream getInstance(twitter4j.auth.Authorization auth)
public static TwitterStream getSingleton()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||