Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
35 lines (21 sloc) 757 Bytes
package org.twitter4j.grails.plugin
import org.apache.log4j.Logger;
import org.springframework.beans.factory.FactoryBean;
import twitter4j.TwitterStreamFactory;
import twitter4j.TwitterStream;
import twitter4j.conf.ConfigurationBuilder;
class TwitterUserStreamFactoryBean implements FactoryBean{
Logger log = Logger.getLogger(getClass())
def configuration
Object getObject() {
ConfigurationBuilder cb = new ConfigurationBuilder();
configuration.each { key, value ->
cb."$key" = value
TwitterStream twitterStream = new TwitterStreamFactory(;
log.debug "finish building tweet listener..."
return twitterStream
Class getObjectType() { TwitterStream }
boolean isSingleton() { true }
Something went wrong with that request. Please try again.