# Class goog.net.WrapperXmlHttpFactory

code »

    goog.net.XmlHttpFactory
      └ goog.net.WrapperXmlHttpFactory

An xhr factory subclass which can be constructed using two factory methods. This exists partly to allow the preservation of goog.net.XmlHttp.setFactory() with an unchanged signature.

## Constructor

goog.net.WrapperXmlHttpFactory ( xhrFactory, optionsFactory )

Parameters

xhrFactory: `function(): !goog.net.XhrLike.OrNative`
  A function which returns a new XHR object.
optionsFactory: `function(): !Object`
  A function which returns the options associated with xhr objects from this factory.

Show:Public Protected Private

## Instance Methods

### Defined in `goog.net.WrapperXmlHttpFactory`

code »createInstance ( ) ⇒ `(XMLHttpRequest|goog.net.XhrLike)`
code »getOptions ( ) ⇒ `(Object|null)`
code »optionsFactory_ ( ) ⇒ `Object`

Options factory method.

code »xhrFactory_ ( ) ⇒ `(XMLHttpRequest|goog.net.XhrLike)`

XHR factory method.

### Defined in `goog.net.XmlHttpFactory`

code »internalGetOptions ( ) ⇒ `Object`

Override this method in subclasses to preserve the caching offered by getOptions().

Returns

Options describing how xhr objects obtained from this factory should be used.

## Instance Properties

### Defined in `goog.net.XmlHttpFactory`

code »cachedOptions_ : `Object`

Cache of options - we only actually call internalGetOptions once.

## Static Properties

code »goog.net.WrapperXmlHttpFactory.superClass_ : `goog.net.XmlHttpFactory.prototype`