List of usage examples for twitter4j.auth NullAuthorization getInstance
public static NullAuthorization getInstance()
From source file:mx.bigdata.t4j.TwitterStreamImpl.java
License:Apache License
private void init() { if (null == auth) { // try to populate OAuthAuthorization if available in the configuration String consumerKey = conf.getOAuthConsumerKey(); String consumerSecret = conf.getOAuthConsumerSecret(); // try to find oauth tokens in the configuration if (null != consumerKey && null != consumerSecret) { OAuthAuthorization oauth = new OAuthAuthorization(conf); String accessToken = conf.getOAuthAccessToken(); String accessTokenSecret = conf.getOAuthAccessTokenSecret(); if (null != accessToken && null != accessTokenSecret) { oauth.setOAuthAccessToken(new AccessToken(accessToken, accessTokenSecret)); }/* w w w .j a v a 2s. com*/ this.auth = oauth; } else { this.auth = NullAuthorization.getInstance(); } } }