com.h3c.keystone

## Class HttpClientPoolFactory

- java.lang.Object
- - org.apache.commons.pool.BasePoolableObjectFactory
  - - com.h3c.keystone.HttpClientPoolFactory

- All Implemented Interfaces:
    org.apache.commons.pool.PoolableObjectFactory

      public class HttpClientPoolFactory
      extends org.apache.commons.pool.BasePoolableObjectFactory

  An HTTP request pooling factory. Based on Apache Commons Pool. Intended to be used as a singleton.

  Note that the Apache HttpClient maintains its own connection pool and does not participate in Apache Commons pool lifecycle other than creating HTTPRequests.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `destroyObject(Object obj)`
    `Object` | `makeObject()`
    `void` | `passivateObject(Object obj)`
    `void` | `shutdown()` Shutdown the pooling factory and any backing resources.

    - ### Methods inherited from class org.apache.commons.pool.BasePoolableObjectFactory

      `activateObject, validateObject`

    - ### Methods inherited from class java.lang.Object

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

- - ### Method Detail

    - #### makeObject

          public Object makeObject()
                            throws Exception

      Specified by:
        `makeObject` in interface `org.apache.commons.pool.PoolableObjectFactory`
      Specified by:
        `makeObject` in class `org.apache.commons.pool.BasePoolableObjectFactory`
      Throws:
        `Exception`

    - #### passivateObject

          public void passivateObject(Object obj)
                               throws Exception

      Specified by:
        `passivateObject` in interface `org.apache.commons.pool.PoolableObjectFactory`
      Overrides:
        `passivateObject` in class `org.apache.commons.pool.BasePoolableObjectFactory`
      Throws:
        `Exception`

    - #### destroyObject

          public void destroyObject(Object obj)
                             throws Exception

      Specified by:
        `destroyObject` in interface `org.apache.commons.pool.PoolableObjectFactory`
      Overrides:
        `destroyObject` in class `org.apache.commons.pool.BasePoolableObjectFactory`
      Throws:
        `Exception`

    - #### shutdown

          public void shutdown()

      Shutdown the pooling factory and any backing resources.

Copyright © 2014. All Rights Reserved.