Class SessionParams

java.lang.Object
com.frostwire.jlibtorrent.SessionParams

public class SessionParams extends Object
This is a parameters pack for configuring the session before it's started.
  • Constructor Details

    • SessionParams

      public SessionParams(session_params p)
      Parameters:
      p - the native object
    • SessionParams

      public SessionParams()
      This constructor can be used to start with the default plugins (ut_metadata, ut_pex and smart_ban). The default values in the settings is to start the default features like upnp, nat-pmp, and dht for example.
    • SessionParams

      public SessionParams(File data)
      This constructor can be used to start with the default plugins (ut_metadata, ut_pex and smart_ban). The default values in the settings is to start the default features like upnp, nat-pmp, and dht for example.
    • SessionParams

      public SessionParams(byte[] data)
    • SessionParams

      public SessionParams(SettingsPack settings)
      This constructor can be used to start with the default plugins (ut_metadata, ut_pex and smart_ban). The default values in the settings is to start the default features like upnp, nat-pmp, and dht for example.
      Parameters:
      settings - the initial settings pack
  • Method Details

    • swig

      public session_params swig()
      Returns:
      the native object
    • getSettings

      public SettingsPack getSettings()
      Returns:
      the settings pack
    • setSettings

      public void setSettings(SettingsPack settings)
      The settings to configure the session with.
      Parameters:
      settings - the settings pack
    • setPosixDiskIO

      public void setPosixDiskIO()
      Internally set the session to use a simple posix disk I/O back-end, used for systems that don't have a 64-bit virtual address space or don't support memory mapped files. It's implemented using portable C file functions and is single-threaded. This is an advance feature, only to use in particular situations, like Android devices with faulty drivers.
    • setDefaultDiskIO

      public void setDefaultDiskIO()
      Internally set the session to use the more appropriate disk I/O back-end. On systems that support memory mapped files (and a 64-bit address space) the memory mapped storage will be constructed, otherwise the portable posix storage.