Interface Runtime

  • All Superinterfaces:
    AutoCloseable, org.apache.camel.spi.HasCamelContext

    public interface Runtime
    extends org.apache.camel.spi.HasCamelContext, AutoCloseable
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static interface  Runtime.Listener  
      static class  Runtime.Phase  
    • Method Summary

      All Methods Static Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default void addRoutes​(org.apache.camel.RoutesBuilder builder)
      Sets a special list of properties that take precedence and will use first, if a property exist.
      default void close()  
      default <T extends org.apache.camel.CamelContext>
      T
      getCamelContext​(Class<T> type)
      Returns the camel context adapting it to the specialized type.
      default org.apache.camel.spi.Registry getRegistry()
      Returns the registry associated to this runtime.
      static Runtime on​(org.apache.camel.CamelContext camelContext)
      Helper to create a simple runtime from a given Camel Context.
      static Runtime on​(org.apache.camel.spi.HasCamelContext provider)
      Helper to create a simple runtime from a given Camel Context provider.
      default void setProperties​(String key, String value, String... entries)
      Sets a special list of properties that take precedence and will use first, if a property exist.
      default void setProperties​(Map<String,​String> properties)
      Sets a special list of properties that take precedence and will use first, if a property exist.
      default void setProperties​(Properties properties)
      Sets a special list of properties that take precedence and will use first, if a property exist.
      default void stop()
      Lifecycle method used to stops the entire integration.
      • Methods inherited from interface org.apache.camel.spi.HasCamelContext

        getCamelContext
    • Method Detail

      • getCamelContext

        default <T extends org.apache.camel.CamelContext> T getCamelContext​(Class<T> type)
        Returns the camel context adapting it to the specialized type.
        Returns:
        the camel context.
        See Also:
        HasCamelContext.getCamelContext(), CamelContext.adapt(Class)
      • getRegistry

        default org.apache.camel.spi.Registry getRegistry()
        Returns the registry associated to this runtime.
      • setProperties

        default void setProperties​(Properties properties)
        Sets a special list of properties that take precedence and will use first, if a property exist.
        Parameters:
        properties - the properties to set
        See Also:
        PropertiesComponent.setOverrideProperties(Properties)
      • setProperties

        default void setProperties​(Map<String,​String> properties)
        Sets a special list of properties that take precedence and will use first, if a property exist.
        Parameters:
        properties - the properties to set
        See Also:
        PropertiesComponent.setOverrideProperties(Properties)
      • setProperties

        default void setProperties​(String key,
                                   String value,
                                   String... entries)
        Sets a special list of properties that take precedence and will use first, if a property exist.
        Parameters:
        key - the mapping's key
        value - the mapping's value
        entries - containing the keys and values from which the map is populated
        See Also:
        PropertiesComponent.setOverrideProperties(Properties)
      • addRoutes

        default void addRoutes​(org.apache.camel.RoutesBuilder builder)
        Sets a special list of properties that take precedence and will use first, if a property exist.
        Parameters:
        builder - the builder which will create the routes
        See Also:
        PropertiesComponent.setOverrideProperties(Properties)
      • stop

        default void stop()
                   throws Exception
        Lifecycle method used to stops the entire integration.
        Throws:
        Exception
      • on

        static Runtime on​(org.apache.camel.CamelContext camelContext)
        Helper to create a simple runtime from a given Camel Context.
        Parameters:
        camelContext - the camel context
        Returns:
        the runtime
      • on

        static Runtime on​(org.apache.camel.spi.HasCamelContext provider)
        Helper to create a simple runtime from a given Camel Context provider.
        Parameters:
        provider - the camel context provider
        Returns:
        the runtime