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


Java AzureusCore类代码示例

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


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

示例1: ConsoleInput

import com.aelitis.azureus.core.AzureusCore; //导入依赖的package包/类
public ConsoleInput( String con, AzureusCore _azureus_core, Reader _in, PrintStream _out, Boolean _controlling, UserProfile profile)
{
	super("Console Input: " + con);
	this.out = _out;
	this.azureus_core	= _azureus_core;
	this.userProfile 	= profile;
	this.controlling = _controlling.booleanValue();
	this.br = new CommandReader(_in);
	
	
	System.out.println( "ConsoleInput: initializing..." );
	initialise();
	System.out.println( "ConsoleInput: initialized OK" );
	
	System.out.println( "ConsoleInput: starting..." );
	start();
	System.out.println( "ConsoleInput: started OK" );
}
 
开发者ID:thangbn,项目名称:Direct-File-Downloader,代码行数:19,代码来源:ConsoleInput.java

示例2: getTLSTorrent

import com.aelitis.azureus.core.AzureusCore; //导入依赖的package包/类
public static TOTorrent
getTLSTorrent()
{
	HashWrapper	hash = (HashWrapper)(tls.get()).get("hash");
	
	if ( hash != null ){
		
		try{
			AzureusCore	core = AzureusCoreFactory.getSingleton();
			
			DownloadManager dm = core.getGlobalManager().getDownloadManager( hash );
			
			if ( dm != null ){
						
				return( dm.getTorrent());
			}
		}catch( Throwable e ){
			
			Debug.printStackTrace(e);
		}
	}
	
	return( null );
}
 
开发者ID:thangbn,项目名称:Direct-File-Downloader,代码行数:25,代码来源:TorrentUtils.java

示例3: getSingleton

import com.aelitis.azureus.core.AzureusCore; //导入依赖的package包/类
public static DownloadManagerImpl
getSingleton(
	AzureusCore	azureus_core )
{
	try{
		class_mon.enter();

		if ( singleton == null ){
			
			singleton = new DownloadManagerImpl( azureus_core );
		}
		
		return( singleton );
		
	}finally{
		
		class_mon.exit();
	}
}
 
开发者ID:thangbn,项目名称:Direct-File-Downloader,代码行数:20,代码来源:DownloadManagerImpl.java

示例4: UpdateManagerImpl

import com.aelitis.azureus.core.AzureusCore; //导入依赖的package包/类
protected
UpdateManagerImpl(
	AzureusCore		_azureus_core )
{
	azureus_core	= _azureus_core;
	
	UpdateInstallerImpl.checkForFailedInstalls( this );
	
		// cause the platform manager to register any updateable components
	
	try{
		PlatformManagerFactory.getPlatformManager();
		
	}catch( Throwable e ){
	
	}
}
 
开发者ID:thangbn,项目名称:Direct-File-Downloader,代码行数:18,代码来源:UpdateManagerImpl.java

示例5: getSingleton

import com.aelitis.azureus.core.AzureusCore; //导入依赖的package包/类
public static DDBaseImpl
getSingleton(
	AzureusCore	azureus_core )
{
	try{
		class_mon.enter();

		if ( singleton == null ){
			
			singleton = new DDBaseImpl( azureus_core );
		}
	}finally{
		
		class_mon.exit();
	}
	
	return( singleton );
}
 
开发者ID:thangbn,项目名称:Direct-File-Downloader,代码行数:19,代码来源:DDBaseImpl.java

示例6: PairingManagerTunnelHandler

import com.aelitis.azureus.core.AzureusCore; //导入依赖的package包/类
protected
PairingManagerTunnelHandler(
	PairingManagerImpl	_manager,
	AzureusCore			_core )
{
	manager		= _manager;
	core		= _core;
	
	CryptoManager.SRPParameters params = CryptoManagerFactory.getSingleton().getSRPParameters();
	
	if ( params != null ){
		
		SRP_SALT		= params.getSalt();
		SRP_VERIFIER	= params.getVerifier();
	}
}
 
