List of usage examples for twitter4j.conf PropertyConfiguration PropertyConfiguration
PropertyConfiguration(String treePath)
From source file:org.taverna.server.master.notification.TwitterDispatcher.java
@Override public boolean isAvailable() { try {/*from www.jav a 2 s . com*/ // Try to create the configuration and push it through as far as // confirming that we can build an access object (even if it isn't // bound to a user) new TwitterFactory(new PropertyConfiguration(getConfig())).getInstance(); return true; } catch (Exception e) { return false; } }
From source file:uk.co.flax.ukmp.Indexer.java
License:Apache License
private Configuration readTwitterConfiguration(String twitterConfigFile) throws IOException { Configuration twitterConfig = null; InputStream is = null;//from w w w .j a va2s. c o m try { is = new FileInputStream(config.getAuthenticationFile()); twitterConfig = new PropertyConfiguration(is); } finally { if (is != null) { is.close(); } } return twitterConfig; }