Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| RichFaces Core API 4.3.1.Final
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.richfaces.application
Interface ServicesFactory

    public interface ServicesFactory

Author:
  asmirnov@exadel.com

Method Summary
`
`<T> T`
` | `getInstance(Class<T> type)` Get service instance associated with given type, usually service interface or base abstract class.
`void` | `release()` Release all services.
`
`<T> void`
` | `setInstance(Class<T> type, T instance)` Associate concrete instance with service.

Method Detail

### getInstance

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

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

  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

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

  Associate concrete instance with service.

  Type Parameters:
    `T` - service type.
  Parameters:
    `type` - Base class implemented by service.
    `instance` - service instance.

### release

    void release()

  Release all services.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| RichFaces Core API 4.3.1.Final
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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