org.klomp.snark

## Interface CompleteListener

- All Known Implementing Classes:
    SnarkManager, UpdateRunner

      public interface CompleteListener

  Callback for Snark events.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addMessage(Snark snark, String message)`
    `void` | `fatal(Snark snark, String error)`
    `BandwidthListener` | `getBandwidthListener()`
    `CommentSet` | `getSavedComments(Snark snark)`
    `boolean` | `getSavedPreserveNamesSetting(Snark snark)`
    `BitField` | `getSavedTorrentBitField(Snark snark)`
    `long` | `getSavedTorrentTime(Snark snark)` not really listeners but the easiest way to get back to an optional SnarkManager
    `long` | `getSavedUploaded(Snark snark)`
    `String` | `gotMetaInfo(Snark snark)` We transitioned from magnet mode, we have now initialized our metainfo and storage.
    `void` | `gotPiece(Snark snark)`
    `void` | `locked_saveComments(Snark snark, CommentSet comments)`
    `boolean` | `shouldAutoStart()`
    `void` | `torrentComplete(Snark snark)`
    `void` | `updateStatus(Snark snark)`

- - ### Method Detail

    - #### addMessage

          void addMessage(Snark snark,
                          String message)

    - #### fatal

          void fatal(Snark snark,
                     String error)

    - #### getBandwidthListener

          BandwidthListener getBandwidthListener()

    - #### getSavedComments

          CommentSet getSavedComments(Snark snark)

    - #### getSavedPreserveNamesSetting

          boolean getSavedPreserveNamesSetting(Snark snark)

    - #### getSavedTorrentBitField

          BitField getSavedTorrentBitField(Snark snark)

    - #### getSavedTorrentTime

          long getSavedTorrentTime(Snark snark)

      not really listeners but the easiest way to get back to an optional SnarkManager

    - #### getSavedUploaded

          long getSavedUploaded(Snark snark)

    - #### gotMetaInfo

          String gotMetaInfo(Snark snark)

      We transitioned from magnet mode, we have now initialized our metainfo and storage. The listener should now call getMetaInfo() and save the data to disk.
      Returns:
        the new name for the torrent or null on error

    - #### gotPiece

          void gotPiece(Snark snark)

    - #### locked_saveComments

          void locked_saveComments(Snark snark,
                                   CommentSet comments)

    - #### shouldAutoStart

          boolean shouldAutoStart()

    - #### torrentComplete

          void torrentComplete(Snark snark)

    - #### updateStatus

          void updateStatus(Snark snark)