Package org.klomp.snark
Class UpdateRunner
java.lang.Object
org.klomp.snark.UpdateRunner
- All Implemented Interfaces:
UpdateTask,CompleteListener
The downloader for router signed updates.
- Since:
- 0.9.4
-
Constructor Summary
ConstructorsConstructorDescriptionUpdateRunner(I2PAppContext ctx, UpdateManager umgr, SnarkManager smgr, UpdateType type, List<URI> uris, String newVersion) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMessage(Snark snark, String message) voidgetID()Valid for pluginsgetSavedComments(Snark snark) booleangetSavedTorrentBitField(Snark snark) longgetSavedTorrentTime(Snark snark) not really listeners but the easiest way to get back to an optional SnarkManagerlonggetSavedUploaded(Snark snark) getType()getURI()The current URI being checked or downloaded from.gotMetaInfo(Snark snark) We transitioned from magnet mode, we have now initialized our metainfo and storage.voidbooleanvoidlocked_saveComments(Snark snark, CommentSet comments) booleanvoidshutdown()voidstart()Tasks must not start themselves in the constructor.voidtorrentComplete(Snark snark) toString()voidupdateStatus(Snark snark) This is called by stopTorrent() among others
-
Constructor Details
-
UpdateRunner
public UpdateRunner(I2PAppContext ctx, UpdateManager umgr, SnarkManager smgr, UpdateType type, List<URI> uris, String newVersion)
-
-
Method Details
-
isRunning
public boolean isRunning()- Specified by:
isRunningin interfaceUpdateTask
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceUpdateTask
-
getType
- Specified by:
getTypein interfaceUpdateTask
-
getMethod
- Specified by:
getMethodin interfaceUpdateTask
-
getURI
Description copied from interface:UpdateTaskThe current URI being checked or downloaded from. Can change if there are multiple URIs to try.- Specified by:
getURIin interfaceUpdateTask
-
getID
Description copied from interface:UpdateTaskValid for plugins- Specified by:
getIDin interfaceUpdateTask
-
start
public void start()Description copied from interface:UpdateTaskTasks must not start themselves in the constructor. Do it here.- Specified by:
startin interfaceUpdateTask
-
torrentComplete
- Specified by:
torrentCompletein interfaceCompleteListener
-
updateStatus
This is called by stopTorrent() among others- Specified by:
updateStatusin interfaceCompleteListener
-
gotMetaInfo
Description copied from interface:CompleteListenerWe transitioned from magnet mode, we have now initialized our metainfo and storage. The listener should now call getMetaInfo() and save the data to disk.- Specified by:
gotMetaInfoin interfaceCompleteListener- Returns:
- the new name for the torrent or null on error
-
fatal
- Specified by:
fatalin interfaceCompleteListener
-
addMessage
- Specified by:
addMessagein interfaceCompleteListener
-
gotPiece
- Specified by:
gotPiecein interfaceCompleteListener
-
getSavedTorrentTime
Description copied from interface:CompleteListenernot really listeners but the easiest way to get back to an optional SnarkManager- Specified by:
getSavedTorrentTimein interfaceCompleteListener
-
getSavedTorrentBitField
- Specified by:
getSavedTorrentBitFieldin interfaceCompleteListener
-
getSavedPreserveNamesSetting
- Specified by:
getSavedPreserveNamesSettingin interfaceCompleteListener
-
getSavedUploaded
- Specified by:
getSavedUploadedin interfaceCompleteListener
-
getSavedComments
- Specified by:
getSavedCommentsin interfaceCompleteListener- Since:
- 0.9.31
-
locked_saveComments
- Specified by:
locked_saveCommentsin interfaceCompleteListener- Since:
- 0.9.31
-
shouldAutoStart
public boolean shouldAutoStart()- Specified by:
shouldAutoStartin interfaceCompleteListener- Since:
- 0.9.42
-
toString
-