Interface WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder

  • All Superinterfaces:
    org.apache.camel.builder.EndpointConsumerBuilder, org.apache.camel.EndpointConsumerResolver
    All Known Subinterfaces:
    WeatherEndpointBuilderFactory.WeatherEndpointBuilder
    Enclosing interface:
    WeatherEndpointBuilderFactory

    public static interface WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder
    extends org.apache.camel.builder.EndpointConsumerBuilder
    Builder for endpoint consumers for the Weather component.
    • Method Detail

      • headerName

        default WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder headerName​(String headerName)
        To store the weather result in this header instead of the message body. This is useable if you want to keep current message body as-is. The option is a: <code>java.lang.String</code> type. Group: common
        Parameters:
        headerName - the value to set
        Returns:
        the dsl builder
      • language

        default WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder language​(String language)
        Language of the response. The option will be converted to a <code>org.apache.camel.component.weather.WeatherLanguage</code> type. Default: en Group: common
        Parameters:
        language - the value to set
        Returns:
        the dsl builder
      • period

        default WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder period​(String period)
        If null, the current weather will be returned, else use values of 5, 7, 14 days. Only the numeric value for the forecast period is actually parsed, so spelling, capitalisation of the time period is up to you (its ignored). The option is a: <code>java.lang.String</code> type. Group: common
        Parameters:
        period - the value to set
        Returns:
        the dsl builder
      • weatherApi

        default WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder weatherApi​(String weatherApi)
        The API to use (current, forecast/3 hour, forecast daily, station). The option will be converted to a <code>org.apache.camel.component.weather.WeatherApi</code> type. Group: common
        Parameters:
        weatherApi - the value to set
        Returns:
        the dsl builder
      • bridgeErrorHandler

        default WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder bridgeErrorHandler​(boolean bridgeErrorHandler)
        Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. The option is a: <code>boolean</code> type. Default: false Group: consumer
        Parameters:
        bridgeErrorHandler - the value to set
        Returns:
        the dsl builder
      • bridgeErrorHandler

        default WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder bridgeErrorHandler​(String bridgeErrorHandler)
        Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. The option will be converted to a <code>boolean</code> type. Default: false Group: consumer
        Parameters:
        bridgeErrorHandler - the value to set
        Returns:
        the dsl builder
      • sendEmptyMessageWhenIdle

        default WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder sendEmptyMessageWhenIdle​(boolean sendEmptyMessageWhenIdle)
        If the polling consumer did not poll any files, you can enable this option to send an empty message (no body) instead. The option is a: <code>boolean</code> type. Default: false Group: consumer
        Parameters:
        sendEmptyMessageWhenIdle - the value to set
        Returns:
        the dsl builder
      • sendEmptyMessageWhenIdle

        default WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder sendEmptyMessageWhenIdle​(String sendEmptyMessageWhenIdle)
        If the polling consumer did not poll any files, you can enable this option to send an empty message (no body) instead. The option will be converted to a <code>boolean</code> type. Default: false Group: consumer
        Parameters:
        sendEmptyMessageWhenIdle - the value to set
        Returns:
        the dsl builder
      • ids

        default WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder ids​(String ids)
        List of id's of city/stations. You can separate multiple ids by comma. The option will be converted to a <code>java.util.List&lt;java.lang.String&gt;</code> type. Group: filter
        Parameters:
        ids - the value to set
        Returns:
        the dsl builder
      • lat

        default WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder lat​(String lat)
        Latitude of location. You can use lat and lon options instead of location. For boxed queries this is the bottom latitude. The option is a: <code>java.lang.String</code> type. Group: filter
        Parameters:
        lat - the value to set
        Returns:
        the dsl builder
      • location

        default WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder location​(String location)
        If null Camel will try and determine your current location using the geolocation of your ip address, else specify the city,country. For well known city names, Open Weather Map will determine the best fit, but multiple results may be returned. Hence specifying and country as well will return more accurate data. If you specify current as the location then the component will try to get the current latitude and longitude and use that to get the weather details. You can use lat and lon options instead of location. The option is a: <code>java.lang.String</code> type. Group: filter
        Parameters:
        location - the value to set
        Returns:
        the dsl builder
      • lon

        default WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder lon​(String lon)
        Longitude of location. You can use lat and lon options instead of location. For boxed queries this is the left longtitude. The option is a: <code>java.lang.String</code> type. Group: filter
        Parameters:
        lon - the value to set
        Returns:
        the dsl builder
      • rightLon

        default WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder rightLon​(String rightLon)
        For boxed queries this is the right longtitude. Needs to be used in combination with topLat and zoom. The option is a: <code>java.lang.String</code> type. Group: filter
        Parameters:
        rightLon - the value to set
        Returns:
        the dsl builder
      • topLat

        default WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder topLat​(String topLat)
        For boxed queries this is the top latitude. Needs to be used in combination with rightLon and zoom. The option is a: <code>java.lang.String</code> type. Group: filter
        Parameters:
        topLat - the value to set
        Returns:
        the dsl builder
      • zoom

        default WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder zoom​(String zoom)
        For boxed queries this is the zoom. Needs to be used in combination with rightLon and topLat. The option will be converted to a <code>java.lang.Integer</code> type. Group: filter
        Parameters:
        zoom - the value to set
        Returns:
        the dsl builder
      • backoffErrorThreshold

        default WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder backoffErrorThreshold​(int backoffErrorThreshold)
        The number of subsequent error polls (failed due some error) that should happen before the backoffMultipler should kick-in. The option is a: <code>int</code> type. Group: scheduler
        Parameters:
        backoffErrorThreshold - the value to set
        Returns:
        the dsl builder
      • backoffErrorThreshold

        default WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder backoffErrorThreshold​(String backoffErrorThreshold)
        The number of subsequent error polls (failed due some error) that should happen before the backoffMultipler should kick-in. The option will be converted to a <code>int</code> type. Group: scheduler
        Parameters:
        backoffErrorThreshold - the value to set
        Returns:
        the dsl builder
      • backoffIdleThreshold

        default WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder backoffIdleThreshold​(int backoffIdleThreshold)
        The number of subsequent idle polls that should happen before the backoffMultipler should kick-in. The option is a: <code>int</code> type. Group: scheduler
        Parameters:
        backoffIdleThreshold - the value to set
        Returns:
        the dsl builder
      • backoffIdleThreshold

        default WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder backoffIdleThreshold​(String backoffIdleThreshold)
        The number of subsequent idle polls that should happen before the backoffMultipler should kick-in. The option will be converted to a <code>int</code> type. Group: scheduler
        Parameters:
        backoffIdleThreshold - the value to set
        Returns:
        the dsl builder
      • backoffMultiplier

        default WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder backoffMultiplier​(int backoffMultiplier)
        To let the scheduled polling consumer backoff if there has been a number of subsequent idles/errors in a row. The multiplier is then the number of polls that will be skipped before the next actual attempt is happening again. When this option is in use then backoffIdleThreshold and/or backoffErrorThreshold must also be configured. The option is a: <code>int</code> type. Group: scheduler
        Parameters:
        backoffMultiplier - the value to set
        Returns:
        the dsl builder
      • backoffMultiplier

        default WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder backoffMultiplier​(String backoffMultiplier)
        To let the scheduled polling consumer backoff if there has been a number of subsequent idles/errors in a row. The multiplier is then the number of polls that will be skipped before the next actual attempt is happening again. When this option is in use then backoffIdleThreshold and/or backoffErrorThreshold must also be configured. The option will be converted to a <code>int</code> type. Group: scheduler
        Parameters:
        backoffMultiplier - the value to set
        Returns:
        the dsl builder
      • greedy

        default WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder greedy​(boolean greedy)
        If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the previous run polled 1 or more messages. The option is a: <code>boolean</code> type. Default: false Group: scheduler
        Parameters:
        greedy - the value to set
        Returns:
        the dsl builder
      • greedy

        default WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder greedy​(String greedy)
        If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the previous run polled 1 or more messages. The option will be converted to a <code>boolean</code> type. Default: false Group: scheduler
        Parameters:
        greedy - the value to set
        Returns:
        the dsl builder
      • initialDelay

        default WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder initialDelay​(long initialDelay)
        Milliseconds before the first poll starts. The option is a: <code>long</code> type. Default: 1000 Group: scheduler
        Parameters:
        initialDelay - the value to set
        Returns:
        the dsl builder
      • repeatCount

        default WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder repeatCount​(long repeatCount)
        Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only fire once. If you set it to 5, it will only fire five times. A value of zero or negative means fire forever. The option is a: <code>long</code> type. Default: 0 Group: scheduler
        Parameters:
        repeatCount - the value to set
        Returns:
        the dsl builder
      • repeatCount

        default WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder repeatCount​(String repeatCount)
        Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only fire once. If you set it to 5, it will only fire five times. A value of zero or negative means fire forever. The option will be converted to a <code>long</code> type. Default: 0 Group: scheduler
        Parameters:
        repeatCount - the value to set
        Returns:
        the dsl builder
      • runLoggingLevel

        default WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder runLoggingLevel​(org.apache.camel.LoggingLevel runLoggingLevel)
        The consumer logs a start/complete log line when it polls. This option allows you to configure the logging level for that. The option is a: <code>org.apache.camel.LoggingLevel</code> type. Default: TRACE Group: scheduler
        Parameters:
        runLoggingLevel - the value to set
        Returns:
        the dsl builder
      • runLoggingLevel

        default WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder runLoggingLevel​(String runLoggingLevel)
        The consumer logs a start/complete log line when it polls. This option allows you to configure the logging level for that. The option will be converted to a <code>org.apache.camel.LoggingLevel</code> type. Default: TRACE Group: scheduler
        Parameters:
        runLoggingLevel - the value to set
        Returns:
        the dsl builder
      • scheduledExecutorService

        default WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder scheduledExecutorService​(ScheduledExecutorService scheduledExecutorService)
        Allows for configuring a custom/shared thread pool to use for the consumer. By default each consumer has its own single threaded thread pool. The option is a: <code>java.util.concurrent.ScheduledExecutorService</code> type. Group: scheduler
        Parameters:
        scheduledExecutorService - the value to set
        Returns:
        the dsl builder
      • scheduledExecutorService

        default WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder scheduledExecutorService​(String scheduledExecutorService)
        Allows for configuring a custom/shared thread pool to use for the consumer. By default each consumer has its own single threaded thread pool. The option will be converted to a <code>java.util.concurrent.ScheduledExecutorService</code> type. Group: scheduler
        Parameters:
        scheduledExecutorService - the value to set
        Returns:
        the dsl builder
      • scheduler

        default WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder scheduler​(Object scheduler)
        To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or quartz for built in scheduler. The option is a: <code>java.lang.Object</code> type. Default: none Group: scheduler
        Parameters:
        scheduler - the value to set
        Returns:
        the dsl builder
      • scheduler

        default WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder scheduler​(String scheduler)
        To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or quartz for built in scheduler. The option will be converted to a <code>java.lang.Object</code> type. Default: none Group: scheduler
        Parameters:
        scheduler - the value to set
        Returns:
        the dsl builder
      • schedulerProperties

        default WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder schedulerProperties​(String key,
                                                                                                 Object value)
        To configure additional properties when using a custom scheduler or any of the Quartz, Spring based scheduler. The option is a: <code>java.util.Map&lt;java.lang.String, java.lang.Object&gt;</code> type. The option is multivalued, and you can use the schedulerProperties(String, Object) method to add a value (call the method multiple times to set more values). Group: scheduler
        Parameters:
        key - the option key
        value - the option value
        Returns:
        the dsl builder
      • schedulerProperties

        default WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder schedulerProperties​(Map values)
        To configure additional properties when using a custom scheduler or any of the Quartz, Spring based scheduler. The option is a: <code>java.util.Map&lt;java.lang.String, java.lang.Object&gt;</code> type. The option is multivalued, and you can use the schedulerProperties(String, Object) method to add a value (call the method multiple times to set more values). Group: scheduler
        Parameters:
        values - the values
        Returns:
        the dsl builder
      • startScheduler

        default WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder startScheduler​(boolean startScheduler)
        Whether the scheduler should be auto started. The option is a: <code>boolean</code> type. Default: true Group: scheduler
        Parameters:
        startScheduler - the value to set
        Returns:
        the dsl builder
      • startScheduler

        default WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder startScheduler​(String startScheduler)
        Whether the scheduler should be auto started. The option will be converted to a <code>boolean</code> type. Default: true Group: scheduler
        Parameters:
        startScheduler - the value to set
        Returns:
        the dsl builder
      • timeUnit

        default WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder timeUnit​(String timeUnit)
        Time unit for initialDelay and delay options. The option will be converted to a <code>java.util.concurrent.TimeUnit</code> type. Default: MILLISECONDS Group: scheduler
        Parameters:
        timeUnit - the value to set
        Returns:
        the dsl builder
      • useFixedDelay

        default WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder useFixedDelay​(boolean useFixedDelay)
        Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. The option is a: <code>boolean</code> type. Default: true Group: scheduler
        Parameters:
        useFixedDelay - the value to set
        Returns:
        the dsl builder
      • useFixedDelay

        default WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder useFixedDelay​(String useFixedDelay)
        Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. The option will be converted to a <code>boolean</code> type. Default: true Group: scheduler
        Parameters:
        useFixedDelay - the value to set
        Returns:
        the dsl builder
      • geolocationAccessKey

        default WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder geolocationAccessKey​(String geolocationAccessKey)
        The geolocation service now needs an accessKey to be used. The option is a: <code>java.lang.String</code> type. Required: true Group: security
        Parameters:
        geolocationAccessKey - the value to set
        Returns:
        the dsl builder
      • geolocationRequestHostIP

        default WeatherEndpointBuilderFactory.WeatherEndpointConsumerBuilder geolocationRequestHostIP​(String geolocationRequestHostIP)
        The geolocation service now needs to specify the IP associated to the accessKey you're using. The option is a: <code>java.lang.String</code> type. Required: true Group: security
        Parameters:
        geolocationRequestHostIP - the value to set
        Returns:
        the dsl builder