类 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
  • 构造器详细资料

    • ProxyRestTemplateFactory

      public ProxyRestTemplateFactory(org.springframework.beans.factory.BeanFactory beanFactory)
  • 方法详细资料

    • create

      public ProxyRestTemplateObject create() throws Exception
      Creates an object instance, to be wrapped in a PooledObject.

      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 of PooledObject.
      指定者:
      wrap 在类中 org.apache.commons.pool2.BasePooledObjectFactory<ProxyRestTemplateObject>
      参数:
      obj - the instance to wrap
      返回:
      The provided instance, wrapped by a PooledObject
    • validateObject

      public boolean validateObject(org.apache.commons.pool2.PooledObject<ProxyRestTemplateObject> p)
      This implementation always returns true.
      指定者:
      validateObject 在接口中 org.apache.commons.pool2.PooledObjectFactory<ProxyRestTemplateObject>
      覆盖:
      validateObject 在类中 org.apache.commons.pool2.BasePooledObjectFactory<ProxyRestTemplateObject>
      参数:
      p - ignored
      返回:
      true