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.apache.tapestry5.internal.services
Class ApplicationMessageCatalogObjectProvider

    java.lang.Object
      org.apache.tapestry5.ioc.internal.util.LockSupport
          org.apache.tapestry5.internal.services.ApplicationMessageCatalogObjectProvider

All Implemented Interfaces:
  ObjectProvider, InvalidationListener

    public class ApplicationMessageCatalogObjectProvider

extends LockSupport
implements ObjectProvider, InvalidationListener

Allows for injection of the global application message catalog into services. The injected value is, in fact, a proxy. Each method access of the proxy will determine the current thread's locale, and delegate to the actual global message catalog for that particular locale. There's caching to keep it reasonably efficient.

Since:
  5.2.0
See Also:
  `ComponentMessagesSource.getApplicationCatalog(Locale)`

Constructor Summary
`ApplicationMessageCatalogObjectProvider(ObjectLocator locator)`

Method Summary
`void` | `objectWasInvalidated()` Invoked to indicate that some object is invalid.
`
`<T> T`
` | `provide(java.lang.Class<T> objectType, AnnotationProvider annotationProvider, ObjectLocator locator)` Provides an object based on an expression.

Methods inherited from class org.apache.tapestry5.ioc.internal.util.LockSupport
`acquireReadLock, downgradeWriteLockToReadLock, releaseReadLock, releaseWriteLock, takeWriteLock, upgradeReadLockToWriteLock`

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

Constructor Detail

### ApplicationMessageCatalogObjectProvider

    public ApplicationMessageCatalogObjectProvider(ObjectLocator locator)

Method Detail

### provide

    public <T> T provide(java.lang.Class<T> objectType,
                         AnnotationProvider annotationProvider,
                         ObjectLocator locator)

  Description copied from interface: `ObjectProvider`
  Provides an object based on an expression. The process of providing objects occurs within a particular context, which will typically be a service builder method, service contributor method, or service decorator method. The locator parameter provides access to the services visible to that context.

  Specified by:
    `provide` in interface `ObjectProvider`
  Parameters:
    `objectType` - the expected object type
    `annotationProvider` - provides access to annotations (typically, the field or parameter to which an injection-related annotation is attached); annotations on the field or parameter may also be used when resolving the desired object
    `locator` - locator for the context in which the provider is being used
  Returns:
    the requested object, or null if this object provider can not supply an object

### objectWasInvalidated

    public void objectWasInvalidated()

  Description copied from interface: `InvalidationListener`
  Invoked to indicate that some object is invalid. The receiver should clear its cache.

  Specified by:
    `objectWasInvalidated` in interface `InvalidationListener`

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 © 2003-2012 The Apache Software Foundation.