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 AEMonitor
private TRHost
private List
private static TrackerImpl
Fields inherited from class com.biglybt.pifimpl.local.tracker.TrackerWCHelper
this_mon
Fields inherited from interface com.biglybt.pif.tracker.Tracker
PR_HTTP, PR_HTTPS, PR_NON_BLOCKING, PR_REVERSE_PROXY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addListener
(TrackerListener listener) boolean
authenticate
(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) void
destroy()
getName()
static Tracker
getTorrent
(Torrent torrent) URL[]
getURLs()
returns the context URLS (can be two for the tracker as http + https)void
void
removeListener
(TrackerListener listener) void
setEnableKeepAlive
(boolean enable) void
void
void
Methods inherited from class com.biglybt.pifimpl.local.tracker.TrackerWCHelper
addPageGenerator, getPageGenerators, handleExternalRequest, removePageGenerator, setTracker
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.biglybt.pif.tracker.web.TrackerWebContext
addPageGenerator, getPageGenerators, removePageGenerator
Methods inherited from interface com.biglybt.core.tracker.host.TRHostListener2
handleExternalRequest
-
Field Details
-
singleton
-
class_mon
-
listeners
-
host
-
auth_listeners
-
-
Constructor Details
-
TrackerImpl
-
-
Method Details
-
getSingleton
-
getName
- Specified by:
getName
in interfaceTrackerWebContext
-
setEnableKeepAlive
public void setEnableKeepAlive(boolean enable) - Specified by:
setEnableKeepAlive
in interfaceTrackerWebContext
-
getProperties
- Specified by:
getProperties
in interfaceTrackerWebContext
-
getURLs
Description copied from interface:TrackerWebContext
returns the context URLS (can be two for the tracker as http + https)- Specified by:
getURLs
in interfaceTrackerWebContext
- Returns:
-
getBindIP
- Specified by:
getBindIP
in interfaceTrackerWebContext
-
host
- Specified by:
host
in interfaceTracker
- Throws:
TrackerException
-
host
public TrackerTorrent host(Torrent _torrent, boolean _persistent, boolean _passive) throws TrackerException - Specified by:
host
in interfaceTracker
- Throws:
TrackerException
-
publish
- Specified by:
publish
in interfaceTracker
- Throws:
TrackerException
-
getTorrents
- Specified by:
getTorrents
in interfaceTracker
-
getTorrent
- Specified by:
getTorrent
in interfaceTracker
-
createWebContext
- Specified by:
createWebContext
in interfaceTracker
- Parameters:
port
-protocol
-- Returns:
- Throws:
TrackerException
-
createWebContext
public TrackerWebContext createWebContext(String name, int port, int protocol) throws TrackerException Description copied from interface:Tracker
Create a new web context for the given port and protocol- Specified by:
createWebContext
in 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:Tracker
Creates a new context bound to the supplied ip- Specified by:
createWebContext
in 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:
createWebContext
in interfaceTracker
- Throws:
TrackerException
-
torrentAdded
-
torrentChanged
-
torrentRemoved
-
addListener
- Specified by:
addListener
in interfaceTracker
-
removeListener
- Specified by:
removeListener
in interfaceTracker
-
authenticate
- Specified by:
authenticate
in interfaceTRHostAuthenticationListener
-
authenticate
- Specified by:
authenticate
in interfaceTRHostAuthenticationListener
-
addAuthenticationListener
- Specified by:
addAuthenticationListener
in interfaceTrackerWebContext
-
removeAuthenticationListener
- Specified by:
removeAuthenticationListener
in interfaceTrackerWebContext
-
destroy
public void destroy()- Specified by:
destroy
in interfaceTrackerWebContext
- Overrides:
destroy
in classTrackerWCHelper
-