少年阿宾

那些青春的岁月

  BlogJava :: 首页 :: 联系 :: 聚合  :: 管理
  500 Posts :: 0 Stories :: 135 Comments :: 0 Trackbacks

常用链接

留言簿(22)

我参与的团队

搜索

  •  

最新评论

阅读排行榜

评论排行榜

#

//方法一:
package com.abin.lir.axis2.client;
import org.apache.axiom.om.OMAbstractFactory;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMFactory;
import org.apache.axiom.om.OMNamespace;
import org.apache.axis2.AxisFault;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.client.Options;
import org.apache.axis2.client.ServiceClient;
public class UserClient {
public static void main(String[] args) {
try { 
ServiceClient sc = new ServiceClient(); 
Options opts = new Options(); 
opts.setTo(new EndpointReference("http://localhost:9090/universal/services/play")); 
opts.setAction("urn:echo"); 
opts.setTimeOutInMilliSeconds(10000);
sc.setOptions(opts); 
OMElement res = sc.sendReceive(createPayLoad()); 
System.out.println(res); 
} catch (AxisFault e) { 
e.printStackTrace(); 
}
public static OMElement createPayLoad(){ 
OMFactory fac = OMAbstractFactory.getOMFactory(); 
OMNamespace omNs = fac.createOMNamespace("http://localhost:9090/universal/services/play", "nsl"); 
OMElement method = fac.createOMElement("getPassengerInfos",omNs); 
OMElement value = fac.createOMElement("userID",omNs); 
value.setText("1024"); 
method.addChild(value); 
return method; 
}





//方法二
package com.abin.lir.axis2.client;
import javax.xml.namespace.QName;
import org.apache.axis2.AxisFault;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.client.Options;
import org.apache.axis2.rpc.client.RPCServiceClient;
public class RPCClient {
public static void main(String[] args) throws AxisFault {
 // 使用RPC方式调用WebService         
        RPCServiceClient serviceClient = new RPCServiceClient(); 
        Options options = serviceClient.getOptions(); 
        // 指定调用WebService的URL 
        EndpointReference targetEPR = new EndpointReference( 
                "http://localhost:9090/universal/services/play"); 
        options.setTo(targetEPR); 
        // 指定方法的参数值 
        Object[] requestParam = new Object[] {"1024"}; 
        // 指定方法返回值的数据类型的Class对象 
        Class[] responseParam = new Class[] {String.class}; 
        // 指定要调用的getGreeting方法及WSDL文件的命名空间 
        QName requestMethod = new QName("http://localhost:9090/universal/services/play", "getPassengerInfos"); 
        // 调用方法并输出该方法的返回值 
        try {
System.out.println(serviceClient.invokeBlocking(requestMethod, requestParam, responseParam)[0]);
} catch (AxisFault e) {
e.printStackTrace();
}
}




//方法三
package com.abin.lir.axis2.client;
import org.apache.axiom.om.OMAbstractFactory;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMFactory;
import org.apache.axiom.om.OMNamespace;
import org.apache.axis2.Constants;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.client.Options;
import org.apache.axis2.client.ServiceClient;
public class AXIOMClient {
private static EndpointReference targetEPR = new EndpointReference(
"http://localhost:9090/universal/services/play");
public static OMElement getPassengerInfos(String symbol) {
OMFactory fac = OMAbstractFactory.getOMFactory();
OMNamespace omNs = fac.createOMNamespace(
"http://localhost:9090/universal/services/play",
"tns");
OMElement method = fac.createOMElement("getPassengerInfos", omNs);
OMElement value = fac.createOMElement("userID", omNs);
value.addChild(fac.createOMText(value, symbol));
method.addChild(value);
return method;
}
public static void main(String[] args) {
try {
OMElement getPassenger = getPassengerInfos("1024");
Options options = new Options();
options.setTo(targetEPR);
options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
ServiceClient sender = new ServiceClient();
sender.setOptions(options);
OMElement result = sender.sendReceive(getPassenger);
String response = result.getFirstElement().getText();
System.err.println("Current passengers: " + response);
} catch (Exception e) {
e.printStackTrace();
}
}
}
posted @ 2013-01-20 23:26 abin 阅读(9310) | 评论 (0)编辑 收藏

http://blog.csdn.net/leo821031/article/details/1545974
http://zhangjunhd.blog.51cto.com/113473/25592/
http://hi.baidu.com/lennydou/item/b57032c0ceb6f5b00c0a7b08
http://www.cnblogs.com/markxue/archive/2012/09/01/2667123.html
http://www.blogjava.net/zhaozhenlin1224/archive/2010/02/03/311783.html
http://blog.csdn.net/yhhah/article/details/4158487






posted @ 2013-01-20 23:23 abin 阅读(514) | 评论 (0)编辑 收藏

Axis2生成客户端方式

基于StockQuoteService类创建客户端的四种方式

构建基于AXIOM的客户端;

使用Axis2 Databinding Frame work(ADB)生成客户端;

使用XMLBeans生成客户端;

使用JiBX生成客户端。

ADB:最简单的生成Axis客户端的方法。大部分情况下,这些主要的类都会以内部类的形式创建在stub类中。It is not meant to be a full schema bindingapplication, and has difficulty with structures such as XML Schema element extensions and restrictions。 be meant to:有意要、打算
    XMLBeans:与ADB不同,他是一个全功能的schema编译器。他没有ADB的限制。然而,他也比ADB用起来更复杂。他会产成大量的文件,编程模型不如ADB直观。
    JiBX:他是一个数据绑定框架。他不仅提供了WSDL-JAVA的转换,而且提供了JAVA-XML的转换。JiBX相当灵活,允许你选择类来代表你的实体,但是这个却不好做,但还句话说,如果这些都能建好,那么使用JiBX就更使用ADB一样容易。

对于简单应用来说ADB已经够用了,如果想用更加强大更加灵活的功能,那么你可能需要使用其他两种方式。

Axis2提供的四种调用模式

Web services可以用来为用户提供广泛的功能,从简单的、少时间消耗的功能到多时间消耗的业务服务。当我们使用(调用客户端的应用程序)这些Web Service时,我们不能用简单的调用机制来针对那些对时间消耗有很大要求的服务操作。例如,如果我们使用一个简单的传输通道(如HTTP)并使用IN-OUT模式来调用一个需要很长时间来完成的Web Service,那么多数情况下,我们得到的结果将是"connection time outs"。另一方面,如果我们从一个简单的客户端应用程序调用一个同步的服务,使用"blocking"的客户端API将会降低客户端应用程序的性能。现在来分析一下一些常用的服务调用形式。

许多Web Service引擎提供给客户Blocking和Non-Blocking的客户端APIs。

1)Blocking API-一旦服务被启用,客户端的应用程序将被挂起,直到operation被执行完毕(表现为收到一个response或fault),才能重新获得控制权。这是调用Web Service最简单的方式,并且这种方式适用于多数业务情形。

2)Non-Blocking API-这是一个回叫或轮询机制的API。因此,一旦服务被起用,客户端应用程序马上得到控制权,通过使用一个callback对象来获得response。这种方式使得客户端应用程序可以很方便的同步启用多个Web Service。

这两种机制都是工作在API层面上的。称将通过使用Non-Blocking API而产生的异步行为方式为API Level 异步。这两种机制都使用单一的传输连接来发送request和接收response。它们的性能远远落后于使用两个传输连接来发送request和接收response(不管是单工还是双工)。所以这两种机制都不能解决需要长时间处理的事务的传输问题(在operation处理完成之前,很有可能你的连接已经超时了)。一种可能的解决方法是使用两个独立的传输连接来发送和接收request&response。这种异步行为,我们称为Transport Level 异步。

通过组合API Level异步和Transport Level 异步,我们可以得到四种调用模式。如下所示。

API (Blocking/Non-Blocking)

Dual Transports (Yes/No)

Description

Blocking

No

最简单和常用的调用模式

Non-Blocking

No

使用回叫或轮询机制

Blocking

Yes

在单工模式下,service operation为IN-OUT时,很有用。(如SMTP)

Non-Blocking

Yes

此模式下的异步效果最大

Axis2提供了所有上述4种调用Web Service的实现方式。

posted @ 2013-01-20 20:13 abin 阅读(1993) | 评论 (0)编辑 收藏

http://www.blogjava.net/alex0927/archive/2008/06/20/209474.html
http://blog.sina.com.cn/s/blog_4fb27fd80100ohyr.html
posted @ 2013-01-18 23:47 abin 阅读(396) | 评论 (0)编辑 收藏

node.selectNodes("//xml");
node.selectNodes("/xml");
node.selectNodes("xml");
这三个写法有什么区别

问题补充:

不是很明白
就举个例子吧
<root>
<xml>1</xml>
<node>
<xml>2</xml>
<AAA>
<xml>3</xml>
</AAA>
</node>
</root>
从node搜索的话,这三种方法分别能搜到1、2、3中的哪几个?




nodename  选取此节点的所有子节点
/ 从根节点选取
// 从匹配选择的当前节点选择文档中的节点,而不考虑它们的位置

参考资料:http://www.w3school.com.cn/xpath/xpath_syntax.asp

posted @ 2013-01-18 20:34 abin 阅读(2482) | 评论 (0)编辑 收藏

