-
大小: 7.39MB文件类型: .zip金币: 1下载: 0 次发布日期: 2023-10-15
- 语言: Java
- 标签: android HttpClient jar包
资源简介
android HttpClient所需要的4.5.2的jar包,以及对应的源代码,供调试android基于HttpClient协议的上传和下载使用
代码片段和文件信息
/*
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License Version 2.0 (the
* “License“); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing
* software distributed under the License is distributed on an
* “AS IS“ BASIS WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation please see
* .
*
*/
package org.apache.http.client.fluent;
import java.util.linkedList;
import java.util.Queue;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import org.apache.http.concurrent.FutureCallback;
/**
* This example demonstrates how the he HttpClient fluent API can be used to execute multiple
* requests asynchronously using background threads.
*/
public class FluentAsync {
public static void main(String[] args)throws Exception {
// Use pool of two threads
ExecutorService threadpool = Executors.newFixedThreadPool(2);
Async async = Async.newInstance().use(threadpool);
Request[] requests = new Request[] {
Request.Get(“http://www.google.com/“)
Request.Get(“http://www.yahoo.com/“)
Request.Get(“http://www.apache.com/“)
Request.Get(“http://www.apple.com/“)
};
Queue> queue = new linkedList>();
// Execute requests asynchronously
for (final Request request: requests) {
Future future = async.execute(request new FutureCallback() {
@Override
public void failed(final Exception ex) {
System.out.println(ex.getMessage() + “: “ + request);
}
@Override
public void completed(final Content content) {
System.out.println(“Request completed: “ + request);
}
@Override
public void cancelled() {
}
});
queue.add(fut
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2016-03-15 13:46 JarAndSource\
目录 0 2016-03-15 13:43 JarAndSource\httpcomponents-client-4.5.2-bin\
目录 0 2016-02-21 17:12 JarAndSource\httpcomponents-client-4.5.2-bin\httpcomponents-client-4.5.2\
目录 0 2016-02-21 17:12 JarAndSource\httpcomponents-client-4.5.2-bin\httpcomponents-client-4.5.2\examples\
目录 0 2016-02-21 16:57 JarAndSource\httpcomponents-client-4.5.2-bin\httpcomponents-client-4.5.2\examples\org\
目录 0 2016-02-21 16:57 JarAndSource\httpcomponents-client-4.5.2-bin\httpcomponents-client-4.5.2\examples\org\apache\
目录 0 2016-02-21 16:57 JarAndSource\httpcomponents-client-4.5.2-bin\httpcomponents-client-4.5.2\examples\org\apache\http\
目录 0 2016-02-21 16:58 JarAndSource\httpcomponents-client-4.5.2-bin\httpcomponents-client-4.5.2\examples\org\apache\http\client\
目录 0 2016-02-21 16:58 JarAndSource\httpcomponents-client-4.5.2-bin\httpcomponents-client-4.5.2\examples\org\apache\http\client\fluent\
文件 3313 2016-02-21 16:58 JarAndSource\httpcomponents-client-4.5.2-bin\httpcomponents-client-4.5.2\examples\org\apache\http\client\fluent\FluentAsync.java
文件 3336 2016-02-21 16:58 JarAndSource\httpcomponents-client-4.5.2-bin\httpcomponents-client-4.5.2\examples\org\apache\http\client\fluent\FluentExecutor.java
文件 1847 2016-02-21 16:58 JarAndSource\httpcomponents-client-4.5.2-bin\httpcomponents-client-4.5.2\examples\org\apache\http\client\fluent\FluentQuickStart.java
文件 2782 2016-02-21 16:58 JarAndSource\httpcomponents-client-4.5.2-bin\httpcomponents-client-4.5.2\examples\org\apache\http\client\fluent\FluentRequests.java
文件 4055 2016-02-21 16:58 JarAndSource\httpcomponents-client-4.5.2-bin\httpcomponents-client-4.5.2\examples\org\apache\http\client\fluent\FluentResponseHandling.java
目录 0 2016-02-21 16:57 JarAndSource\httpcomponents-client-4.5.2-bin\httpcomponents-client-4.5.2\examples\org\apache\http\examples\
目录 0 2016-02-21 16:57 JarAndSource\httpcomponents-client-4.5.2-bin\httpcomponents-client-4.5.2\examples\org\apache\http\examples\client\
文件 2451 2016-02-21 16:57 JarAndSource\httpcomponents-client-4.5.2-bin\httpcomponents-client-4.5.2\examples\org\apache\http\examples\client\ClientAbortMethod.java
文件 3014 2016-02-21 16:57 JarAndSource\httpcomponents-client-4.5.2-bin\httpcomponents-client-4.5.2\examples\org\apache\http\examples\client\ClientAuthentication.java
文件 3331 2016-02-21 16:57 JarAndSource\httpcomponents-client-4.5.2-bin\httpcomponents-client-4.5.2\examples\org\apache\http\examples\client\ClientChunkEncodedPost.java
文件 13014 2016-02-21 16:57 JarAndSource\httpcomponents-client-4.5.2-bin\httpcomponents-client-4.5.2\examples\org\apache\http\examples\client\ClientConfiguration.java
文件 3410 2016-02-21 16:57 JarAndSource\httpcomponents-client-4.5.2-bin\httpcomponents-client-4.5.2\examples\org\apache\http\examples\client\ClientConnectionRelease.java
文件 3292 2016-02-21 16:57 JarAndSource\httpcomponents-client-4.5.2-bin\httpcomponents-client-4.5.2\examples\org\apache\http\examples\client\ClientCustomContext.java
文件 4088 2016-02-21 16:57 JarAndSource\httpcomponents-client-4.5.2-bin\httpcomponents-client-4.5.2\examples\org\apache\http\examples\client\ClientCustomPublicSuffixList.java
文件 3341 2016-02-21 16:57 JarAndSource\httpcomponents-client-4.5.2-bin\httpcomponents-client-4.5.2\examples\org\apache\http\examples\client\ClientCustomSSL.java
文件 3695 2016-02-21 16:57 JarAndSource\httpcomponents-client-4.5.2-bin\httpcomponents-client-4.5.2\examples\org\apache\http\examples\client\ClientEvictExpiredConnections.java
文件 2819 2016-02-21 16:57 JarAndSource\httpcomponents-client-4.5.2-bin\httpcomponents-client-4.5.2\examples\org\apache\http\examples\client\ClientExecuteProxy.java
文件 4965 2016-02-21 16:57 JarAndSource\httpcomponents-client-4.5.2-bin\httpcomponents-client-4.5.2\examples\org\apache\http\examples\client\ClientExecuteSOCKS.java
文件 4229 2016-02-21 16:57 JarAndSource\httpcomponents-client-4.5.2-bin\httpcomponents-client-4.5.2\examples\org\apache\http\examples\client\ClientFormLogin.java
文件 4872 2016-02-21 16:57 JarAndSource\httpcomponents-client-4.5.2-bin\httpcomponents-client-4.5.2\examples\org\apache\http\examples\client\ClientMultiThreadedExecution.java
文件 4095 2016-02-21 16:57 JarAndSource\httpcomponents-client-4.5.2-bin\httpcomponents-client-4.5.2\examples\org\apache\http\examples\client\ClientPreemptiveBasicAuthentication.java
文件 4392 2016-02-21 16:57 JarAndSource\httpcomponents-client-4.5.2-bin\httpcomponents-client-4.5.2\examples\org\apache\http\examples\client\ClientPreemptiveDigestAuthentication.java
............此处省略46个文件信息
相关资源
- Android视频播放器(Java源码案例)
- dcm4che相关的jar包
- Android OpenGL入门:绘制三角形和正方形
- Iperf(exe和apk)和使用说明
- android商城源码(菜鸟商城)
- xdoclet-1.2.1完整版jar包
- Android JSON数据格式解析_客户端
- JSON数据格式解析_服务端
- Android手机语音录入软件毕业论文
- Struts2+登录+ 增删改查 源码 (含jar包
- 基于 Android 的个人财务管理系统
- android studio 数据库的增删查改
- 基于Android微博客户端的设计与实现
- android spinner 省份市二级联动
- Spring4 jar包和Spring配置文件
- DJNativeSwing的jar包以及32和64的SWT
- 基于Android蓝牙的遥控智能空调应用研
- android 数独游戏138633
- Android Ibeacon BLE
- 安卓Android开源小说阅读器CoolReader源码
- Android简单的注册登录页面ecplise开发
- Android毕业设计-图书管理系统
- Android显示数学公式MathJax
- Android通过JS在线用webview加载PDF文件(
- Android手电筒(Android studio版本)Flas
- 《Kotlin for Android Developers》 英文原版
- 解决react-native 的 webview 组件不支持
- Google Android应用案例开发大全随书光盘
- mybatis逆向工程工具源代码并包含相关
- android系统签名文件
评论
共有 条评论