Class TrackerImpl
java.lang.Object
com.biglybt.pifimpl.local.tracker.TrackerWCHelper
com.biglybt.pifimpl.local.tracker.TrackerImpl
- All Implemented Interfaces:
TRHostAuthenticationListener, TRHostListener2, Tracker, TrackerWebContext
public class TrackerImpl
extends TrackerWCHelper
implements Tracker, TRHostListener2, TRHostAuthenticationListener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate List<TrackerAuthenticationListener> private static AEMonitorprivate TRHostprivate Listprivate static TrackerImplFields inherited from class TrackerWCHelper
this_monFields inherited from interface Tracker
PR_HTTP, PR_HTTPS, PR_NON_BLOCKING, PR_REVERSE_PROXY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddListener(TrackerListener listener) booleanauthenticate(String headers, URL resource, String user, String password) byte[]authenticate(URL resource, String user) createWebContext(int port, int protocol) createWebContext(String name, int port, int protocol) Create a new web context for the given port and protocolcreateWebContext(String name, int port, int protocol, InetAddress bind_ip) Creates a new context bound to the supplied ipcreateWebContext(String name, int port, int protocol, InetAddress bind_ip, Map<String, Object> properties) voiddestroy()getName()static TrackergetTorrent(Torrent torrent) URL[]getURLs()returns the context URLS (can be two for the tracker as http + https)voidvoidremoveListener(TrackerListener listener) voidsetEnableKeepAlive(boolean enable) voidvoidvoidMethods inherited from class TrackerWCHelper
addPageGenerator, getPageGenerators, handleExternalRequest, removePageGenerator, setTrackerMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface TrackerWebContext
addPageGenerator, getPageGenerators, removePageGeneratorMethods inherited from interface TRHostListener2
handleExternalRequest
-
Field Details
-
singleton
-
class_mon
-
listeners
-
host
-
auth_listeners
-
-
Constructor Details
-
TrackerImpl
-
-
Method Details
-
getSingleton
-
getName
- Specified by:
getNamein interfaceTrackerWebContext
-
setEnableKeepAlive
public void setEnableKeepAlive(boolean enable) - Specified by:
setEnableKeepAlivein interfaceTrackerWebContext
-
getProperties
- Specified by:
getPropertiesin interfaceTrackerWebContext
-
getURLs
Description copied from interface:TrackerWebContextreturns the context URLS (can be two for the tracker as http + https)- Specified by:
getURLsin interfaceTrackerWebContext- Returns:
-
getBindIP
- Specified by:
getBindIPin interfaceTrackerWebContext
-
host
- Specified by:
hostin interfaceTracker- Throws:
TrackerException
-
host
public TrackerTorrent host(Torrent _torrent, boolean _persistent, boolean _passive) throws TrackerException - Specified by:
hostin interfaceTracker- Throws:
TrackerException
-
publish
- Specified by:
publishin interfaceTracker- Throws:
TrackerException
-
getTorrents
- Specified by:
getTorrentsin interfaceTracker
-
getTorrent
- Specified by:
getTorrentin interfaceTracker
-
createWebContext
- Specified by:
createWebContextin interfaceTracker- Parameters:
port-protocol-- Returns:
- Throws:
TrackerException
-
createWebContext
public TrackerWebContext createWebContext(String name, int port, int protocol) throws TrackerException Description copied from interface:TrackerCreate a new web context for the given port and protocol- Specified by:
createWebContextin interfaceTracker- Parameters:
name- name of the context - will be used as basic realm for authport-protocol-- Returns:
- Throws:
TrackerException
-
createWebContext
public TrackerWebContext createWebContext(String name, int port, int protocol, InetAddress bind_ip) throws TrackerException Description copied from interface:TrackerCreates a new context bound to the supplied ip- Specified by:
createWebContextin interfaceTracker- Parameters:
name-port-protocol-bind_ip-- Returns:
- Throws:
TrackerException
-
createWebContext
public TrackerWebContext createWebContext(String name, int port, int protocol, InetAddress bind_ip, Map<String, Object> properties) throws TrackerException- Specified by:
createWebContextin interfaceTracker- Throws:
TrackerException
-
torrentAdded
-
torrentChanged
-
torrentRemoved
-
addListener
- Specified by:
addListenerin interfaceTracker
-
removeListener
- Specified by:
removeListenerin interfaceTracker
-
authenticate
- Specified by:
authenticatein interfaceTRHostAuthenticationListener
-
authenticate
- Specified by:
authenticatein interfaceTRHostAuthenticationListener
-
addAuthenticationListener
- Specified by:
addAuthenticationListenerin interfaceTrackerWebContext
-
removeAuthenticationListener
- Specified by:
removeAuthenticationListenerin interfaceTrackerWebContext
-
destroy
public void destroy()- Specified by:
destroyin interfaceTrackerWebContext- Overrides:
destroyin classTrackerWCHelper
-