Package com.zfabrik.impl.provider.resolver

## Class ProviderResolver

- java.lang.Object
- - com.zfabrik.resources.provider.Resource
  - - com.zfabrik.impl.provider.resolver.ProviderResolver

- All Implemented Interfaces:
    `com.zfabrik.resources.provider.IResourceProvider`, `com.zfabrik.resources.provider.IResourceProviderBuilder`

      public class ProviderResolver
      extends com.zfabrik.resources.provider.Resource
      implements com.zfabrik.resources.provider.IResourceProviderBuilder, com.zfabrik.resources.provider.IResourceProvider

- - ### Field Summary

    - ### Fields inherited from interface com.zfabrik.resources.provider.IResourceProvider

      `PROP_NAMESPACE`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ProviderResolver()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `com.zfabrik.resources.provider.IResourceProvider` | `findProvider​(java.lang.String namespace)` |
    `com.zfabrik.resources.provider.Resource` | `get​(java.lang.String name)` | retrieve a resource.
    `void` | `init()` | Called at initialization time with the resource management.
    `void` | `init​(com.zfabrik.resources.provider.IResourceProviderContext c)` |
    `void` | `invalidate()` | This method gets called whenever a dependency resource has been invalidated or this resource needs to be invalidated.

    - ### Methods inherited from class com.zfabrik.resources.provider.Resource

      `as, as, handle, init`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ProviderResolver

          public ProviderResolver()

  - ### Method Detail

    - #### init

          public void init()

      Description copied from class: `com.zfabrik.resources.provider.Resource`
      Called at initialization time with the resource management. At the point in time this method gets called, a handle has been associated.
      Overrides:
        `init` in class `com.zfabrik.resources.provider.Resource`

    - #### invalidate

          public void invalidate()
                          throws com.zfabrik.resources.ResourceBusyException

      Description copied from class: `com.zfabrik.resources.provider.Resource`
      This method gets called whenever a dependency resource has been invalidated or this resource needs to be invalidated.

      This code should be executed in a life cycle code block of this resource instance, i.e. where dependencies are effectively managed, so that race conditions can be avoided.

      State changing methods of a resource should always be synchronized (e.g. on this). This is in particular true for cross-resource dependencies. In order to assure consistency under race conditions, a dependent resource should first declare its dependency and then retrieve the resource implementation. In case of failures, resources should clean up by calling `handle().invalidate(true);`

      Overrides:
        `invalidate` in class `com.zfabrik.resources.provider.Resource`
      Throws:
        `com.zfabrik.resources.ResourceBusyException`

    - #### findProvider

          public com.zfabrik.resources.provider.IResourceProvider findProvider​(java.lang.String namespace)

      Specified by:
        `findProvider` in interface `com.zfabrik.resources.provider.IResourceProviderBuilder`

    - #### init

          public void init​(com.zfabrik.resources.provider.IResourceProviderContext c)

      Specified by:
        `init` in interface `com.zfabrik.resources.provider.IResourceProvider`

    - #### get

          public com.zfabrik.resources.provider.Resource get​(java.lang.String name)

      Description copied from interface: `com.zfabrik.resources.provider.IResourceProvider`
      retrieve a resource. Returns `null` if the resource does not exist (or will not be made available). Throws ResourceNotAvailableException if the resource cannot be provided due to an error situation.
      Specified by:
        `get` in interface `com.zfabrik.resources.provider.IResourceProvider`
      Parameters:
        `name` - name of the resource
      Returns:
        the resource as a handle or `null` if the resource does not exist (or will not be made available).