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

## com.sun.jersey.core.spi.component
Class ProviderFactory

    java.lang.Object
      com.sun.jersey.core.spi.component.ProviderFactory

All Implemented Interfaces:
  ComponentProviderFactory<ComponentProvider>

Direct Known Subclasses:
  IoCProviderFactory

    public class ProviderFactory

extends java.lang.Object
implements ComponentProviderFactory<ComponentProvider>

A component provider factory for provider components (which are singletons).

A cache of component providers is managed. When a component provider for a class is obtained it is cached such that the same instance on subsequent requests.

Author:
  Paul.Sandoz@Sun.Com

Constructor Summary
`ProviderFactory(InjectableProviderContext ipc)` Create the provider factory.

Method Summary
`protected ComponentProvider` | `_getComponentProvider(java.lang.Class c)`
`void` | `destroy()` Destroy all cached components.
`ComponentProvider` | `getComponentProvider(java.lang.Class c)` Get a component provider for a class.
`InjectableProviderContext` | `getInjectableProviderContext()` Get the injectable provider context.
`void` | `injectOnAllComponents()` Inject on all cached components.
`void` | `injectOnProviderInstance(java.lang.Object provider)` Inject on a provider.
`void` | `injectOnProviderInstances(java.util.Collection<?> providers)` Inject on a collection of providers.

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

Constructor Detail

### ProviderFactory

    public ProviderFactory(InjectableProviderContext ipc)

  Create the provider factory.

  Parameters:
    `ipc` - the injectable provider context to get injectables.

Method Detail

### getInjectableProviderContext

    public InjectableProviderContext getInjectableProviderContext()

  Get the injectable provider context.

  Returns:
    the injectable provider context

### getComponentProvider

    public final ComponentProvider getComponentProvider(java.lang.Class c)

  Get a component provider for a class.

  Specified by:
    `getComponentProvider` in interface `ComponentProviderFactory<ComponentProvider>`
  Parameters:
    `c` - the class.
  Returns:
    the component provider.

### _getComponentProvider

    protected ComponentProvider _getComponentProvider(java.lang.Class c)

### injectOnAllComponents

    public void injectOnAllComponents()

  Inject on all cached components.

### destroy

    public void destroy()

  Destroy all cached components.

### injectOnProviderInstances

    public void injectOnProviderInstances(java.util.Collection<?> providers)

  Inject on a collection of providers.

  Parameters:
    `providers` - the collection of providers.

### injectOnProviderInstance

    public void injectOnProviderInstance(java.lang.Object provider)

  Inject on a provider.

  Parameters:
    `provider` - the provider.

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 © 2008 Sun Microsystems, Inc. All Rights Reserved.