|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.jasperreports.jsf.util.Services
public final class Services
Utility class to handle the different kind of pluggable services required by the implementation.
| Method Summary | ||
|---|---|---|
static
|
chain(Class<T> clazz,
T defaultInstance)
Loads a chain of services from the classpath. |
|
static
|
map(Class<T> clazz)
Loads a service map from the classpath. |
|
static
|
set(Class<T> clazz)
Loads a service set from the classpath. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <T> T chain(Class<T> clazz,
T defaultInstance)
throws ServiceException
Services are looked up following convention META-INF/services/[serviceClassName]. Service chains must be configured the same way that service sets but implementation classes must have a public constructor accepting another instance of the same service that may used as a delegator when implementing class doesn't know how to handle the request.
T - Service type to be obtained.clazz - Service interface class object.defaultInstance - Last service in the chain. May be
null.
ServiceException - If any error happens when loading the
service chain.
public static <T> Set<T> set(Class<T> clazz)
throws ServiceException
Services are looked up following convention META-INF/services/[serviceClassName]. Services set configuration files must contain a list of service implementation classes.
T - Service type to be obtained.clazz - Service interface class object.
ServiceException
public static <T> Map<String,T> map(Class<T> clazz)
throws ServiceException
Services are looked up following convention META-INF/services/[serviceClassName]. When loading service maps, service configuration file must contain entries as follows: [key]:[implementation class] .
T - Service type to be obtained.clazz - Service interface class object.
ServiceException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||