org.gudy.azureus2.pluginsimpl.local.tracker
Class TrackerImpl
java.lang.Object
  
org.gudy.azureus2.pluginsimpl.local.tracker.TrackerWCHelper
      
org.gudy.azureus2.pluginsimpl.local.tracker.TrackerImpl
- All Implemented Interfaces: 
 - TRHostAuthenticationListener, TRHostListener2, Tracker, TrackerWebContext
 
public class TrackerImpl
- extends TrackerWCHelper
- implements Tracker, TRHostListener2, TRHostAuthenticationListener
  
 
 
 
 
| 
Method Summary | 
 void | 
addAuthenticationListener(TrackerAuthenticationListener l)
 
            | 
 void | 
addListener(TrackerListener listener)
 
            | 
 boolean | 
authenticate(java.lang.String headers,
             java.net.URL resource,
             java.lang.String user,
             java.lang.String password)
 
            | 
 byte[] | 
authenticate(java.net.URL resource,
             java.lang.String user)
 
            | 
 TrackerWebContext | 
createWebContext(int port,
                 int protocol)
 
            | 
 TrackerWebContext | 
createWebContext(java.lang.String name,
                 int port,
                 int protocol)
 
          Create a new web context for the given port and protocol | 
 TrackerWebContext | 
createWebContext(java.lang.String name,
                 int port,
                 int protocol,
                 java.net.InetAddress bind_ip)
 
          Creates a new context bound to the supplied ip | 
 TrackerWebContext | 
createWebContext(java.lang.String name,
                 int port,
                 int protocol,
                 java.net.InetAddress bind_ip,
                 java.util.Map<java.lang.String,java.lang.Object> properties)
 
            | 
 void | 
destroy()
 
            | 
 java.net.InetAddress | 
getBindIP()
 
            | 
 java.lang.String | 
getName()
 
            | 
static Tracker | 
getSingleton()
 
            | 
 TrackerTorrent | 
getTorrent(Torrent torrent)
 
            | 
 TrackerTorrent[] | 
getTorrents()
 
            | 
 java.net.URL[] | 
getURLs()
 
          returns the context URLS (can be two for the tracker as http + https) | 
 TrackerTorrent | 
host(Torrent _torrent,
     boolean _persistent)
 
            | 
 TrackerTorrent | 
host(Torrent _torrent,
     boolean _persistent,
     boolean _passive)
 
            | 
 TrackerTorrent | 
publish(Torrent _torrent)
 
            | 
 void | 
removeAuthenticationListener(TrackerAuthenticationListener l)
 
            | 
 void | 
removeListener(TrackerListener listener)
 
            | 
 void | 
setEnableKeepAlive(boolean enable)
 
            | 
 void | 
torrentAdded(TRHostTorrent t)
 
            | 
 void | 
torrentChanged(TRHostTorrent t)
 
            | 
 void | 
torrentRemoved(TRHostTorrent t)
 
            | 
 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
 
 
TrackerImpl
protected TrackerImpl(TRHost _host)
getSingleton
public static Tracker getSingleton()
 
 
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
 
 
host
public TrackerTorrent host(Torrent _torrent,
                           boolean _persistent)
                    throws TrackerException
- Specified by:
 host in interface Tracker
 
- Throws:
 TrackerException
 
host
public TrackerTorrent host(Torrent _torrent,
                           boolean _persistent,
                           boolean _passive)
                    throws TrackerException
- Specified by:
 host in interface Tracker
 
- Throws:
 TrackerException
 
publish
public TrackerTorrent publish(Torrent _torrent)
                       throws TrackerException
- Specified by:
 publish in interface Tracker
 
- Throws:
 TrackerException
 
getTorrents
public TrackerTorrent[] getTorrents()
- Specified by:
 getTorrents in interface Tracker
 
 
getTorrent
public TrackerTorrent getTorrent(Torrent torrent)
- Specified by:
 getTorrent in interface Tracker
 
 
createWebContext
public TrackerWebContext createWebContext(int port,
                                          int protocol)
                                   throws TrackerException
- Specified by:
 createWebContext in interface Tracker
 
- Throws:
 TrackerException
 
createWebContext
public TrackerWebContext createWebContext(java.lang.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 interface Tracker
 
- Parameters:
 name - name of the context - will be used as basic realm for auth
- Returns:
 - 
 - Throws:
 TrackerException
 
 
createWebContext
public TrackerWebContext createWebContext(java.lang.String name,
                                          int port,
                                          int protocol,
                                          java.net.InetAddress bind_ip)
                                   throws TrackerException
- Description copied from interface: 
Tracker 
- Creates a new context bound to the supplied ip
- Specified by:
 createWebContext in interface Tracker
 
- Returns:
 - 
 - Throws:
 TrackerException
 
 
createWebContext
public TrackerWebContext createWebContext(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
- Specified by:
 createWebContext in interface Tracker
 
- Throws:
 TrackerException
 
torrentAdded
public void torrentAdded(TRHostTorrent t)
 
 
torrentChanged
public void torrentChanged(TRHostTorrent t)
 
 
torrentRemoved
public void torrentRemoved(TRHostTorrent t)
 
 
addListener
public void addListener(TrackerListener listener)
- Specified by:
 addListener in interface Tracker
 
 
removeListener
public void removeListener(TrackerListener listener)
- Specified by:
 removeListener in interface Tracker
 
 
authenticate
public boolean authenticate(java.lang.String headers,
                            java.net.URL resource,
                            java.lang.String user,
                            java.lang.String password)
- Specified by:
 authenticate in interface TRHostAuthenticationListener
 
 
authenticate
public byte[] authenticate(java.net.URL resource,
                           java.lang.String user)
- Specified by:
 authenticate in interface TRHostAuthenticationListener
 
 
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