Package org.apache.cxf.service.invoker

## Class SessionFactory

- java.lang.Object
- - org.apache.cxf.service.invoker.SessionFactory

- All Implemented Interfaces:
    `Factory`

      public class SessionFactory
      extends Object
      implements Factory

  Creates a new instance for each session. This may have restrictions on what the bean can look like. For example, some session implementations require the beans to be Serializable

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `SessionFactory​(Class<?> svcClass)` |
    `SessionFactory​(Class<?> svcClass, boolean createOnDemand)` |
    `SessionFactory​(Factory f)` |
    `SessionFactory​(Factory f, boolean createOnDemand)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Object` | `create​(Exchange e)` | Creates the object that will be used for the invoke
    `void` | `release​(Exchange e, 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 Detail

    - #### SessionFactory

          public SessionFactory​(Class<?> svcClass)

    - #### SessionFactory

          public SessionFactory​(Factory f)

    - #### SessionFactory

          public SessionFactory​(Class<?> svcClass,
                                boolean createOnDemand)

    - #### SessionFactory

          public SessionFactory​(Factory f,
                                boolean createOnDemand)

  - ### Method Detail

    - #### create

          public Object create​(Exchange e)
                        throws Throwable

      Creates the object that will be used for the invoke
      Specified by:
        `create` in interface `Factory`
      Throws:
        `Throwable`

    - #### release

          public void release​(Exchange e,
                              Object o)

      Post invoke, this is called to allow the factory to release the object, store it, etc...
      Specified by:
        `release` in interface `Factory`
        `o` - object created from the create method