org.apache.myfaces.spi.impl
Class DefaultServiceProviderFinder

java.lang.Object
  extended by org.apache.myfaces.spi.ServiceProviderFinder
      extended by org.apache.myfaces.spi.impl.DefaultServiceProviderFinder

public class DefaultServiceProviderFinder
extends ServiceProviderFinder

Since:
2.0.3
Author:
Leonardo Uribe

Field Summary
 
Fields inherited from class org.apache.myfaces.spi.ServiceProviderFinder
KNOWN_SERVICES
 
Constructor Summary
DefaultServiceProviderFinder()
           
 
Method Summary
 List<String> getServiceProviderList(String spiClass)
          Gets the list of classes bound to the spiClass key, looking for entries under META-INF/services/[spiClass]
protected  Set<URL> getURLs(String spiClass)
           
 void initKnownServiceProviderMapInfo(ExternalContext ectx, Map<String,List<String>> map)
          If ServiceProviderFinderFactory knows beforehand or has stored somewhere the known locations of the SPI interfaces, this method helps to set this config information so the implementation of this interface can use it.
<S> ServiceLoader<S>
load(Class<S> spiClass)
           
 
Methods inherited from class org.apache.myfaces.spi.ServiceProviderFinder
calculateKnownServiceProviderMapInfo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultServiceProviderFinder

public DefaultServiceProviderFinder()
Method Detail

getURLs

protected Set<URL> getURLs(String spiClass)

getServiceProviderList

public List<String> getServiceProviderList(String spiClass)
Description copied from class: ServiceProviderFinder
Gets the list of classes bound to the spiClass key, looking for entries under META-INF/services/[spiClass]

Specified by:
getServiceProviderList in class ServiceProviderFinder
Returns:

load

public <S> ServiceLoader<S> load(Class<S> spiClass)
Overrides:
load in class ServiceProviderFinder

initKnownServiceProviderMapInfo

public void initKnownServiceProviderMapInfo(ExternalContext ectx,
                                            Map<String,List<String>> map)
Description copied from class: ServiceProviderFinder
If ServiceProviderFinderFactory knows beforehand or has stored somewhere the known locations of the SPI interfaces, this method helps to set this config information so the implementation of this interface can use it. The idea is MyFaces initialization algorithm will call getKnownServiceProviderMapInfo method and if the value is not null it will call this method to pass the map back to the ServiceProviderFinder, so it can take it.

Overrides:
initKnownServiceProviderMapInfo in class ServiceProviderFinder


Copyright © 2015 The Apache Software Foundation. All rights reserved.