 Java所有的类都具有线程的潜力,Java赋予的每个对象一个锁,在计算机内部工作在同一时间,只有一个对象可以持有锁,也就是说程序在同一时间只有一个程序可以运行,这里我把对象比作是一个小的程序。而多处理器,那么就另当别论了。

      在这里我们首先学习一下公共方法wait,notify,notifyAll。

      wait方法可以使在当前线程的对象等待,直到别的线程调用此对象的notify或notifyAll方法(注意:调用的是此对象的notify和notifyAll),并且当前运行的线程必须具有此对象的对象监视器

package com.abin.lee.thread.thread;

public class CarryTask extends Thread {
 public void run() {
        try {
            synchronized (this) {
                Thread t = Thread.currentThread();
                System.out.println(t.getId() + t.getName() + ":task start, wait for notify...");
                this.wait();
                System.out.println(t.getId() + t.getName() + ":task continue...");
            }
        } catch (InterruptedException ex) {
           System.out.println(CarryTask.class.getName());
        }
    }


}





package com.abin.lee.thread.thread;

public class CarryWait {
 public static void main(String[] args) throws InterruptedException {
  CarryTask task = new CarryTask();
  Thread t = Thread.currentThread();
  System.out.println(t.getId() + t.getName() + ":task start...");
  task.start();
  Thread.sleep(2000);
  synchronized (task) {
   System.out.println("id="+Thread.currentThread().getId()+",Name="+Thread.currentThread().getName()+",task="+task+",notify");
   task.notify();
  }
 }

}





http://www.iteye.com/topic/1124814
posted @ 2013-01-16 23:46 abin 阅读(399) | 评论 (0)编辑 收藏

