org.gudy.azureus2.pluginsimpl.local.tracker
Class TrackerWebContextImpl

java.lang.Object
  extended by org.gudy.azureus2.pluginsimpl.local.tracker.TrackerWCHelper
      extended by org.gudy.azureus2.pluginsimpl.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 org.gudy.azureus2.core3.tracker.server.TRTrackerServerListener2
TRTrackerServerListener2.ExternalRequest
 
Field Summary
protected  java.util.List<TrackerAuthenticationListener> auth_listeners
           
protected  TRTrackerServer server
           
 
Fields inherited from class org.gudy.azureus2.pluginsimpl.local.tracker.TrackerWCHelper
this_mon
 
Constructor Summary
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
 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 OK
 byte[] authenticate(java.net.URL resource, java.lang.String user)
          returns SHA1 hash of pw for user if available
 void 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 org.gudy.azureus2.pluginsimpl.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 org.gudy.azureus2.core3.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 interface TrackerWebContext

setEnableKeepAlive

public void setEnableKeepAlive(boolean enable)
Specified by:
setEnableKeepAlive in interface TrackerWebContext

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 interface TrackerWebContext
Returns:

getBindIP

public java.net.InetAddress getBindIP()
Specified by:
getBindIP in interface TrackerWebContext

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 interface TRHostAuthenticationListener
Specified by:
authenticate in interface TRTrackerServerAuthenticationListener

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 interface TRHostAuthenticationListener
Specified by:
authenticate in interface TRTrackerServerAuthenticationListener

addAuthenticationListener

public void addAuthenticationListener(TrackerAuthenticationListener l)
Specified by:
addAuthenticationListener in interface TrackerWebContext

removeAuthenticationListener

public void removeAuthenticationListener(TrackerAuthenticationListener l)
Specified by:
removeAuthenticationListener in interface TrackerWebContext

destroy

public void destroy()
Specified by:
destroy in interface TrackerWebContext
Overrides:
destroy in class TrackerWCHelper