Class RPTracker
- java.lang.Object
-
- com.biglybt.pifimpl.remote.RPObject
-
- com.biglybt.pifimpl.remote.tracker.RPTracker
-
- All Implemented Interfaces:
Tracker
,TrackerWebContext
,java.io.Serializable
public class RPTracker extends RPObject implements Tracker
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Tracker
delegate
-
Fields inherited from class com.biglybt.pifimpl.remote.RPObject
__delegate, _dispatcher, _object_id, next_key, object_registry, object_registry_reverse
-
Fields inherited from interface com.biglybt.pif.tracker.Tracker
PR_HTTP, PR_HTTPS, PR_NON_BLOCKING
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RPReply
_process(RPRequest request)
protected void
_setDelegate(java.lang.Object _delegate)
java.lang.Object
_setLocal()
void
addAuthenticationListener(TrackerAuthenticationListener l)
void
addListener(TrackerListener listener)
void
addPageGenerator(TrackerWebPageGenerator generator)
static RPTracker
create(Tracker _delegate)
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 protocolTrackerWebContext
createWebContext(java.lang.String name, int port, int protocol, java.net.InetAddress bind_ip)
Creates a new context bound to the supplied ipTrackerWebContext
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()
TrackerWebPageGenerator[]
getPageGenerators()
TrackerTorrent
getTorrent(Torrent t)
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
removePageGenerator(TrackerWebPageGenerator generator)
void
setEnableKeepAlive(boolean enable)
-
Methods inherited from class com.biglybt.pifimpl.remote.RPObject
_fixupLocal, _getDelegate, _getName, _getOID, _lookupLocal, _lookupLocal, _refresh, _setRemote, getDispatcher, notSupported, notSupported
-
-
-
-
Field Detail
-
delegate
protected transient Tracker delegate
-
-
Constructor Detail
-
RPTracker
protected RPTracker(Tracker _delegate)
-
-
Method Detail
-
_setDelegate
protected void _setDelegate(java.lang.Object _delegate)
- Overrides:
_setDelegate
in classRPObject
-
_setLocal
public java.lang.Object _setLocal() throws RPException
- Overrides:
_setLocal
in classRPObject
- Throws:
RPException
-
host
public TrackerTorrent host(Torrent torrent, boolean persistent) throws TrackerException
- 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
public TrackerTorrent publish(Torrent torrent) throws TrackerException
- Specified by:
publish
in interfaceTracker
- Throws:
TrackerException
-
getTorrents
public TrackerTorrent[] getTorrents()
- Specified by:
getTorrents
in interfaceTracker
-
getTorrent
public TrackerTorrent getTorrent(Torrent t)
- Specified by:
getTorrent
in interfaceTracker
-
createWebContext
public TrackerWebContext createWebContext(int port, int protocol) throws TrackerException
- Specified by:
createWebContext
in interfaceTracker
- Returns:
- 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 interfaceTracker
- 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 interfaceTracker
- 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 interfaceTracker
- Throws:
TrackerException
-
addListener
public void addListener(TrackerListener listener)
- Specified by:
addListener
in interfaceTracker
-
removeListener
public void removeListener(TrackerListener listener)
- Specified by:
removeListener
in interfaceTracker
-
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
-
addPageGenerator
public void addPageGenerator(TrackerWebPageGenerator generator)
- Specified by:
addPageGenerator
in interfaceTrackerWebContext
-
removePageGenerator
public void removePageGenerator(TrackerWebPageGenerator generator)
- Specified by:
removePageGenerator
in interfaceTrackerWebContext
-
getPageGenerators
public TrackerWebPageGenerator[] getPageGenerators()
- Specified by:
getPageGenerators
in interfaceTrackerWebContext
-
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
-
-