public class HandlerLoader extends Object
Handler implementations available using service provider discovery (SPI annotations).  This class can
 probe the classpath for available ReadHandlers, ConversionHandlers and ValidateHandlers
 before load new instances of each.
 
 Convenience methods are supplied to obtain handlers for given IDF, SDRF and ADF headers.| Constructor and Description | 
|---|
HandlerLoader()  | 
| Modifier and Type | Method and Description | 
|---|---|
Collection<ADFGraphReadHandler> | 
getADFGraphReadHandlers(String[] header)
Lookup ADF reading handlers that can read a particular header. 
 | 
Collection<ADFHeaderReadHandler> | 
getADFHeaderReadHandlers(String header)
Lookup ADF reading handlers that can read a particular header. 
 | 
Collection<ConversionHandler<?,?>> | 
getConversionHandlers()
Gets the collection of all available  
ConversionHandlers. | 
static HandlerLoader | 
getHandlerLoader()  | 
Collection<IDFReadHandler> | 
getIDFReadHandlers(String header)
Lookup IDF reading handlers that can read a particular header. 
 | 
protected org.slf4j.Logger | 
getLog()  | 
Collection<ReadHandler<?,?,?>> | 
getReadHandlers()
Gets the collection of all available  
ReadHandlers. | 
<T extends ReadHandler,S>  | 
getReadHandlersOfType(Class<T> superclass,
                     S header)
Generic method for looking up ReadHandlers that extend the given superclass and can read from the given header. 
 | 
Collection<SDRFReadHandler> | 
getSDRFReadHandlers(String[] header)
Lookup SDRF reading handlers that can read a particular header. 
 | 
Collection<ValidateHandler<?>> | 
getValidateHandlers()
Gets the collection of all available  
ValidateHandlers. | 
void | 
loadHandlers()
Loads all handlers available. 
 | 
void | 
reloadHandlers()
Clears any currently loaded handlers and reloads handlers available on the classpath. 
 | 
public static HandlerLoader getHandlerLoader()
protected org.slf4j.Logger getLog()
public void loadHandlers()
ReadHandler, ConversionHandler or ValidateHandler and adding a ServiceProvider
 annotation to the implementation.public void reloadHandlers()
public Collection<ReadHandler<?,?,?>> getReadHandlers()
ReadHandlers.public Collection<ConversionHandler<?,?>> getConversionHandlers()
ConversionHandlers.public Collection<ValidateHandler<?>> getValidateHandlers()
ValidateHandlers.public Collection<IDFReadHandler> getIDFReadHandlers(String header)
header - the header to readpublic Collection<SDRFReadHandler> getSDRFReadHandlers(String[] header)
header - the header to readpublic Collection<ADFHeaderReadHandler> getADFHeaderReadHandlers(String header)
header - the header to readpublic Collection<ADFGraphReadHandler> getADFGraphReadHandlers(String[] header)
header - the header to readpublic <T extends ReadHandler,S> Collection<T> getReadHandlersOfType(Class<T> superclass, S header)
T - the generic type of the handler classS - the header typesuperclass - the superclass of the handler that you wish to filter byheader - the head to readCopyright © 2014. All rights reserved.