Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.richfaces.application
Class ServiceTracker

    java.lang.Object
      org.richfaces.application.ServiceTracker

    public final class ServiceTracker

extends java.lang.Object

Tracker class to provide access to various framework implementation services. Examples of such services are: `SkinFactory`, TBD.

Supports JSR-330 dependency injection.

This class represents application-scoped object that is stored in the map with `Thread.currentThread()` Context classloader. Therefore, there is only one instance perr JEE application in the current JVM.

Note: in initial state this class is not synchronized and presumes that all modification operations are done in a context of single-thread (in JSF initialization listener).

Since:
  4.0
Author:
  Nick Belaevski

Method Summary
`static
`<T> T`
` | `getService(java.lang.Class<T> target)`
`static
`<T> T`
` | `getService(javax.faces.context.FacesContext context, java.lang.Class<T> target)`
`static void` | `release()` Remove dependency injection service associated with current context.
`static void` | `setFactory(ServicesFactory factory)` Set dependency injection service implementation.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getService

    public static <T> T getService(java.lang.Class<T> target)

### getService

    public static <T> T getService(javax.faces.context.FacesContext context,
                                   java.lang.Class<T> target)

### setFactory

    public static void setFactory(ServicesFactory factory)

  Set dependency injection service implementation.

  Parameters:
    `factory` -

### release

    public static void release()

  Remove dependency injection service associated with current context.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.