类 ProxyRestTemplateFactory
java.lang.Object
org.apache.commons.pool2.BaseObject
org.apache.commons.pool2.BasePooledObjectFactory<ProxyRestTemplateObject>
net.jlxxw.http.spider.proxy.ProxyRestTemplateFactory
- 所有已实现的接口:
org.apache.commons.pool2.PooledObjectFactory<ProxyRestTemplateObject>
public class ProxyRestTemplateFactory
extends org.apache.commons.pool2.BasePooledObjectFactory<ProxyRestTemplateObject>
- 作者:
- chunyang.leng
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明create()Creates an object instance, to be wrapped in aPooledObject.booleanvalidateObject(org.apache.commons.pool2.PooledObject<ProxyRestTemplateObject> p) This implementation always returnstrue.org.apache.commons.pool2.PooledObject<ProxyRestTemplateObject>Wrap the provided instance with an implementation ofPooledObject.从类继承的方法 org.apache.commons.pool2.BasePooledObjectFactory
activateObject, destroyObject, makeObject, passivateObject从类继承的方法 org.apache.commons.pool2.BaseObject
toString, toStringAppendFields从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait从接口继承的方法 org.apache.commons.pool2.PooledObjectFactory
destroyObject
-
构造器详细资料
-
ProxyRestTemplateFactory
public ProxyRestTemplateFactory(org.springframework.beans.factory.BeanFactory beanFactory)
-
-
方法详细资料
-
create
Creates an object instance, to be wrapped in aPooledObject.This method must support concurrent, multi-threaded activation.
- 指定者:
create在类中org.apache.commons.pool2.BasePooledObjectFactory<ProxyRestTemplateObject>- 返回:
- an instance to be served by the pool
- 抛出:
Exception- if there is a problem creating a new instance, this will be propagated to the code requesting an object.
-
wrap
public org.apache.commons.pool2.PooledObject<ProxyRestTemplateObject> wrap(ProxyRestTemplateObject obj) Wrap the provided instance with an implementation ofPooledObject.- 指定者:
wrap在类中org.apache.commons.pool2.BasePooledObjectFactory<ProxyRestTemplateObject>- 参数:
obj- the instance to wrap- 返回:
- The provided instance, wrapped by a
PooledObject
-
validateObject
This implementation always returnstrue.- 指定者:
validateObject在接口中org.apache.commons.pool2.PooledObjectFactory<ProxyRestTemplateObject>- 覆盖:
validateObject在类中org.apache.commons.pool2.BasePooledObjectFactory<ProxyRestTemplateObject>- 参数:
p- ignored- 返回:
true
-