Class AbstractAlert<T extends alert>

java.lang.Object
com.frostwire.jlibtorrent.alerts.AbstractAlert<T>
All Implemented Interfaces:
Alert<T>
Direct Known Subclasses:
AlertsDroppedAlert, DhtAnnounceAlert, DhtBootstrapAlert, DhtDirectResponseAlert, DhtErrorAlert, DhtGetPeersAlert, DhtGetPeersReplyAlert, DhtImmutableItemAlert, DhtLiveNodesAlert, DhtLogAlert, DhtMutableItemAlert, DhtOutgoingGetPeersAlert, DhtPktAlert, DhtPutAlert, DhtSampleInfohashesAlert, DhtStatsAlert, ExternalIpAlert, I2pAlert, IncomingConnectionAlert, ListenFailedAlert, ListenSucceededAlert, LogAlert, LsdErrorAlert, PortmapAlert, PortmapErrorAlert, PortmapLogAlert, SessionErrorAlert, SessionStatsAlert, SessionStatsHeaderAlert, StateUpdateAlert, TorrentAlert, UdpErrorAlert

public abstract class AbstractAlert<T extends alert> extends Object implements Alert<T>
  • Field Details

    • alert

      protected final T extends alert alert
  • Method Details

    • swig

      public final T swig()
      Specified by:
      swig in interface Alert<T extends alert>
    • timestamp

      public long timestamp()
      A timestamp is automatically created in the constructor (in milliseconds).
      Specified by:
      timestamp in interface Alert<T extends alert>
      Returns:
    • type

      public AlertType type()
      Specified by:
      type in interface Alert<T extends alert>
    • what

      public String what()
      Returns a string literal describing the type of the alert. It does not include any information that might be bundled with the alert.
      Specified by:
      what in interface Alert<T extends alert>
      Returns:
    • message

      public String message()
      Generate a string describing the alert and the information bundled with it. This is mainly intended for debug and development use. It is not suitable to use this for applications that may be localized. Instead, handle each alert type individually and extract and render the information from the alert depending on the locale.
      Specified by:
      message in interface Alert<T extends alert>
      Returns:
      the alert message
    • category

      public alert_category_t category()
      Returns a bitmask specifying which categories this alert belong to.
      Specified by:
      category in interface Alert<T extends alert>
      Returns:
      the alert category
    • toString

      public String toString()
      Overrides:
      toString in class Object