Methods Summary |
---|
public void | addCategoryListener(org.gudy.azureus2.core3.category.CategoryListener l)
category_listeners.addListener( l );
|
public void | addManager(DownloadManagerState manager_state)
if (manager_state.getCategory() != this) {
manager_state.setCategory(this);
// we will be called again by CategoryManager.categoryChange
return;
}
DownloadManager manager = manager_state.getDownloadManager();
if (!managers.contains(manager)) {
managers.add(manager);
manager.addRateLimiter( upload_limiter, true );
manager.addRateLimiter( download_limiter, false );
category_listeners.dispatch(LDT_CATEGORY_DMADDED, manager);
}
|
public int | compareTo(java.lang.Object b)
boolean aTypeIsUser = type == Category.TYPE_USER;
boolean bTypeIsUser = ((Category)b).getType() == Category.TYPE_USER;
if (aTypeIsUser == bTypeIsUser)
return sName.compareToIgnoreCase(((Category)b).getName());
if (aTypeIsUser)
return 1;
return -1;
|
public java.util.List | getDownloadManagers()
return managers;
|
public int | getDownloadSpeed()
return( download_speed );
|
public java.lang.String | getName()
return sName;
|
public int | getType()
return type;
|
public int | getUploadSpeed()
return( upload_speed );
|
public void | removeCategoryListener(org.gudy.azureus2.core3.category.CategoryListener l)
category_listeners.removeListener( l );
|
public void | removeManager(DownloadManagerState manager_state)
if (manager_state.getCategory() == this) {
manager_state.setCategory(null);
// we will be called again by CategoryManager.categoryChange
return;
}
DownloadManager manager = manager_state.getDownloadManager();
if (managers.contains(manager) || type != Category.TYPE_USER) {
managers.remove(manager);
manager.removeRateLimiter( upload_limiter, true );
manager.removeRateLimiter( download_limiter, false );
category_listeners.dispatch( LDT_CATEGORY_DMREMOVED, manager );
}
|
public void | setDownloadSpeed(int speed)
if ( download_speed != speed ){
download_speed = speed;
CategoryManagerImpl.getInstance().saveCategories();
}
|
public void | setUploadSpeed(int speed)
if ( upload_speed != speed ){
upload_speed = speed;
CategoryManagerImpl.getInstance().saveCategories();
}
|