⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 trtrackerannouncerfactoryimpl.java

📁 java 文件下载器。可自定义
💻 JAVA
字号:
// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space 
// Source File Name:   TRTrackerAnnouncerFactoryImpl.java

package org.gudy.azureus2.core3.tracker.client.impl;

import java.util.ArrayList;
import java.util.List;
import org.gudy.azureus2.core3.torrent.TOTorrent;
import org.gudy.azureus2.core3.tracker.client.*;
import org.gudy.azureus2.core3.tracker.client.impl.bt.TRTrackerBTAnnouncerImpl;
import org.gudy.azureus2.core3.tracker.client.impl.dht.TRTrackerDHTAnnouncerImpl;
import org.gudy.azureus2.core3.util.*;

public class TRTrackerAnnouncerFactoryImpl
{

	protected static List listeners = new ArrayList();
	protected static List clients = new ArrayList();
	protected static AEMonitor class_mon = new AEMonitor("TRTrackerClientFactory");

	public TRTrackerAnnouncerFactoryImpl()
	{
	}

	public static TRTrackerAnnouncer create(TOTorrent torrent, String networks[], boolean manual)
		throws TRTrackerAnnouncerException
	{
		TRTrackerAnnouncer client;
		List listeners_copy;
		if (TorrentUtils.isDecentralised(torrent))
			client = new TRTrackerDHTAnnouncerImpl(torrent, networks, manual);
		else
			client = new TRTrackerBTAnnouncerImpl(torrent, networks, manual);
		if (manual)
			break MISSING_BLOCK_LABEL_142;
		listeners_copy = new ArrayList();
		class_mon.enter();
		clients.add(client);
		listeners_copy = new ArrayList(listeners);
		class_mon.exit();
		break MISSING_BLOCK_LABEL_93;
		Exception exception;
		exception;
		class_mon.exit();
		throw exception;
		for (int i = 0; i < listeners_copy.size(); i++)
			try
			{
				((TRTrackerAnnouncerFactoryListener)listeners_copy.get(i)).clientCreated(client);
			}
			catch (Throwable e)
			{
				Debug.printStackTrace(e);
			}

		return client;
	}

	public static void addListener(TRTrackerAnnouncerFactoryListener l)
	{
		List clients_copy;
		class_mon.enter();
		listeners.add(l);
		clients_copy = new ArrayList(clients);
		class_mon.exit();
		break MISSING_BLOCK_LABEL_45;
		Exception exception;
		exception;
		class_mon.exit();
		throw exception;
		for (int i = 0; i < clients_copy.size(); i++)
			try
			{
				l.clientCreated((TRTrackerAnnouncer)clients_copy.get(i));
			}
			catch (Throwable e)
			{
				Debug.printStackTrace(e);
			}

		return;
	}

	public static void removeListener(TRTrackerAnnouncerFactoryListener l)
	{
		class_mon.enter();
		listeners.remove(l);
		class_mon.exit();
		break MISSING_BLOCK_LABEL_34;
		Exception exception;
		exception;
		class_mon.exit();
		throw exception;
	}

	public static void destroy(TRTrackerAnnouncer client)
	{
		List listeners_copy;
		if (client.isManual())
			break MISSING_BLOCK_LABEL_104;
		listeners_copy = new ArrayList();
		class_mon.enter();
		clients.remove(client);
		listeners_copy = new ArrayList(listeners);
		class_mon.exit();
		break MISSING_BLOCK_LABEL_62;
		Exception exception;
		exception;
		class_mon.exit();
		throw exception;
		for (int i = 0; i < listeners_copy.size(); i++)
			try
			{
				((TRTrackerAnnouncerFactoryListener)listeners_copy.get(i)).clientDestroyed(client);
			}
			catch (Throwable e)
			{
				Debug.printStackTrace(e);
			}

	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -