类 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. -
方法概要
从类继承的方法 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
- 指定者:
destroy在接口中org.springframework.beans.factory.DisposableBean- 抛出:
Exception
-