|
LimeWire Consolidated API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.limegroup.gnutella.ActivityCallbackAdapter
public class ActivityCallbackAdapter
Provides a default implementation of ActivityCallback where
all the methods are either empty or return false. You can extend
this class when you are only need specific methods.
| Constructor Summary | |
|---|---|
ActivityCallbackAdapter()
|
|
| Method Summary | |
|---|---|
void |
addDownload(Downloader d)
Add a file to the download window |
void |
addUpload(Uploader u)
Add an uploader to the upload window |
void |
browseHostFailed(GUID guid)
|
void |
componentLoading(String state,
String component)
|
void |
downloadCompleted(Downloader d)
Remove a downloader from the download window. |
void |
downloadsComplete()
Notifies the GUI that all active downloads have been completed. |
String |
getHostValue(String key)
|
void |
handleAddressStateChanged()
|
void |
handleConnectionLifecycleEvent(ConnectionLifecycleEvent evt)
|
void |
handleDAAPConnectionError(Throwable t)
|
void |
handleMagnets(MagnetOptions[] magnets)
The core passes parsed magnets to the callback and asks it if it wants to handle them itself. |
void |
handleQuery(QueryRequest query,
String address,
int port)
Add a query string to the monitor screen |
void |
handleQueryResult(RemoteFileDesc rfd,
QueryReply queryReply,
Set<? extends IpPort> locs)
Notifies the UI that a new query result has come in to the backend. |
void |
handleSaveLocationException(DownloadAction downLoadAction,
SaveLocationException sle,
boolean supportsNewSaveDir)
Handles the supplied SaveLocation exception by prompting the user for a new savelocation or whether to overwrite the file. |
void |
handleSharedFileUpdate(File file)
|
void |
handleTorrent(File torrentFile)
Try to download the torrent file |
void |
installationCorrupted()
Notification that installation may be corrupted. |
boolean |
isQueryAlive(GUID guid)
|
void |
promptAboutCorruptDownload(Downloader dloader)
Shows the user a message informing her that a file being downloaded is corrupt. |
void |
promptTorrentUploadCancel(ManagedTorrent torrent)
Validates with the user that the torrent upload should be cancelled. |
void |
removeUpload(Uploader u)
Remove an uploader from the upload window. |
void |
restoreApplication()
Tell to deiconify. |
void |
showDownloads()
|
String |
translate(String s)
Translate a String taking into account Locale. |
void |
updateAvailable(UpdateInformation info)
|
void |
uploadsComplete()
Notifies that all active uploads have been completed. |
boolean |
warnAboutSharingSensitiveDirectory(File dir)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ActivityCallbackAdapter()
| Method Detail |
|---|
public void addUpload(Uploader u)
ActivityCallback
addUpload in interface ActivityCallbackpublic void browseHostFailed(GUID guid)
public void componentLoading(String state,
String component)
public void handleAddressStateChanged()
public void handleConnectionLifecycleEvent(ConnectionLifecycleEvent evt)
public void handleMagnets(MagnetOptions[] magnets)
ActivityCallback
If this is the case the callback should return true, otherwise
the core starts the downloads itself.
handleMagnets in interface ActivityCallbackmagnets - Array of magnet information to handle
public void handleQueryResult(RemoteFileDesc rfd,
QueryReply queryReply,
Set<? extends IpPort> locs)
ActivityCallback
handleQueryResult in interface ActivityCallbackrfd - the descriptor for the remote filelocs - the Set of alternate locations for the file
public void handleQuery(QueryRequest query,
String address,
int port)
ActivityCallback
handleQuery in interface ActivityCallbackpublic void handleSharedFileUpdate(File file)
handleSharedFileUpdate in interface ActivityCallbackpublic void handleTorrent(File torrentFile)
ActivityCallback
handleTorrent in interface ActivityCallbackpublic void installationCorrupted()
ActivityCallback
installationCorrupted in interface ActivityCallbackpublic boolean isQueryAlive(GUID guid)
isQueryAlive in interface ActivityCallbackguid that maps to a query result screen
is still available/viewable to the user.public void removeUpload(Uploader u)
ActivityCallback
removeUpload in interface ActivityCallbackpublic void restoreApplication()
ActivityCallback
restoreApplication in interface ActivityCallbackpublic void updateAvailable(UpdateInformation info)
public void uploadsComplete()
ActivityCallback
uploadsComplete in interface ActivityCallbackpublic boolean warnAboutSharingSensitiveDirectory(File dir)
public void addDownload(Downloader d)
DownloadCallback
addDownload in interface DownloadCallbackpublic void downloadsComplete()
DownloadCallback
downloadsComplete in interface DownloadCallbackpublic String getHostValue(String key)
public void promptAboutCorruptDownload(Downloader dloader)
DownloadCallbackThis method MUST call dloader.discardCorruptDownload(boolean b) otherwise there will be threads piling up waiting for a notification
promptAboutCorruptDownload in interface DownloadCallbackpublic void downloadCompleted(Downloader d)
DownloadCallback
downloadCompleted in interface DownloadCallbackpublic void showDownloads()
public void handleDAAPConnectionError(Throwable t)
public String translate(String s)
ActivityCallbackI18nMarker.marktr(String).
translate in interface ActivityCallbacks - The String to translate
public void handleSaveLocationException(DownloadAction downLoadAction,
SaveLocationException sle,
boolean supportsNewSaveDir)
ActivityCallback
handleSaveLocationException in interface ActivityCallbackpublic void promptTorrentUploadCancel(ManagedTorrent torrent)
ActivityCallback
promptTorrentUploadCancel in interface ActivityCallback
|
LimeWire Consolidated API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||