开发者ID:thangbn,项目名称:Direct-File-Downloader,代码行数:17,代码来源:PairingManagerTunnelHandler.java

示例7: writeTorrentIfExists

import com.aelitis.azureus.core.AzureusCore; //导入依赖的package包/类
private static void writeTorrentIfExists(TOTorrent torrent) {
	if (!AzureusCoreFactory.isCoreRunning()) {
		return;
	}
	AzureusCore core = AzureusCoreFactory.getSingleton();
	if (core == null || !core.isStarted()) {
		return;
	}

	GlobalManager gm = core.getGlobalManager();
	if (gm == null || gm.getDownloadManager(torrent) == null) {
		return;
	}

	try {
		TorrentUtils.writeToFile(torrent);
	} catch (TOTorrentException e) {
		Debug.out(e);
	}
}
 
开发者ID:thangbn,项目名称:Direct-File-Downloader,代码行数:21,代码来源:PlatformTorrentUtils.java

示例8: host

import com.aelitis.azureus.core.AzureusCore; //导入依赖的package包/类
public static void 
 host(
 	AzureusCore		azureus_core,
DownloadManager dm,
Composite 		panel) 
 {
   if(dm == null)
     return;
   TOTorrent torrent = dm.getTorrent();
   if (torrent != null) {
     try {
     	azureus_core.getTrackerHost().hostTorrent(torrent, true, false );
     } catch (TRHostException e) {
       MessageBox mb = new MessageBox(panel.getShell(), SWT.ICON_ERROR | SWT.OK);
       mb.setText(MessageText.getString("MyTorrentsView.menu.host.error.title"));
       mb.setMessage(MessageText.getString("MyTorrentsView.menu.host.error.message").concat("\n").concat(e.toString()));
       mb.open();
     }
   }
 }
 
开发者ID:AcademicTorrents,项目名称:AcademicTorrents-Downloader,代码行数:21,代码来源:ManagerUtils.java

示例9: publish

import com.aelitis.azureus.core.AzureusCore; //导入依赖的package包/类
public static void 
publish(
		AzureusCore		azureus_core,
DownloadManager dm,
Composite		 panel) 
{
  if(dm == null)
   return;
  TOTorrent torrent = dm.getTorrent();
  if (torrent != null) {
    try {
    	azureus_core.getTrackerHost().publishTorrent(torrent);
    } catch (TRHostException e) {
      MessageBox mb = new MessageBox(panel.getShell(), SWT.ICON_ERROR | SWT.OK);
      mb.setText(MessageText.getString("MyTorrentsView.menu.host.error.title"));
      mb.setMessage(MessageText.getString("MyTorrentsView.menu.host.error.message").concat("\n").concat(e.toString()));
      mb.open();
    }
  }
}
 
开发者ID:AcademicTorrents,项目名称:AcademicTorrents-Downloader,代码行数:21,代码来源:ManagerUtils.java

示例10: addExistingDatasources

import com.aelitis.azureus.core.AzureusCore; //导入依赖的package包/类
/**
 * Add datasources already in existance before we called addListener.
 * Faster than allowing addListener to call us one datasource at a time. 
 * @param core 
 */
private void addExistingDatasources(AzureusCore core) {
	if (tv.isDisposed()) {
		return;
	}

	ArrayList<PEPeer> sources = new ArrayList<PEPeer>();
	Iterator<?> itr = core.getGlobalManager().getDownloadManagers().iterator();
	while (itr.hasNext()) {
		PEPeer[] peers = ((DownloadManager)itr.next()).getCurrentPeers();
		if (peers != null) {
			sources.addAll(Arrays.asList(peers));
		}
	}
	if (sources.isEmpty()) {
		return;
	}
	
	tv.addDataSources(sources.toArray(new PEPeer[sources.size()]));
	tv.processDataSourceQueue();
}
 
开发者ID:AcademicTorrents,项目名称:AcademicTorrents-Downloader,代码行数:26,代码来源:PeersSuperView.java

示例11: MyTorrentsView

