org.jboss.resteasy.plugins.spring

## Class SpringResourceFactory

- java.lang.Object
- - org.jboss.resteasy.plugins.spring.SpringResourceFactory

- All Implemented Interfaces:
    ResourceFactory

      public class SpringResourceFactory
      extends Object
      implements ResourceFactory

  Version:
    $Revision: 1 $
  Author:
    Solomn Duskis

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected org.springframework.beans.factory.BeanFactory` | `beanFactory`
    `protected String` | `beanName`
    `protected String` | `context`
    `protected PropertyInjector` | `propertyInjector`
    `protected Class<?>` | `scannableClass`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SpringResourceFactory(String beanName, org.springframework.beans.factory.BeanFactory beanFactory, Class<?> scannable)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `createResource(HttpRequest request, HttpResponse response, ResteasyProviderFactory factory)` Called per request to obtain a resource instance to invoke http request on.
    `String` | `getBeanName()`
    `String` | `getContext()`
    `PropertyInjector` | `getPropertyInjector()`
    `Class<?>` | `getScannableClass()` Class to scan for jax-rs annotations
    `void` | `registered(ResteasyProviderFactory factory)` Callback after registration has been completed.
    `void` | `requestFinished(HttpRequest request, HttpResponse response, Object resource)` Callback when request is finished.
    `void` | `setContext(String context)`
    `void` | `unregistered()`

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

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

- - ### Field Detail

    - #### beanFactory

          protected org.springframework.beans.factory.BeanFactory beanFactory

    - #### beanName

          protected String beanName

    - #### scannableClass

          protected Class<?> scannableClass

    - #### propertyInjector

          protected PropertyInjector propertyInjector

    - #### context

          protected String context

  - ### Constructor Detail

    - #### SpringResourceFactory

          public SpringResourceFactory(String beanName,
                               org.springframework.beans.factory.BeanFactory beanFactory,
                               Class<?> scannable)

  - ### Method Detail

    - #### getPropertyInjector

          public PropertyInjector getPropertyInjector()

    - #### createResource

          public Object createResource(HttpRequest request,
                              HttpResponse response,
                              ResteasyProviderFactory factory)

      Description copied from interface: `ResourceFactory`
      Called per request to obtain a resource instance to invoke http request on.
      Specified by:
        `createResource` in interface `ResourceFactory`
      Returns:

    - #### getScannableClass

          public Class<?> getScannableClass()

      Description copied from interface: `ResourceFactory`
      Class to scan for jax-rs annotations
      Specified by:
        `getScannableClass` in interface `ResourceFactory`
      Returns:

    - #### registered

          public void registered(ResteasyProviderFactory factory)

      Description copied from interface: `ResourceFactory`
      Callback after registration has been completed.
      Specified by:
        `registered` in interface `ResourceFactory`
      Parameters:
        `factory` - allows singleton factories to pre-inject things like @Context references into the singleton instance

    - #### requestFinished

          public void requestFinished(HttpRequest request,
                             HttpResponse response,
                             Object resource)

      Description copied from interface: `ResourceFactory`
      Callback when request is finished. usable for things like @PreDestroy if the underlying factory supports it
      Specified by:
        `requestFinished` in interface `ResourceFactory`

    - #### unregistered

          public void unregistered()

      Specified by:
        `unregistered` in interface `ResourceFactory`

    - #### getBeanName

          public String getBeanName()

    - #### setContext

          public void setContext(String context)

    - #### getContext

          public String getContext()

Copyright © 2014. All Rights Reserved.