|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.camel.impl.ServiceSupport
org.apache.camel.core.osgi.OsgiTypeConverter
public class OsgiTypeConverter
| Constructor Summary | |
|---|---|
OsgiTypeConverter(org.osgi.framework.BundleContext bundleContext,
Injector injector,
FactoryFinder factoryFinder)
|
|
| Method Summary | ||
|---|---|---|
void |
addFallbackTypeConverter(TypeConverter typeConverter,
boolean canPromote)
Registers a new fallback type converter |
|
Object |
addingService(org.osgi.framework.ServiceReference serviceReference)
|
|
void |
addTypeConverter(Class<?> toType,
Class<?> fromType,
TypeConverter typeConverter)
Registers a new type converter |
|
|
convertTo(Class<T> type,
Exchange exchange,
Object value)
Converts the value to the specified type in the context of an exchange Used when conversion requires extra information from the current exchange (such as encoding). |
|
|
convertTo(Class<T> type,
Object value)
Converts the value to the specified type |
|
protected DefaultTypeConverter |
createRegistry()
|
|
protected void |
doStart()
|
|
protected void |
doStop()
|
|
DefaultTypeConverter |
getDelegate()
|
|
Injector |
getInjector()
Gets the injector |
|
TypeConverter |
lookup(Class<?> toType,
Class<?> fromType)
Performs a lookup for a given type converter. |
|
|
mandatoryConvertTo(Class<T> type,
Exchange exchange,
Object value)
Converts the value to the specified type in the context of an exchange Used when conversion requires extra information from the current exchange (such as encoding). |
|
|
mandatoryConvertTo(Class<T> type,
Object value)
Converts the value to the specified type |
|
void |
modifiedService(org.osgi.framework.ServiceReference serviceReference,
Object o)
|
|
void |
removedService(org.osgi.framework.ServiceReference serviceReference,
Object o)
|
|
void |
setInjector(Injector injector)
Sets the injector to be used for creating new instances during type conversions. |
|
| 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 |
|---|
public OsgiTypeConverter(org.osgi.framework.BundleContext bundleContext,
Injector injector,
FactoryFinder factoryFinder)
| Method Detail |
|---|
public Object addingService(org.osgi.framework.ServiceReference serviceReference)
addingService in interface org.osgi.util.tracker.ServiceTrackerCustomizer
public void modifiedService(org.osgi.framework.ServiceReference serviceReference,
Object o)
modifiedService in interface org.osgi.util.tracker.ServiceTrackerCustomizer
public void removedService(org.osgi.framework.ServiceReference serviceReference,
Object o)
removedService in interface org.osgi.util.tracker.ServiceTrackerCustomizer
protected void doStart()
throws Exception
doStart in class ServiceSupportException
protected void doStop()
throws Exception
doStop in class ServiceSupportException
public <T> T convertTo(Class<T> type,
Object value)
TypeConverter
convertTo in interface TypeConvertertype - the requested typevalue - the value to be converted
public <T> T convertTo(Class<T> type,
Exchange exchange,
Object value)
TypeConverter
convertTo in interface TypeConvertertype - the requested typeexchange - the current exchangevalue - the value to be converted
public <T> T mandatoryConvertTo(Class<T> type,
Object value)
throws NoTypeConversionAvailableException
TypeConverter
mandatoryConvertTo in interface TypeConvertertype - the requested typevalue - the value to be converted
NoTypeConversionAvailableException - if conversion not possible
public <T> T mandatoryConvertTo(Class<T> type,
Exchange exchange,
Object value)
throws NoTypeConversionAvailableException
TypeConverter
mandatoryConvertTo in interface TypeConvertertype - the requested typeexchange - the current exchangevalue - the value to be converted
NoTypeConversionAvailableException
public void addTypeConverter(Class<?> toType,
Class<?> fromType,
TypeConverter typeConverter)
TypeConverterRegistry
addTypeConverter in interface TypeConverterRegistrytoType - the type to convert tofromType - the type to convert fromtypeConverter - the type converter to use
public void addFallbackTypeConverter(TypeConverter typeConverter,
boolean canPromote)
TypeConverterRegistry
addFallbackTypeConverter in interface TypeConverterRegistrytypeConverter - the type converter to usecanPromote - whether or not the fallback type converter can be promoted to a first class type converter
public TypeConverter lookup(Class<?> toType,
Class<?> fromType)
TypeConverterRegistry
lookup in interface TypeConverterRegistrytoType - the type to convert tofromType - the type to convert from
public void setInjector(Injector injector)
TypeConverterRegistry
setInjector in interface TypeConverterRegistryinjector - the injectorpublic Injector getInjector()
TypeConverterRegistry
getInjector in interface TypeConverterRegistrypublic DefaultTypeConverter getDelegate()
protected DefaultTypeConverter createRegistry()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||