PerRequestFactory (Apache CXF JavaDoc 4.2.2 API)
Description: declaration: package: org.apache.cxf.service.invoker, class: PerRequestFactory

Package org.apache.cxf.service.invoker

# Class PerRequestFactory

java.lang.Object
org.apache.cxf.service.invoker.PerRequestFactory

All Implemented Interfaces:
  `Factory`

public class PerRequestFactory extends Object implements Factory
Creates a new instance of the service object for each call to create().

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PerRequestFactory(Class<?> svcClass)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Object`
  `create(Exchange ex)`
  Creates the object that will be used for the invoke
  `void`
  `release(Exchange ex, Object o)`
  Post invoke, this is called to allow the factory to release the object, store it, etc...

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

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

- ## Constructor Details

  - ### PerRequestFactory

    public PerRequestFactory(Class<?> svcClass)

- ## Method Details

  - ### create

    public Object create(Exchange ex) throws Throwable
    Description copied from interface: `Factory`
    Creates the object that will be used for the invoke
    Specified by:
      `create` in interface `Factory`
    Parameters:
      `ex` -
    Throws:
      `Throwable`

  - ### release

    public void release(Exchange ex, Object o)
    Description copied from interface: `Factory`
    Post invoke, this is called to allow the factory to release the object, store it, etc...
    Specified by:
      `release` in interface `Factory`
    Parameters:
      `ex` -
      `o` - object created from the create method