Package org.apache.camel.dsl.modeline
Class PropertyTrait
java.lang.Object
org.apache.camel.dsl.modeline.PropertyTrait
- All Implemented Interfaces:
org.apache.camel.CamelContextAware,Trait,org.apache.camel.Ordered,org.apache.camel.spi.HasCamelContext,org.apache.camel.spi.LoadablePropertiesSource,org.apache.camel.spi.PropertiesSource
@JdkService("properties-source-factory")
public class PropertyTrait
extends Object
implements Trait, org.apache.camel.spi.LoadablePropertiesSource, org.apache.camel.CamelContextAware, org.apache.camel.Ordered
This trait is a
PropertiesSource so Camel properties component will use this directly when looking for
property values.-
Field Summary
Fields inherited from interface org.apache.camel.Ordered
HIGHEST, LOWEST -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.camel.CamelContextgetName()Name of traitintgetOrder()getProperty(String name) loadProperties(Predicate<String> filter) org.apache.camel.spi.CamelContextCustomizerparseTrait(org.apache.camel.spi.Resource resource, String trait) Parses the traitvoidreloadProperties(String location) voidsetCamelContext(org.apache.camel.CamelContext camelContext) protected voidsetProperty(org.apache.camel.spi.Resource resource, String key, String value) toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.camel.spi.PropertiesSource
getProperty
-
Constructor Details
-
PropertyTrait
public PropertyTrait()
-
-
Method Details
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceorg.apache.camel.Ordered
-
getCamelContext
public org.apache.camel.CamelContext getCamelContext()- Specified by:
getCamelContextin interfaceorg.apache.camel.spi.HasCamelContext
-
setCamelContext
public void setCamelContext(org.apache.camel.CamelContext camelContext) - Specified by:
setCamelContextin interfaceorg.apache.camel.CamelContextAware
-
getName
Description copied from interface:TraitName of trait -
getProperty
- Specified by:
getPropertyin interfaceorg.apache.camel.spi.PropertiesSource
-
parseTrait
public org.apache.camel.spi.CamelContextCustomizer parseTrait(org.apache.camel.spi.Resource resource, String trait) Description copied from interface:TraitParses the trait- Specified by:
parseTraitin interfaceTrait- Parameters:
resource- the sourcetrait- the trait- Returns:
- a customizer if the trait is accepted, otherwise null is returned
-
setProperty
-
loadProperties
- Specified by:
loadPropertiesin interfaceorg.apache.camel.spi.LoadablePropertiesSource
-
loadProperties
- Specified by:
loadPropertiesin interfaceorg.apache.camel.spi.LoadablePropertiesSource
-
reloadProperties
- Specified by:
reloadPropertiesin interfaceorg.apache.camel.spi.LoadablePropertiesSource
-
toString
-