import com.aelitis.azureus.core.AzureusCore; //导入依赖的package包/类
/**
 * Initialize
 * 
 * @param _azureus_core
 * @param isSeedingView
 * @param basicItems
 * @param cCats 
 */
public 
MyTorrentsView(
		AzureusCore			_azureus_core,
		String				tableID,
		boolean 			isSeedingView,
		TableColumnCore[]	basicItems,
		Text 				txtFilter, 
		Composite 			cCats,
		boolean				supportsTabs ) 
{
super("MyTorrentsView");
this.txtFilter = txtFilter;
this.cCategories = cCats;
this.supportsTabs = supportsTabs;
init(_azureus_core, tableID, isSeedingView, isSeedingView
		? DownloadTypeComplete.class : DownloadTypeIncomplete.class, basicItems);
}
 
开发者ID:AcademicTorrents,项目名称:AcademicTorrents-Downloader,代码行数:26,代码来源:MyTorrentsView.java

示例12: tableViewInitialized

import com.aelitis.azureus.core.AzureusCore; //导入依赖的package包/类
public void tableViewInitialized() {
	AzureusCoreFactory.addCoreRunningListener(new AzureusCoreRunningListener() {
		public void azureusCoreRunning(AzureusCore core) {
			createRows(core);
		}
	});

	if ( dropTarget == null ){
		dropTarget = tv.createDropTarget(DND.DROP_DEFAULT | DND.DROP_MOVE
				| DND.DROP_COPY | DND.DROP_LINK | DND.DROP_TARGET_MOVE);
		if (dropTarget != null) {
			dropTarget.setTransfer(new Transfer[] { HTMLTransfer.getInstance(),
					URLTransfer.getInstance(), FileTransfer.getInstance(),
					TextTransfer.getInstance() });

			dropTarget.addDropListener(new DropTargetAdapter() {
				public void drop(DropTargetEvent event) {
					if (!share(event.data)) {
						TorrentOpener.openDroppedTorrents(event, true);
					}
				}
			});
		};
	}
}
 
开发者ID:AcademicTorrents,项目名称:AcademicTorrents-Downloader,代码行数:26,代码来源:MySharesView.java

示例13: defaultSelected

import com.aelitis.azureus.core.AzureusCore; //导入依赖的package包/类
public void defaultSelected(TableRowCore[] rows, int stateMask) {
	final TRHostTorrent torrent = (TRHostTorrent) tv.getFirstSelectedDataSource();
	if (torrent == null)
		return;
	CoreWaiterSWT.waitForCoreRunning(new AzureusCoreRunningListener() {
	
		public void azureusCoreRunning(AzureusCore core) {
			DownloadManager dm = core.getGlobalManager().getDownloadManager(
					torrent.getTorrent());
			if (dm != null) {
				UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
				if (uiFunctions != null) {
					uiFunctions.openView(UIFunctions.VIEW_DM_DETAILS, dm);
				}
			}
		}
	});
}
 
开发者ID:AcademicTorrents,项目名称:AcademicTorrents-Downloader,代码行数:19,代码来源:MyTrackerView.java

示例14: 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

示例15: initialize

import com.aelitis.azureus.core.AzureusCore; //导入依赖的package包/类
/**
 * @param ui
 *
 * @since 3.0.2.3
 */

public static void 
initialize(
	AzureusCore		core,
	String 			ui )
{
	if ( ui.equals( "az3") && !"0".equals(System.getProperty("azureus.loadplugins"))) {
		
		/* EMP is no longer auto-install
		if ( UpdaterUtils.ensurePluginPresent(
				"azemp",
				"com.azureus.plugins.azemp.EmbeddedMediaPlayerPlugin",
				"Embedded Media Player" )){
		
				// rescan if we've done anything  
			
			core.getPluginManager().refreshPluginList();
		}
		*/
	}
}
 
开发者ID:AcademicTorrents,项目名称:AcademicTorrents-Downloader,代码行数:27,代码来源:PreUpdateChecker.java


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