org.apache.camel.impl.converter
Class LazyLoadingTypeConverter

java.lang.Object
  extended by org.apache.camel.impl.ServiceSupport
      extended by org.apache.camel.impl.converter.BaseTypeConverterRegistry
          extended by org.apache.camel.impl.converter.LazyLoadingTypeConverter
All Implemented Interfaces:
Service, ShutdownableService, TypeConverterRegistry, TypeConverter

public class LazyLoadingTypeConverter
extends BaseTypeConverterRegistry

Lazy implementation of a type converter registry used for type converters in Camel.

This implementation will lazy load type converters on-demand.

Version:

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.camel.impl.converter.BaseTypeConverterRegistry
BaseTypeConverterRegistry.FallbackTypeConverter, BaseTypeConverterRegistry.TypeMapping
 
Field Summary
 
Fields inherited from class org.apache.camel.impl.converter.BaseTypeConverterRegistry
factoryFinder, fallbackConverters, injector, log, misses, propertyEditorTypeConverter, typeConverterLoaders, typeMappings
 
Constructor Summary
LazyLoadingTypeConverter(PackageScanClassResolver resolver, Injector injector, FactoryFinder factoryFinder)
           
 
Method Summary
protected  Object doConvertTo(Class type, Exchange exchange, Object value)
           
protected  TypeConverter doLookup(Class<?> toType, Class<?> fromType, boolean isSuper)
           
protected  void doStop()
           
 Set<Class<?>> getFromClassMappings()
           
 Map<Class<?>,TypeConverter> getToClassMappings(Class<?> fromClass)
           
 TypeConverter getTypeConverter(Class<?> toType, Class<?> fromType)
           
 Map<BaseTypeConverterRegistry.TypeMapping,TypeConverter> getTypeMappings()
           
 
Methods inherited from class org.apache.camel.impl.converter.BaseTypeConverterRegistry
addFallbackTypeConverter, addTypeConverter, convertTo, convertTo, doStart, getInjector, getOrFindTypeConverter, getTypeConverterLoaders, loadFallbackTypeConverters, loadTypeConverters, lookup, mandatoryConvertTo, mandatoryConvertTo, setInjector
 
Methods inherited from class org.apache.camel.impl.ServiceSupport
addChildService, doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspended, isSuspending, removeChildService, resume, shutdown, start, start, stop, suspend
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LazyLoadingTypeConverter

public LazyLoadingTypeConverter(PackageScanClassResolver resolver,
                                Injector injector,
                                FactoryFinder factoryFinder)
Method Detail

doConvertTo

protected Object doConvertTo(Class type,
                             Exchange exchange,
                             Object value)
Overrides:
doConvertTo in class BaseTypeConverterRegistry

getTypeConverter

public TypeConverter getTypeConverter(Class<?> toType,
                                      Class<?> fromType)
Overrides:
getTypeConverter in class BaseTypeConverterRegistry

getFromClassMappings

public Set<Class<?>> getFromClassMappings()
Overrides:
getFromClassMappings in class BaseTypeConverterRegistry

getToClassMappings

public Map<Class<?>,TypeConverter> getToClassMappings(Class<?> fromClass)
Overrides:
getToClassMappings in class BaseTypeConverterRegistry

getTypeMappings

public Map<BaseTypeConverterRegistry.TypeMapping,TypeConverter> getTypeMappings()
Overrides:
getTypeMappings in class BaseTypeConverterRegistry

doLookup

protected TypeConverter doLookup(Class<?> toType,
                                 Class<?> fromType,
                                 boolean isSuper)
Overrides:
doLookup in class BaseTypeConverterRegistry

doStop

protected void doStop()
               throws Exception
Overrides:
doStop in class BaseTypeConverterRegistry
Throws:
Exception


Apache CAMEL