Skip to content

Commit

Permalink
Moving to alert package constructors (less visibility).
Browse files Browse the repository at this point in the history
Improved SessionStatsAlert documentation.
  • Loading branch information
aldenml committed Feb 1, 2016
1 parent fc631b3 commit 6203b57
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
Expand Up @@ -12,7 +12,7 @@ public abstract class AbstractAlert<T extends alert> implements Alert<T> {
protected final T alert;
private final AlertType type;

public AbstractAlert(T alert) {
AbstractAlert(T alert) {
this.alert = alert;
this.type = AlertType.fromSwig(alert.type());
}
Expand Down
@@ -1,31 +1,34 @@
package com.frostwire.jlibtorrent.alerts;

import com.frostwire.jlibtorrent.swig.counters;
import com.frostwire.jlibtorrent.swig.session_stats_alert;

/**
* The session_stats_alert is posted when the user requests session statistics by
* calling {@link com.frostwire.jlibtorrent.Session#postSessionStats()} on the session object. Its category is
* ``status_notification``, but it is not subject to filtering, since it's only
* manually posted anyway.
* The {@link SessionStatsAlert} is posted when the user requests session
* statistics by calling {@link com.frostwire.jlibtorrent.Session#postSessionStats()}
* on the session object. Its category is
* {@link com.frostwire.jlibtorrent.swig.alert.category_t#status_notification},
* but it is not subject to filtering, since it's only manually posted anyway.
*
* @author gubatron
* @author aldenml
*/
public final class SessionStatsAlert extends AbstractAlert<session_stats_alert> {

public SessionStatsAlert(session_stats_alert alert) {
SessionStatsAlert(session_stats_alert alert) {
super(alert);
}

/**
* An array are a mix of *counters* and *gauges*, which
* meanings can be queries via the session_stats_metrics() function on the session.
* The internal values are a mix of counters and gauges, which
* meanings can be queries via the
* {@link com.frostwire.jlibtorrent.LibTorrent#sessionStatsMetrics()} function.
* <p/>
* The mapping from a specific metric to an index into this array is constant for a
* specific version of libtorrent, but may differ for other versions. The intended
* usage is to request the mapping, i.e. call session_stats_metrics(), once
* usage is to request the mapping, i.e. call
* {@link com.frostwire.jlibtorrent.LibTorrent#sessionStatsMetrics()}, once
* on startup, and then use that mapping to interpret these values throughout
* the process' runtime.
* the process's runtime.
*
* @return
*/
Expand Down

0 comments on commit 6203b57

Please sign in to comment.