本文整理汇总了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" );
}
示例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 );
}
示例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();
}
}
示例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 ){
}
}
示例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 );
}
示例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();
}
}
示例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);
}
}
示例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();
}
}
}
示例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();
}
}
}
示例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();
}
示例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);
}
示例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);
}
}
});
};
}
}
示例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);
}
}
}
});
}
示例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();
}
示例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();
}
*/
}
}