twitter4j.StatusListener Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of twitter4j-stream Show documentation
Show all versions of twitter4j-stream Show documentation
A Java library for the Twitter API
/*
* Copyright 2007 Yusuke Yamamoto
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package twitter4j;
/**
* @author Yusuke Yamamoto - yusuke at mac.com
* @since Twitter4J 2.0.4
*/
public interface StatusListener extends StreamListener {
void onStatus(Status status);
/**
* Called upon deletionNotice notices. Clients are urged to honor deletionNotice requests and discard deleted statuses immediately. At times, status deletionNotice messages may arrive before the status. Even in this case, the late arriving status should be deleted from your backing store.
*
* @param statusDeletionNotice the deletionNotice notice
* @see Streaming API Concepts | Twitter Developers
* @since Twitter4J 2.1.0
*/
void onDeletionNotice(StatusDeletionNotice statusDeletionNotice);
/**
* This notice will be sent each time a limited stream becomes unlimited.
* If this number is high and or rapidly increasing, it is an indication that your predicate is too broad, and you should consider a predicate with higher selectivity.
*
* @param numberOfLimitedStatuses an enumeration of statuses that matched the track predicate but were administratively limited.
* @see Streaming API Concepts - Filter Limiting | Twitter Developers
* @see Streaming API Concepts - Parsing Responses | Twitter Developers
* @see Twitter Development Talk - Track API Limit message meaning
* @since Twitter4J 2.1.0
*/
void onTrackLimitationNotice(int numberOfLimitedStatuses);
/**
* Called upon location deletion messages. Clients are urged to honor deletion requests and remove appropriate geolocation information from both the display and your backing store immediately. Note that in some cases the location deletion message may arrive before a tweet that lies within the deletion range arrives. You should still strip the location data.
*
* @param userId user id
* @param upToStatusId up to status id
* @since Twitter4J 2.1.9
*/
void onScrubGeo(long userId, long upToStatusId);
/**
* Called when receiving stall warnings.
*
* @param warning StallWaning
* @see Streaming API request parameters - stall_warnings
* @since Twitter4J 3.0.0
*/
void onStallWarning(StallWarning warning);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy