Class AbstractTwitterConsumerHandler

    • Field Detail

      • log

        protected final org.slf4j.Logger log
      • endpoint

        protected final TwitterEndpoint endpoint
        Instance of TwitterEndpoint.
    • Constructor Detail

      • AbstractTwitterConsumerHandler

        protected AbstractTwitterConsumerHandler​(TwitterEndpoint endpoint)
    • Method Detail

      • pollConsume

        public abstract List<org.apache.camel.Exchange> pollConsume()
                                                             throws twitter4j.TwitterException
        Called by polling consumers during each poll. It needs to be separate from directConsume() since, as an example, to allow tweets to build up between polls.
        Throws:
        twitter4j.TwitterException
      • directConsume

        public abstract List<org.apache.camel.Exchange> directConsume()
                                                               throws twitter4j.TwitterException
        Called by direct consumers.
        Throws:
        twitter4j.TwitterException
      • setLastIdIfGreater

        protected void setLastIdIfGreater​(long newId)
        Can't assume that the end of the list will be the most recent ID. The Twitter API sometimes returns them slightly out of order.
      • setLastId

        public void setLastId​(long sinceId)
        Support to update the Consumer's lastId when starting the consumer
      • getTwitter

        protected twitter4j.Twitter getTwitter()
      • getLastId

        protected long getLastId()
      • getLastIdPaging

        protected twitter4j.Paging getLastIdPaging()