org.richfaces.application

## Class ServicesFactoryImpl

- java.lang.Object
- - org.richfaces.application.ServicesFactoryImpl

- All Implemented Interfaces:
    ServicesFactory

      public class ServicesFactoryImpl
      extends Object
      implements ServicesFactory

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ServicesFactoryImpl()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T> T` | `getInstance(Class<T> type)` Get service instance associated with given type, usually service interface or base abstract class.
    `void` | `init(Iterable<Module> modules)` Allows to configure and initialize a set of modules
    `void` | `release()` Release all services.
    `<T> void` | `setInstance(Class<T> type, T instance)` Associate concrete instance with service.

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

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

- - ### Constructor Detail

    - #### ServicesFactoryImpl

          public ServicesFactoryImpl()

  - ### Method Detail

    - #### getInstance

          public <T> T getInstance(Class<T> type)
                        throws ServiceException

      Description copied from interface: `ServicesFactory`

      Get service instance associated with given type, usually service interface or base abstract class.

      Specified by:
        `getInstance` in interface `ServicesFactory`
      Type Parameters:
        `T` - service type.
      Parameters:
        `type` - Base class implemented by service.
      Returns:
        Current service implementation.
      Throws:
        `ServiceException` - if factory cannot create requested service.

    - #### setInstance

          public <T> void setInstance(Class<T> type,
                             T instance)

      Description copied from interface: `ServicesFactory`

      Associate concrete instance with service.

      Specified by:
        `setInstance` in interface `ServicesFactory`
      Type Parameters:
        `T` - service type.
      Parameters:
        `type` - Base class implemented by service.
        `instance` - service instance.

    - #### init

          public void init(Iterable<Module> modules)

      Allows to configure and initialize a set of modules

    - #### release

          public void release()

      Description copied from interface: `ServicesFactory`

      Release all services.

      Specified by:
        `release` in interface `ServicesFactory`

Copyright © 2015 JBoss by Red Hat. All Rights Reserved.