org.richfaces.services

## Class ServicesFactoryImpl

- java.lang.Object
- - org.richfaces.services.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)`
    `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.

    - #### release

          public void release()

      Description copied from interface: `ServicesFactory`

      Release all services.

      Specified by:
        `release` in interface `ServicesFactory`

    - #### init

          public void init(Iterable<Module> modules)

    - #### 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.

Copyright © 2014 JBoss by Red Hat. All rights reserved.