本文整理汇总了Java中com.aelitis.azureus.core.util.AZ3Functions.getProvider方法的典型用法代码示例。如果您正苦于以下问题:Java AZ3Functions.getProvider方法的具体用法?Java AZ3Functions.getProvider怎么用?Java AZ3Functions.getProvider使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.aelitis.azureus.core.util.AZ3Functions
的用法示例。
在下文中一共展示了AZ3Functions.getProvider方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: subscribeToCategory
import com.aelitis.azureus.core.util.AZ3Functions; //导入方法依赖的package包/类
public void
subscribeToCategory(
String cat )
throws BuddyPluginException
{
AZ3Functions.provider az3 = AZ3Functions.getProvider();
if ( az3 == null ){
throw( new BuddyPluginException( "AZ3 subsystem not available" ));
}
try{
az3.subscribeToRSS(
getName() + ": " + cat,
getSubscriptionURL(cat),
15,
false,
getPublicKey() + ":" + cat );
}catch( Throwable e ){
throw( new BuddyPluginException( "Failed to add subscription", e ));
}
}
示例2: defaultSelected
import com.aelitis.azureus.core.util.AZ3Functions; //导入方法依赖的package包/类
public void defaultSelected(TableRowCore[] rows, int stateMask) {
DiskManagerFileInfo fileInfo = (DiskManagerFileInfo) tv.getFirstSelectedDataSource();
if ( fileInfo == null ){
return;
}
String mode = COConfigurationManager.getStringParameter("list.dm.dblclick");
if ( mode.equals("2")){
boolean openMode = COConfigurationManager.getBooleanParameter("MyTorrentsView.menu.show_parent_folder_enabled");
ManagerUtils.open( fileInfo, openMode) ;
}else if ( mode.equals( "3" )){
if ( fileInfo.getAccessMode() == DiskManagerFileInfo.READ ){
Utils.launch(fileInfo);
}
}else{
AZ3Functions.provider az3 = AZ3Functions.getProvider();
if ( az3 != null ){
DownloadManager dm = fileInfo.getDownloadManager();
if ( az3.canPlay(dm, fileInfo.getIndex()) || (stateMask & SWT.CONTROL) != 0 ){
az3.play( dm, fileInfo.getIndex() );
return;
}
}
if ( fileInfo.getAccessMode() == DiskManagerFileInfo.READ ){
Utils.launch(fileInfo);
}
}
}