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  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, String name, int port, int protocol, InetAddress bind_ip, Map<String,Object> properties)
           
 
Method Summary
 void addAuthenticationListener(TrackerAuthenticationListener l)
           
 boolean authenticate(String headers, URL resource, String user, String password)
          checks the password against user and returns true if OK
 byte[] authenticate(URL resource, String user)
          returns SHA1 hash of pw for user if available
 void destroy()
           
 InetAddress getBindIP()
           
 String getName()
           
 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 List<TrackerAuthenticationListener> auth_listeners
Constructor Detail

TrackerWebContextImpl

public TrackerWebContextImpl(TrackerImpl _tracker,
                             String name,
                             int port,
                             int protocol,
                             InetAddress bind_ip,
                             Map<String,Object> properties)
                      throws TrackerException
Throws:
TrackerException
Method Detail

getName

public String getName()
Specified by:
getName in interface TrackerWebContext

setEnableKeepAlive

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

getURLs

public 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 InetAddress getBindIP()
Specified by:
getBindIP in interface TrackerWebContext

authenticate

public boolean authenticate(String headers,
                            URL resource,
                            String user,
                            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(URL resource,
                           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