AndBase开发框架  1.5.7
 全部  命名空间 文件 函数 变量 枚举值 
Public 成员函数 | 静态 Public 成员函数 | Protected 成员函数 | Private 属性 | 静态 Private 属性 | 所有成员列表
com.ab.bitmap.AbImageDownloadPool类 参考

Public 成员函数

void download (final AbImageDownloadItem item)
 
void shutdownNow ()
 
void shutdown ()
 
void listenShutdown ()
 

静态 Public 成员函数

static AbImageDownloadPool getInstance ()
 

Protected 成员函数

 AbImageDownloadPool (int nThreads)
 

Private 属性

ExecutorService executorService = null
 

静态 Private 属性

static String TAG = "AbImageDownloadPool"
 
static final boolean D = AbAppData.DEBUG
 
static AbImageDownloadPool imageDownload = null
 
static int nThreads = 3
 
static Handler handler
 

详细描述

Copyright (c) 2012 All rights reserved 名称:AbImageDownload.java 描述:线程池图片下载

作者
zhaoqp
日期
:2013-5-23 上午10:10:53
版本
v1.0

构造及析构函数说明

com.ab.bitmap.AbImageDownloadPool.AbImageDownloadPool ( int  nThreads)
inlineprotected

构造图片下载器.

参数
nThreadsthe n threads

成员函数说明

void com.ab.bitmap.AbImageDownloadPool.download ( final AbImageDownloadItem  item)
inline

Download.

参数
itemthe item
static AbImageDownloadPool com.ab.bitmap.AbImageDownloadPool.getInstance ( )
inlinestatic

单例构造图片下载器.

返回
single instance of AbImageDownloadPool
void com.ab.bitmap.AbImageDownloadPool.listenShutdown ( )
inline

描述:关闭监听.

void com.ab.bitmap.AbImageDownloadPool.shutdown ( )
inline

描述:平滑关闭.

void com.ab.bitmap.AbImageDownloadPool.shutdownNow ( )
inline

描述:立即关闭.

类成员变量说明

final boolean com.ab.bitmap.AbImageDownloadPool.D = AbAppData.DEBUG
staticprivate

The Constant D.

ExecutorService com.ab.bitmap.AbImageDownloadPool.executorService = null
private

The executor service.

Handler com.ab.bitmap.AbImageDownloadPool.handler
staticprivate
初始值:
= new Handler() {
@Override
public void handleMessage(Message msg) {
AbImageDownloadItem item = (AbImageDownloadItem)msg.obj;
item.listener.update(item.bitmap, item.imageUrl);
}
}

下载完成后的消息句柄.

AbImageDownloadPool com.ab.bitmap.AbImageDownloadPool.imageDownload = null
staticprivate

The image download.

int com.ab.bitmap.AbImageDownloadPool.nThreads = 3
staticprivate

固定3个线程来执行任务 .

String com.ab.bitmap.AbImageDownloadPool.TAG = "AbImageDownloadPool"
staticprivate

The tag.


该类的文档由以下文件生成: