Class TrackerWebContextImpl
- java.lang.Object
-
- com.biglybt.pifimpl.local.tracker.TrackerWCHelper
-
- com.biglybt.pifimpl.local.tracker.TrackerWebContextImpl
-
- All Implemented Interfaces:
TRHostAuthenticationListener
,TRTrackerServerAuthenticationListener
,TRTrackerServerListener2
,TrackerWebContext
public class TrackerWebContextImpl extends TrackerWCHelper implements TRTrackerServerListener2, TRTrackerServerAuthenticationListener
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.biglybt.core.tracker.server.TRTrackerServerListener2
TRTrackerServerListener2.ExternalRequest
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<TrackerAuthenticationListener>
auth_listeners
protected TRTrackerServer
server
-
Fields inherited from class com.biglybt.pifimpl.local.tracker.TrackerWCHelper
this_mon
-
-
Constructor Summary
Constructors Constructor Description TrackerWebContextImpl(TrackerImpl _tracker, java.lang.String name, int port, int protocol, java.net.InetAddress bind_ip, java.util.Map<java.lang.String,java.lang.Object> properties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAuthenticationListener(TrackerAuthenticationListener l)
boolean
authenticate(java.lang.String headers, java.net.URL resource, java.lang.String user, java.lang.String password)
checks the password against user and returns true if OKbyte[]
authenticate(java.net.URL resource, java.lang.String user)
returns SHA1 hash of pw for user if availablevoid
destroy()
java.net.InetAddress
getBindIP()
java.lang.String
getName()
java.net.URL[]
getURLs()
returns the context URLS (can be two for the tracker as http + https)void
removeAuthenticationListener(TrackerAuthenticationListener l)
void
setEnableKeepAlive(boolean enable)
-
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.core.tracker.server.TRTrackerServerListener2
handleExternalRequest
-
-
-
-
Field Detail
-
server
protected TRTrackerServer server
-
auth_listeners
protected java.util.List<TrackerAuthenticationListener> auth_listeners
-
-
Constructor Detail
-
TrackerWebContextImpl
public TrackerWebContextImpl(TrackerImpl _tracker, java.lang.String name, int port, int protocol, java.net.InetAddress bind_ip, java.util.Map<java.lang.String,java.lang.Object> properties) throws TrackerException
- Throws:
TrackerException
-
-
Method Detail
-
getName
public java.lang.String getName()
- Specified by:
getName
in interfaceTrackerWebContext
-
setEnableKeepAlive
public void setEnableKeepAlive(boolean enable)
- Specified by:
setEnableKeepAlive
in interfaceTrackerWebContext
-
getURLs
public java.net.URL[] 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
public java.net.InetAddress getBindIP()
- Specified by:
getBindIP
in interfaceTrackerWebContext
-
authenticate
public boolean authenticate(java.lang.String headers, java.net.URL resource, java.lang.String user, java.lang.String password)
Description copied from interface:TRTrackerServerAuthenticationListener
checks the password against user and returns true if OK- Specified by:
authenticate
in interfaceTRHostAuthenticationListener
- Specified by:
authenticate
in interfaceTRTrackerServerAuthenticationListener
-
authenticate
public byte[] authenticate(java.net.URL resource, java.lang.String user)
Description copied from interface:TRTrackerServerAuthenticationListener
returns SHA1 hash of pw for user if available- Specified by:
authenticate
in interfaceTRHostAuthenticationListener
- Specified by:
authenticate
in interfaceTRTrackerServerAuthenticationListener
-
addAuthenticationListener
public void addAuthenticationListener(TrackerAuthenticationListener l)
- Specified by:
addAuthenticationListener
in interfaceTrackerWebContext
-
removeAuthenticationListener
public void removeAuthenticationListener(TrackerAuthenticationListener l)
- Specified by:
removeAuthenticationListener
in interfaceTrackerWebContext
-
destroy
public void destroy()
- Specified by:
destroy
in interfaceTrackerWebContext
- Overrides:
destroy
in classTrackerWCHelper
-
-