类 ProxyRestTemplateObject

java.lang.Object
org.apache.commons.pool2.impl.DefaultPooledObject<org.springframework.web.client.RestTemplate>
net.jlxxw.http.spider.proxy.ProxyRestTemplateObject
所有已实现的接口:
Comparable<org.apache.commons.pool2.PooledObject<org.springframework.web.client.RestTemplate>>, org.apache.commons.pool2.PooledObject<org.springframework.web.client.RestTemplate>, org.springframework.beans.factory.DisposableBean

public class ProxyRestTemplateObject extends org.apache.commons.pool2.impl.DefaultPooledObject<org.springframework.web.client.RestTemplate> implements org.springframework.beans.factory.DisposableBean
作者:
chunyang.leng
  • 构造器概要

    构造器
    构造器
    说明
    ProxyRestTemplateObject(org.springframework.web.client.RestTemplate object, AbstractProxyHostProducer abstractProxyHostProducer, org.apache.hc.core5.http.HttpHost host)
    Create a new instance that wraps the provided object so that the pool can track the state of the pooled object.
  • 方法概要

    修饰符和类型
    方法
    说明
    void
     
    org.apache.hc.core5.http.HttpHost
     
    org.springframework.web.client.RestTemplate
     
    boolean
     
    boolean
     
    void
    setDelete(boolean delete)
     
    boolean
     

    从类继承的方法 org.apache.commons.pool2.impl.DefaultPooledObject

    allocate, compareTo, deallocate, endEvictionTest, getActiveTimeMillis, getBorrowedCount, getCreateInstant, getCreateTime, getIdleDuration, getIdleTime, getIdleTimeMillis, getLastBorrowInstant, getLastBorrowTime, getLastReturnInstant, getLastReturnTime, getLastUsedInstant, getLastUsedTime, getObject, getState, invalidate, markAbandoned, markReturning, printStackTrace, setLogAbandoned, setRequireFullStackTrace, startEvictionTest, toString, use

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    从接口继承的方法 org.apache.commons.pool2.PooledObject

    equals, getActiveDuration, getActiveTime, hashCode
  • 构造器详细资料

    • ProxyRestTemplateObject

      public ProxyRestTemplateObject(org.springframework.web.client.RestTemplate object, AbstractProxyHostProducer abstractProxyHostProducer, org.apache.hc.core5.http.HttpHost host)
      Create a new instance that wraps the provided object so that the pool can track the state of the pooled object.
      参数:
      object - The object to wrap
  • 方法详细资料

    • getRestTemplate

      public org.springframework.web.client.RestTemplate getRestTemplate()
    • validate

      public boolean validate()
    • setDelete

      public void setDelete(boolean delete)
    • isDelete

      public boolean isDelete()
    • isProxy

      public boolean isProxy()
    • getHost

      public org.apache.hc.core5.http.HttpHost getHost()
    • destroy

      public void destroy() throws Exception
      指定者:
      destroy 在接口中 org.springframework.beans.factory.DisposableBean
      抛出:
      Exception