当前位置: 首页>>代码示例>>Java>>正文


Java AzureusCore.start方法代码示例

本文整理汇总了Java中com.aelitis.azureus.core.AzureusCore.start方法的典型用法代码示例。如果您正苦于以下问题:Java AzureusCore.start方法的具体用法?Java AzureusCore.start怎么用?Java AzureusCore.start使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.aelitis.azureus.core.AzureusCore的用法示例。


在下文中一共展示了AzureusCore.start方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: main

import com.aelitis.azureus.core.AzureusCore; //导入方法依赖的package包/类
public static void main(String[] args) {
	AzureusCore core = AzureusCoreFactory.create();
	core.start();
	Display display = Display.getDefault();

	Colors.getInstance();

	invoke(null, core.getGlobalManager());
	//OpenTorrentWindow window = new OpenTorrentWindow(null, null, true);
	while (stOpenTorrentWindow != null && !stOpenTorrentWindow.bClosed) {
		if (!display.readAndDispatch())
			display.sleep();
	}

	core.stop();
}
 
开发者ID:AcademicTorrents,项目名称:AcademicTorrents-Downloader,代码行数:17,代码来源:OpenTorrentWindow.java

示例2: main

import com.aelitis.azureus.core.AzureusCore; //导入方法依赖的package包/类
public static void main(String[] args) {
	AzureusCore core = AzureusCoreFactory.create();
	core.start();

	UIConfigDefaultsSWT.initialize();

	//		try {
	//			SWTThread.createInstance(null);
	//		} catch (SWTThreadAlreadyInstanciatedException e) {
	//			e.printStackTrace();
	//		}
	Display display = Display.getDefault();

	Colors.getInstance();

	COConfigurationManager.setParameter("User Mode", 2);

	UIFunctionsImpl uiFunctions = new UIFunctionsImpl(null);
	UIFunctionsManager.setUIFunctions(uiFunctions);

	//		invoke(null, core.getGlobalManager());
	OpenTorrentWindow window = new OpenTorrentWindow(null);
	while (!window.isDisposed()) {
		if (!display.readAndDispatch())
			display.sleep();
	}

	core.stop();
}
 
开发者ID:AcademicTorrents,项目名称:AcademicTorrents-Downloader,代码行数:30,代码来源:OpenTorrentWindow.java

示例3: main

import com.aelitis.azureus.core.AzureusCore; //导入方法依赖的package包/类
public static void
main(
	String[]	args )
{
	try{
		COConfigurationManager.initialise();

		COConfigurationManager.setParameter( "IPV6 Enable Support", true );
		
		boolean v6= true;

		// Test connectivity.
		if (true) {
			// System.out.println( "UDP:  " + getSingleton().getExternalIpAddressUDP(null,0,v6));
			// System.out.println( "TCP:  " + getSingleton().getExternalIpAddressTCP(null,0,v6));
			System.out.println( "HTTP: " + getSingleton().getExternalIpAddressHTTP(v6));
		}

		Map data = constructVersionCheckMessage(VersionCheckClient.REASON_UPDATE_CHECK_START);
		System.out.println("Sending (pre-initialisation):");
		printDataMap(data);
		System.out.println("-----------");

		System.out.println("Receiving (pre-initialisation):");
		printDataMap(getSingleton().getVersionCheckInfo(VersionCheckClient.REASON_UPDATE_CHECK_START));
		System.out.println("-----------");

		System.out.println();
		System.out.print("Initialising core... ");

		/**
		 * Suppress all of these errors being displayed in the output.
		 * 
		 * These things should be temporary...
		 */
		AzureusCoreImpl.SUPPRESS_CLASSLOADER_ERRORS = true;
		DownloadManagerStateImpl.SUPPRESS_FIXUP_ERRORS = true;

		AzureusCore core = AzureusCoreFactory.create(); 
		core.start();
		System.out.println("done.");
		System.out.println();
		System.out.println("-----------");

		data = constructVersionCheckMessage(VersionCheckClient.REASON_UPDATE_CHECK_START);
		System.out.println("Sending (post-initialisation):");
		printDataMap(data);
		System.out.println("-----------");

		System.out.println("Receiving (post-initialisation):");
		printDataMap(getSingleton().getVersionCheckInfo(VersionCheckClient.REASON_UPDATE_CHECK_START));
		System.out.println("-----------");
		System.out.println();

		System.out.print("Shutting down core... ");
		core.stop();
		System.out.println("done.");

	}catch( Throwable e){
		e.printStackTrace();
	}
}
 
开发者ID:thangbn,项目名称:Direct-File-Downloader,代码行数:63,代码来源:VersionCheckClient.java


注:本文中的com.aelitis.azureus.core.AzureusCore.start方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。