src/main/java/au/org/dcw/twitter/ingest/FetchTweets.java
private static Configuration makeTwitterConfig(
        final String credentialsFile,
        final boolean debug
    ) throws IOException {
        // TODO find a better name than credentials, given it might contain proxy info
        final Properties credentials = loadCredentials(credentialsFile);

        final ConfigurationBuilder conf = new ConfigurationBuilder();
        conf.setTweetModeExtended(true);
        conf.setJSONStoreEnabled(true)
            .setDebugEnabled(debug)
            .setOAuthConsumerKey(credentials.getProperty("oauth.consumerKey"))
            .setOAuthConsumerSecret(credentials.getProperty("oauth.consumerSecret"))
            .setOAuthAccessToken(credentials.getProperty("oauth.accessToken"))
            .setOAuthAccessTokenSecret(credentials.getProperty("oauth.accessTokenSecret"));

        final Properties proxies = loadProxyProperties();
        if (proxies.containsKey("http.proxyHost")) {
            conf.setHttpProxyHost(proxies.getProperty("http.proxyHost"))
                .setHttpProxyPort(Integer.parseInt(proxies.getProperty("http.proxyPort")))
                .setHttpProxyUser(proxies.getProperty("http.proxyUser"))
                .setHttpProxyPassword(proxies.getProperty("http.proxyPassword"));
        }

        return conf.build();
    }
/**
     * Builds the {@link Configuration} object with which to connect to Twitter, including
     * credentials and proxy information if it's specified.
     *
     * @return a Twitter4j {@link Configuration} object
     * @throws IOException if there's an error loading the application's {@link #credentialsFile}.
     */
Builds the  Configuration object with which to connect to Twitter, including
credentials and proxy information if it's specified.

@return a Twitter4j  Configuration object
@throws IOException if there's an error loading the application's  #credentialsFile.
Builds the Configuration object with which to connect to Twitter including credentials and proxy information if it ' s specified . @return a Twitter4j Configuration object @throws IOException if there ' s an error loading the application ' s #credentialsFile .
private static Configuration makeTwitterConfig(
        final String credentialsFile,
        final boolean debug
    ) throws IOException {
        final Properties credentials = loadCredentials(credentialsFile);
        final ConfigurationBuilder conf = new ConfigurationBuilder();
        conf.setTweetModeExtended(true);
        conf.setJSONStoreEnabled(true)
            .setDebugEnabled(debug)
            .setOAuthConsumerKey(credentials.getProperty("oauth.consumerKey"))
            .setOAuthConsumerSecret(credentials.getProperty("oauth.consumerSecret"))
            .setOAuthAccessToken(credentials.getProperty("oauth.accessToken"))
            .setOAuthAccessTokenSecret(credentials.getProperty("oauth.accessTokenSecret"));
        final Properties proxies = loadProxyProperties();
        if (proxies.containsKey("http.proxyHost")) {
            conf.setHttpProxyHost(proxies.getProperty("http.proxyHost"))
                .setHttpProxyPort(Integer.parseInt(proxies.getProperty("http.proxyPort")))
                .setHttpProxyUser(proxies.getProperty("http.proxyUser"))
                .setHttpProxyPassword(proxies.getProperty("http.proxyPassword"));
        }
        return conf.build();
    }
private static Configuration makeTwitterConfig ( final String credentialsFile , final boolean debug ) throws IOException { final Properties credentials = loadCredentials ( credentialsFile ) ; final ConfigurationBuilder conf = new ConfigurationBuilder ( ) ; conf . setTweetModeExtended ( true ) ; conf . setJSONStoreEnabled ( true ) . setDebugEnabled ( debug ) . setOAuthConsumerKey ( credentials . getProperty ( "oauth.consumerKey" ) ) . setOAuthConsumerSecret ( credentials . getProperty ( "oauth.consumerSecret" ) ) . setOAuthAccessToken ( credentials . getProperty ( "oauth.accessToken" ) ) . setOAuthAccessTokenSecret ( credentials . getProperty ( "oauth.accessTokenSecret" ) ) ; final Properties proxies = loadProxyProperties ( ) ; if ( proxies . containsKey ( "http.proxyHost" ) ) { conf . setHttpProxyHost ( proxies . getProperty ( "http.proxyHost" ) ) . setHttpProxyPort ( Integer . parseInt ( proxies . getProperty ( "http.proxyPort" ) ) ) . setHttpProxyUser ( proxies . getProperty ( "http.proxyUser" ) ) . setHttpProxyPassword ( proxies . getProperty ( "http.proxyPassword" ) ) ; } return conf . build ( ) ; }
Builds the {@link Configuration} object with which to connect to Twitter, including
 credentials and proxy information if it's specified.
Builds the { @link Configuration } object with which to connect to Twitter including credentials and proxy information if it ' s specified .
// TODO find a better name than credentials, given it might contain proxy info