 今天试着把SpringMVC与fastjson整合了下,经测试也能解决json含中文乱码的问题,特此分享之。我也是初用,详细文档请见官网
public class MappingFastJsonHttpMessageConverter extends 
        AbstractHttpMessageConverter<Object> { 
    public static final Charset DEFAULT_CHARSET = Charset.forName("UTF-8"); 
 
    private SerializerFeature[] serializerFeature; 
 
    public SerializerFeature[] getSerializerFeature() { 
        return serializerFeature; 
    } 
 
    public void setSerializerFeature(SerializerFeature[] serializerFeature) { 
        this.serializerFeature = serializerFeature; 
    } 
 
    public MappingFastJsonHttpMessageConverter() { 
        super(new MediaType("application", "json", DEFAULT_CHARSET)); 
    } 
 
    @Override 
    public boolean canRead(Class<?> clazz, MediaType mediaType) { 
        return true; 
    } 
 
    @Override 
    public boolean canWrite(Class<?> clazz, MediaType mediaType) { 
        return true; 
    } 
 
    @Override 
    protected boolean supports(Class<?> clazz) { 
        throw new UnsupportedOperationException(); 
    } 
 
    @Override 
    protected Object readInternal(Class<?> clazz, HttpInputMessage inputMessage) 
    throws IOException, HttpMessageNotReadableException { 
        ByteArrayOutputStream baos = new ByteArrayOutputStream(); 
        int i; 
        while ((i = inputMessage.getBody().read()) != -1) { 
            baos.write(i); 
        } 
        return JSON.parseArray(baos.toString(), clazz); 
    } 
 
    @Override 
    protected void writeInternal(Object o, HttpOutputMessage outputMessage) 
    throws IOException, HttpMessageNotWritableException { 
        String jsonString = JSON.toJSONString(o, serializerFeature); 
        OutputStream out = outputMessage.getBody(); 
        out.write(jsonString.getBytes(DEFAULT_CHARSET)); 
        out.flush(); 
    } 




SpringMVC关键配置:
<mvc:annotation-driven> 
    <mvc:message-converters register-defaults="true">        
        <!-- fastjosn spring support --> 
        <bean id="jsonConverter" class="com.alibaba.fastjson.spring.support.MappingFastJsonHttpMessageConverter"> 
            <property name="supportedMediaTypes" value="application/json" /> 
            <property name="serializerFeature"> 
                <list> 
                    <value>WriteMapNullValue</value> 
                    <value>QuoteFieldNames</value> 
                </list> 
            </property> 
        </bean> 
    </mvc:message-converters> 
</mvc:annotation-driven> 


http://xyly624.blog.51cto.com/842520/896704
posted @ 2013-01-12 23:56 abin 阅读(5300) | 评论 (1)编辑 收藏

//实例一,这里面用到了信号量Semaphore和FutureTask

package net.abin.lee.mythread.callable;

import java.util.concurrent.Callable;
import java.util.concurrent.Semaphore;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantReadWriteLock;

public class FutureGo implements Callable<String> {
 private String message;
 private static final Semaphore semaphore=new Semaphore(3);
 private final ReentrantReadWriteLock rwl=new ReentrantReadWriteLock();
 public FutureGo(String message) {
  this.message = message;
 }

 public String call() throws InterruptedException {
  semaphore.acquire();
  Lock read=rwl.readLock();
  Lock write=rwl.readLock();
  read.lock();  
  System.out.println("message"+message+",Name"+Thread.currentThread().getName()+"进来了");
  read.unlock();
  write.lock();
  String result=message+"你好!";
  Thread.sleep(1000);
  System.out.println("message"+message+"Name"+Thread.currentThread().getName()+"离开了");
  write.unlock();
  semaphore.release();
  return result;
 }
}



//FutureTaskTest.java

package net.abin.lee.mythread.callable;

import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.FutureTask;

public class FutureTaskTest {
 public static void main(String[] args) throws InterruptedException,
   ExecutionException {
  Callable<String> go = new FutureGo("abin");
  FutureTask<String> task = new FutureTask<String>(go);
  ExecutorService executor = Executors.newCachedThreadPool();
  if (!executor.isShutdown()) {
   executor.execute(task);
  }
  String result = "";
  if (!task.isDone()) {
   result = (String) task.get();
   System.out.println("result=" + result);
  }
   executor.shutdown();
 }

}






//实例一,这里面用到了信号量Semaphore和FutureTask

posted @ 2013-01-10 14:17 abin 阅读(667) | 评论 (0)编辑 收藏

package com.abin.lee.junit.httpasyncclient.example;

import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
 
 import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.conn.ClientConnectionManager;
import org.apache.http.conn.params.ConnManagerParams;
import org.apache.http.conn.scheme.PlainSocketFactory;
import org.apache.http.conn.scheme.Scheme;
import org.apache.http.conn.scheme.SchemeRegistry;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.impl.conn.PoolingClientConnectionManager;
import org.apache.http.params.BasicHttpParams;
import org.apache.http.params.HttpConnectionParams;
import org.apache.http.params.HttpParams;
import org.apache.http.protocol.BasicHttpContext;
import org.apache.http.protocol.HttpContext;
import org.apache.http.util.EntityUtils;
import org.junit.Test;
 
 public class ThreadPoolHttpClient {
     // 线程池
     private ExecutorService exe = null;
     // 线程池的容量
     private static final int POOL_SIZE = 20;
     private HttpClient client = null;
     String[] urls=null;
     public ThreadPoolHttpClient(String[] urls){
         this.urls=urls;
     }
     @Test
     public void test() throws Exception {
         exe = Executors.newFixedThreadPool(POOL_SIZE);
         HttpParams params =new BasicHttpParams();
         /* 从连接池中取连接的超时时间 */
         ConnManagerParams.setTimeout(params, 1000);
        /* 连接超时 */
         HttpConnectionParams.setConnectionTimeout(params, 2000);
         /* 请求超时 */
         HttpConnectionParams.setSoTimeout(params, 4000);
         SchemeRegistry schemeRegistry = new SchemeRegistry();
        schemeRegistry.register(
                 new Scheme("http", 80, PlainSocketFactory.getSocketFactory()));
 
         //ClientConnectionManager cm = new PoolingClientConnectionManager(schemeRegistry);
         PoolingClientConnectionManager cm=new PoolingClientConnectionManager(schemeRegistry);
         cm.setMaxTotal(10);
         final HttpClient httpClient = new DefaultHttpClient(cm,params);
 
         // URIs to perform GETs on
         final String[] urisToGet = urls;
         /* 有多少url创建多少线程,url多时机子撑不住
56         // create a thread for each URI
57         GetThread[] threads = new GetThread[urisToGet.length];
58         for (int i = 0; i < threads.length; i++) {
59             HttpGet httpget = new HttpGet(urisToGet[i]);
60             threads[i] = new GetThread(httpClient, httpget);           
61         }
62         // start the threads
63         for (int j = 0; j < threads.length; j++) {
64             threads[j].start();
65         }
66
67         // join the threads,等待所有请求完成
68         for (int j = 0; j < threads.length; j++) {
69             threads[j].join();
70         }
71         使用线程池*/
         for (int i = 0; i < urisToGet.length; i++) {
             final int j=i;
             System.out.println(j);
             HttpGet httpget = new HttpGet(urisToGet[i]);
             exe.execute( new GetThread(httpClient, httpget));
         }
        
        
         //创建线程池,每次调用POOL_SIZE
         /*
         for (int i = 0; i < urisToGet.length; i++) {
             final int j=i;
             System.out.println(j);
             exe.execute(new Thread() {
                 @Override
                 public void run() {
                     this.setName("threadsPoolClient"+j);
                    
                         try {
                             this.sleep(100);
                             System.out.println(j);
                         } catch (InterruptedException e) {
                             // TODO Auto-generated catch block
                             e.printStackTrace();
                         }
                        
                         HttpGet httpget = new HttpGet(urisToGet[j]);
                         new GetThread(httpClient, httpget).get();
                     }
                    
                    
                
             });
         }
        
         */
         //exe.shutdown();
         System.out.println("Done");
     }
     static class GetThread extends Thread{
        
         private final HttpClient httpClient;
         private final HttpContext context;
         private final HttpGet httpget;
        
         public GetThread(HttpClient httpClient, HttpGet httpget) {
             this.httpClient = httpClient;
             this.context = new BasicHttpContext();
             this.httpget = httpget;
         }
         @Override
         public void run(){
             this.setName("threadsPoolClient");
             try {
                 Thread.sleep(5000);
             } catch (InterruptedException e) {
                 // TODO Auto-generated catch block
                 e.printStackTrace();
             }
             get();
         }
        
         public void get() {
             try {
                 HttpResponse response = this.httpClient.execute(this.httpget, this.context);
                 HttpEntity entity = response.getEntity();
                 if (entity != null) {
                     System.out.println(this.httpget.getURI()+": status"+response.getStatusLine().toString());
                 }
                 // ensure the connection gets released to the manager
                 EntityUtils.consume(entity);
             } catch (Exception ex) {
                 this.httpget.abort();
             }finally{
                 httpget.releaseConnection();
             }
         }
     }
 }

posted @ 2013-01-08 23:51 abin 阅读(3013) | 评论 (0)编辑 收藏

package com.abin.lee.junit.httpasyncclient.service;

import java.io.BufferedWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.util.Map;

import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class HttpAsyncClientService extends HttpServlet{
 private static final long serialVersionUID = 807336917776643578L;

 @SuppressWarnings("rawtypes")
 public void service(HttpServletRequest request,HttpServletResponse response) throws IOException{
  Map map=request.getParameterMap();
  String id=(String)((Object[])map.get("id"))[0].toString();
  if(null!=id&&!"".equals(id)){
   String result=id+" is response";
   System.out.println("result="+result);
   ServletOutputStream out=response.getOutputStream();
   BufferedWriter writer=new BufferedWriter(new OutputStreamWriter(out,"UTF-8"));
   writer.write(result);
   writer.flush();
   writer.close();
  }else{
   String result=id+" is null";
   System.out.println("result="+result);
   ServletOutputStream out=response.getOutputStream();
   BufferedWriter writer=new BufferedWriter(new OutputStreamWriter(out,"UTF-8"));
   writer.write(result);
   writer.flush();
   writer.close();
  }
 }
}





<servlet>
  <servlet-name>HttpAsyncClientService</servlet-name>
  <servlet-class>com.abin.lee.junit.httpasyncclient.service.HttpAsyncClientService</servlet-class>
 </servlet>
 <servlet-mapping>
  <servlet-name>HttpAsyncClientService</servlet-name>
  <url-pattern>/HttpAsyncClientService</url-pattern>
 </servlet-mapping>







package com.abin.lee.junit.httpasyncclient.example;

import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Future;

import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.concurrent.FutureCallback;
import org.apache.http.impl.nio.client.DefaultHttpAsyncClient;
import org.apache.http.nio.client.HttpAsyncClient;
import org.apache.http.params.CoreConnectionPNames;
import org.apache.http.util.EntityUtils;

public class CreateAsyncClientHttpExchangeFutureCallback {
  public static void main(String[] args) throws Exception {
         HttpAsyncClient httpclient = new DefaultHttpAsyncClient();
         httpclient.getParams()
             .setIntParameter(CoreConnectionPNames.SO_TIMEOUT, 3000)
             .setIntParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, 3000)
             .setIntParameter(CoreConnectionPNames.SOCKET_BUFFER_SIZE, 8 * 1024)
             .setBooleanParameter(CoreConnectionPNames.TCP_NODELAY, true);

         httpclient.start();
         try {
             HttpGet[] requests = new HttpGet[] {
                     new HttpGet("http://localhost:7000/global/HttpAsyncClientService?id=6"),
                     new HttpGet("http://localhost:7000/global/HttpAsyncClientService?id=8"),
                     new HttpGet("http://localhost:7000/global/HttpAsyncClientService?id=5")
             };
             final CountDownLatch latch = new CountDownLatch(requests.length);
             for (final HttpGet request: requests) {
                 httpclient.execute(request, new FutureCallback<HttpResponse>() {

                     public void completed(final HttpResponse response) {
                         latch.countDown();
                         System.out.println(request.getRequestLine() + "->" + response.getStatusLine());
                     }

                     public void failed(final Exception ex) {
                         latch.countDown();
                         System.out.println(request.getRequestLine() + "->" + ex);
                     }

                     public void cancelled() {
                         latch.countDown();
                         System.out.println(request.getRequestLine() + " cancelled");
                     }

                 });
                 Future<HttpResponse> future = httpclient.execute(request, null);
                 HttpResponse response = future.get();
                 System.out.println("Response: " + response.getStatusLine());
                 System.out.println("Response1: " + EntityUtils.toString(response.getEntity()));
             }
             latch.await();
             System.out.println("Shutting down");
         } finally {
             httpclient.shutdown();
         }
         System.out.println("Done");
     }
  public static String AsyncHttp(){
  
   return null;
  }
}









posted @ 2013-01-08 23:16 abin 阅读(3184) | 评论 (0)编辑 收藏

仅列出标题
共50页: First 上一页 16 17 18 19 20 21 22 23 24 下一页 Last