Class HttpTrackerModule
- java.lang.Object
-
- org.johnnei.javatorrent.tracker.http.HttpTrackerModule
-
-
Constructor Summary
Constructors Constructor Description HttpTrackerModule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigureTorrentClient(TorrentClient.Builder builder)Registers all the mandatory components to theTorrentClient.Builder.List<Class<IModule>>getDependsOn()Returns the extensions which must be present to allow this module to work at all.intgetRelatedBep()Returns the number of the BEP to which this module is related.voidonBuild(TorrentClient torrentClient)Event called as the last method in the build process of theTorrentClient.Builder.build()call.voidonPostHandshake(Peer peer)Called when the peer has successfully passed the handshake with us.voidonShutdown()Event called when the TorrentClient is being shutdown.
-
-
-
Method Detail
-
configureTorrentClient
public void configureTorrentClient(TorrentClient.Builder builder)
Description copied from interface:IModuleRegisters all the mandatory components to theTorrentClient.Builder.- Specified by:
configureTorrentClientin interfaceIModule- Parameters:
builder- The torrent client builder to which the module is being registered
-
getRelatedBep
public int getRelatedBep()
Description copied from interface:IModuleReturns the number of the BEP to which this module is related. This is used to inform the user/developer for what extension this module is being used.- Specified by:
getRelatedBepin interfaceIModule- Returns:
- The related BEP number
-
getDependsOn
public List<Class<IModule>> getDependsOn()
Description copied from interface:IModuleReturns the extensions which must be present to allow this module to work at all.- Specified by:
getDependsOnin interfaceIModule- Returns:
- The list of required modules
-
onPostHandshake
public void onPostHandshake(Peer peer) throws IOException
Description copied from interface:IModuleCalled when the peer has successfully passed the handshake with us.- Specified by:
onPostHandshakein interfaceIModule- Parameters:
peer- The peer who passed the handshake- Throws:
IOException
-
onBuild
public void onBuild(TorrentClient torrentClient) throws ModuleBuildException
Description copied from interface:IModuleEvent called as the last method in the build process of theTorrentClient.Builder.build()call.- Specified by:
onBuildin interfaceIModule- Throws:
ModuleBuildException- When the module can not build itself correctly
-
onShutdown
public void onShutdown()
Description copied from interface:IModuleEvent called when the TorrentClient is being shutdown.- Specified by:
onShutdownin interfaceIModule
-
-