Class UserListener

  • All Implemented Interfaces:
    adams.core.Destroyable, adams.core.GlobalInfoSupporter, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.option.OptionHandler, adams.core.Pausable, adams.core.QuickInfoSupporter, adams.core.SizeOfHandler, adams.core.Stoppable, adams.flow.core.FlowContextHandler, Serializable, twitter4j.StatusListener, twitter4j.UserStreamListener

    public class UserListener
    extends AbstractListener
    implements twitter4j.UserStreamListener
    Listener for following tweets from a user.
    Version:
    $Revision: 13567 $
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_User

        protected String m_User
        the screenname to track.
    • Constructor Detail

      • UserListener

        public UserListener()
    • Method Detail

      • globalInfo

        public String globalInfo()
        Returns a string describing the object.
        Specified by:
        globalInfo in interface adams.core.GlobalInfoSupporter
        Specified by:
        globalInfo in class adams.core.option.AbstractOptionHandler
        Returns:
        a description suitable for displaying in the gui
      • defineOptions

        public void defineOptions()
        Adds options to the internal list of options.
        Specified by:
        defineOptions in interface adams.core.option.OptionHandler
        Overrides:
        defineOptions in class AbstractListener
      • getQuickInfo

        public String getQuickInfo()
        Returns a quick info about the actor, which will be displayed in the GUI.
        Specified by:
        getQuickInfo in interface adams.core.QuickInfoSupporter
        Overrides:
        getQuickInfo in class AbstractListener
        Returns:
        null if no info available, otherwise short string
      • setUser

        public void setUser​(String value)
        Sets the user to follow.
        Parameters:
        value - the user
      • getUser

        public String getUser()
        Returns the user to follow.
        Returns:
        the user
      • userTipText

        public String userTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • onDeletionNotice

        public void onDeletionNotice​(long directMessageId,
                                     long userId)
        Specified by:
        onDeletionNotice in interface twitter4j.UserStreamListener
      • onFriendList

        public void onFriendList​(long[] friendIds)
        Specified by:
        onFriendList in interface twitter4j.UserStreamListener
      • onFavorite

        public void onFavorite​(twitter4j.User source,
                               twitter4j.User target,
                               twitter4j.Status favoritedStatus)
        Specified by:
        onFavorite in interface twitter4j.UserStreamListener
      • onUnfavorite

        public void onUnfavorite​(twitter4j.User source,
                                 twitter4j.User target,
                                 twitter4j.Status unfavoritedStatus)
        Specified by:
        onUnfavorite in interface twitter4j.UserStreamListener
      • onFollow

        public void onFollow​(twitter4j.User source,
                             twitter4j.User followedUser)
        Specified by:
        onFollow in interface twitter4j.UserStreamListener
      • onUnfollow

        public void onUnfollow​(twitter4j.User source,
                               twitter4j.User unfollowedUser)
        Specified by:
        onUnfollow in interface twitter4j.UserStreamListener
      • onDirectMessage

        public void onDirectMessage​(twitter4j.DirectMessage directMessage)
        Specified by:
        onDirectMessage in interface twitter4j.UserStreamListener
      • onUserListMemberAddition

        public void onUserListMemberAddition​(twitter4j.User addedMember,
                                             twitter4j.User listOwner,
                                             twitter4j.UserList list)
        Specified by:
        onUserListMemberAddition in interface twitter4j.UserStreamListener
      • onUserListMemberDeletion

        public void onUserListMemberDeletion​(twitter4j.User deletedMember,
                                             twitter4j.User listOwner,
                                             twitter4j.UserList list)
        Specified by:
        onUserListMemberDeletion in interface twitter4j.UserStreamListener
      • onUserListSubscription

        public void onUserListSubscription​(twitter4j.User subscriber,
                                           twitter4j.User listOwner,
                                           twitter4j.UserList list)
        Specified by:
        onUserListSubscription in interface twitter4j.UserStreamListener
      • onUserListUnsubscription

        public void onUserListUnsubscription​(twitter4j.User subscriber,
                                             twitter4j.User listOwner,
                                             twitter4j.UserList list)
        Specified by:
        onUserListUnsubscription in interface twitter4j.UserStreamListener
      • onUserListCreation

        public void onUserListCreation​(twitter4j.User listOwner,
                                       twitter4j.UserList list)
        Specified by:
        onUserListCreation in interface twitter4j.UserStreamListener
      • onUserListUpdate

        public void onUserListUpdate​(twitter4j.User listOwner,
                                     twitter4j.UserList list)
        Specified by:
        onUserListUpdate in interface twitter4j.UserStreamListener
      • onUserListDeletion

        public void onUserListDeletion​(twitter4j.User listOwner,
                                       twitter4j.UserList list)
        Specified by:
        onUserListDeletion in interface twitter4j.UserStreamListener
      • onUserProfileUpdate

        public void onUserProfileUpdate​(twitter4j.User updatedUser)
        Specified by:
        onUserProfileUpdate in interface twitter4j.UserStreamListener
      • onUserSuspension

        public void onUserSuspension​(long suspendedUser)
        Specified by:
        onUserSuspension in interface twitter4j.UserStreamListener
      • onUserDeletion

        public void onUserDeletion​(long deletedUser)
        Specified by:
        onUserDeletion in interface twitter4j.UserStreamListener
      • onBlock

        public void onBlock​(twitter4j.User source,
                            twitter4j.User blockedUser)
        Specified by:
        onBlock in interface twitter4j.UserStreamListener
      • onUnblock

        public void onUnblock​(twitter4j.User source,
                              twitter4j.User unblockedUser)
        Specified by:
        onUnblock in interface twitter4j.UserStreamListener
      • onRetweetedRetweet

        public void onRetweetedRetweet​(twitter4j.User source,
                                       twitter4j.User target,
                                       twitter4j.Status retweetedStatus)
        Specified by:
        onRetweetedRetweet in interface twitter4j.UserStreamListener
      • onFavoritedRetweet

        public void onFavoritedRetweet​(twitter4j.User source,
                                       twitter4j.User target,
                                       twitter4j.Status favoritedRetweeet)
        Specified by:
        onFavoritedRetweet in interface twitter4j.UserStreamListener
      • onQuotedTweet

        public void onQuotedTweet​(twitter4j.User source,
                                  twitter4j.User target,
                                  twitter4j.Status quotingTweet)
        Specified by:
        onQuotedTweet in interface twitter4j.UserStreamListener
      • onStatus

        public void onStatus​(twitter4j.Status status)
        When receiving a status.
        Specified by:
        onStatus in interface twitter4j.StatusListener
        Parameters:
        status - the status
      • onDeletionNotice

        public void onDeletionNotice​(twitter4j.StatusDeletionNotice statusDeletionNotice)
        Specified by:
        onDeletionNotice in interface twitter4j.StatusListener
      • onTrackLimitationNotice

        public void onTrackLimitationNotice​(int numberOfLimitedStatuses)
        Specified by:
        onTrackLimitationNotice in interface twitter4j.StatusListener
      • onScrubGeo

        public void onScrubGeo​(long userId,
                               long upToStatusId)
        Specified by:
        onScrubGeo in interface twitter4j.StatusListener
      • onStallWarning

        public void onStallWarning​(twitter4j.StallWarning warning)
        Specified by:
        onStallWarning in interface twitter4j.StatusListener
      • onException

        public void onException​(Exception ex)