コード例 #1
0
 public PoolingHttpDestination(HttpClient client, Origin origin) {
   super(client, origin);
   this.connectionPool = newConnectionPool(client);
   addBean(connectionPool);
   Sweeper sweeper = client.getBean(Sweeper.class);
   if (sweeper != null) sweeper.offer(connectionPool);
 }
コード例 #2
0
 @Override
 protected void doStop() throws Exception {
   HttpClient client = getHttpClient();
   Sweeper sweeper = client.getBean(Sweeper.class);
   if (sweeper != null) sweeper.remove(connectionPool);
   super.doStop();
   removeBean(connectionPool);
 }
コード例 #3
0
 @Override
 protected void doStart() throws Exception {
   HttpClient client = getHttpClient();
   this.connectionPool = newConnectionPool(client);
   addBean(connectionPool);
   super.doStart();
   Sweeper sweeper = client.getBean(Sweeper.class);
   if (sweeper != null) sweeper.offer(connectionPool);
 }