Interface SoroushBotEndpointBuilderFactory.SoroushBotEndpointProducerBuilder

  • All Superinterfaces:
    org.apache.camel.builder.EndpointProducerBuilder, org.apache.camel.EndpointProducerResolver
    All Known Subinterfaces:
    SoroushBotEndpointBuilderFactory.SoroushBotEndpointBuilder
    Enclosing interface:
    SoroushBotEndpointBuilderFactory

    public static interface SoroushBotEndpointBuilderFactory.SoroushBotEndpointProducerBuilder
    extends org.apache.camel.builder.EndpointProducerBuilder
    Builder for endpoint producers for the Soroush component.
    • Method Detail

      • connectionTimeout

        default SoroushBotEndpointBuilderFactory.SoroushBotEndpointProducerBuilder connectionTimeout​(int connectionTimeout)
        Connection timeout in ms when connecting to soroush API. The option is a: <code>int</code> type. Default: 30000 Group: common
        Parameters:
        connectionTimeout - the value to set
        Returns:
        the dsl builder
      • connectionTimeout

        default SoroushBotEndpointBuilderFactory.SoroushBotEndpointProducerBuilder connectionTimeout​(String connectionTimeout)
        Connection timeout in ms when connecting to soroush API. The option will be converted to a <code>int</code> type. Default: 30000 Group: common
        Parameters:
        connectionTimeout - the value to set
        Returns:
        the dsl builder
      • maxConnectionRetry

        default SoroushBotEndpointBuilderFactory.SoroushBotEndpointProducerBuilder maxConnectionRetry​(int maxConnectionRetry)
        Maximum connection retry when fail to connect to soroush API, if the quota is reached, MaximumConnectionRetryReachedException is thrown for that message. The option is a: <code>int</code> type. Default: 4 Group: common
        Parameters:
        maxConnectionRetry - the value to set
        Returns:
        the dsl builder
      • maxConnectionRetry

        default SoroushBotEndpointBuilderFactory.SoroushBotEndpointProducerBuilder maxConnectionRetry​(String maxConnectionRetry)
        Maximum connection retry when fail to connect to soroush API, if the quota is reached, MaximumConnectionRetryReachedException is thrown for that message. The option will be converted to a <code>int</code> type. Default: 4 Group: common
        Parameters:
        maxConnectionRetry - the value to set
        Returns:
        the dsl builder
      • autoDownload

        default SoroushBotEndpointBuilderFactory.SoroushBotEndpointProducerBuilder autoDownload​(boolean autoDownload)
        Automatically download SoroushMessage.fileUrl and SoroushMessage.thumbnailUrl if exists for the message and store them in SoroushMessage.file and SoroushMessage.thumbnail field. The option is a: <code>boolean</code> type. Default: false Group: producer
        Parameters:
        autoDownload - the value to set
        Returns:
        the dsl builder
      • autoDownload

        default SoroushBotEndpointBuilderFactory.SoroushBotEndpointProducerBuilder autoDownload​(String autoDownload)
        Automatically download SoroushMessage.fileUrl and SoroushMessage.thumbnailUrl if exists for the message and store them in SoroushMessage.file and SoroushMessage.thumbnail field. The option will be converted to a <code>boolean</code> type. Default: false Group: producer
        Parameters:
        autoDownload - the value to set
        Returns:
        the dsl builder
      • autoUploadFile

        default SoroushBotEndpointBuilderFactory.SoroushBotEndpointProducerBuilder autoUploadFile​(boolean autoUploadFile)
        Automatically upload attachments when a message goes to the sendMessage endpoint and the SoroushMessage.file (SoroushMessage.thumbnail) has been set and SoroushMessage.fileUrl(SoroushMessage.thumbnailUrl) is null. The option is a: <code>boolean</code> type. Default: true Group: producer
        Parameters:
        autoUploadFile - the value to set
        Returns:
        the dsl builder
      • autoUploadFile

        default SoroushBotEndpointBuilderFactory.SoroushBotEndpointProducerBuilder autoUploadFile​(String autoUploadFile)
        Automatically upload attachments when a message goes to the sendMessage endpoint and the SoroushMessage.file (SoroushMessage.thumbnail) has been set and SoroushMessage.fileUrl(SoroushMessage.thumbnailUrl) is null. The option will be converted to a <code>boolean</code> type. Default: true Group: producer
        Parameters:
        autoUploadFile - the value to set
        Returns:
        the dsl builder
      • downloadThumbnail

        default SoroushBotEndpointBuilderFactory.SoroushBotEndpointProducerBuilder downloadThumbnail​(boolean downloadThumbnail)
        If true, when downloading an attached file, thumbnail will be downloaded if provided in the message. Otherwise, only the file will be downloaded. The option is a: <code>boolean</code> type. Default: true Group: producer
        Parameters:
        downloadThumbnail - the value to set
        Returns:
        the dsl builder
      • downloadThumbnail

        default SoroushBotEndpointBuilderFactory.SoroushBotEndpointProducerBuilder downloadThumbnail​(String downloadThumbnail)
        If true, when downloading an attached file, thumbnail will be downloaded if provided in the message. Otherwise, only the file will be downloaded. The option will be converted to a <code>boolean</code> type. Default: true Group: producer
        Parameters:
        downloadThumbnail - the value to set
        Returns:
        the dsl builder
      • forceDownload

        default SoroushBotEndpointBuilderFactory.SoroushBotEndpointProducerBuilder forceDownload​(boolean forceDownload)
        Force to download SoroushMessage.fileUrl(SoroushMessage.thumbnailUrl) if exists, even if the SoroushMessage.file(SoroushMessage.thumbnail) was not null in that message. The option is a: <code>boolean</code> type. Default: false Group: producer
        Parameters:
        forceDownload - the value to set
        Returns:
        the dsl builder
      • forceDownload

        default SoroushBotEndpointBuilderFactory.SoroushBotEndpointProducerBuilder forceDownload​(String forceDownload)
        Force to download SoroushMessage.fileUrl(SoroushMessage.thumbnailUrl) if exists, even if the SoroushMessage.file(SoroushMessage.thumbnail) was not null in that message. The option will be converted to a <code>boolean</code> type. Default: false Group: producer
        Parameters:
        forceDownload - the value to set
        Returns:
        the dsl builder
      • forceUpload

        default SoroushBotEndpointBuilderFactory.SoroushBotEndpointProducerBuilder forceUpload​(boolean forceUpload)
        Force to upload SoroushMessage.file(SoroushMessage.thumbnail) if exists, even if the SoroushMessage.fileUrl(SoroushMessage.thumbnailUrl) is not null in the message. The option is a: <code>boolean</code> type. Default: false Group: producer
        Parameters:
        forceUpload - the value to set
        Returns:
        the dsl builder
      • forceUpload

        default SoroushBotEndpointBuilderFactory.SoroushBotEndpointProducerBuilder forceUpload​(String forceUpload)
        Force to upload SoroushMessage.file(SoroushMessage.thumbnail) if exists, even if the SoroushMessage.fileUrl(SoroushMessage.thumbnailUrl) is not null in the message. The option will be converted to a <code>boolean</code> type. Default: false Group: producer
        Parameters:
        forceUpload - the value to set
        Returns:
        the dsl builder
      • lazyStartProducer

        default SoroushBotEndpointBuilderFactory.SoroushBotEndpointProducerBuilder lazyStartProducer​(boolean lazyStartProducer)
        Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. The option is a: <code>boolean</code> type. Default: false Group: producer
        Parameters:
        lazyStartProducer - the value to set
        Returns:
        the dsl builder
      • lazyStartProducer

        default SoroushBotEndpointBuilderFactory.SoroushBotEndpointProducerBuilder lazyStartProducer​(String lazyStartProducer)
        Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. The option will be converted to a <code>boolean</code> type. Default: false Group: producer
        Parameters:
        lazyStartProducer - the value to set
        Returns:
        the dsl builder
      • backOffStrategy

        default SoroushBotEndpointBuilderFactory.SoroushBotEndpointProducerBuilder backOffStrategy​(String backOffStrategy)
        The strategy to backoff in case of connection failure. Currently 3 strategies are supported: 1. Exponential (default): It multiply retryWaitingTime by retryExponentialCoefficient after each connection failure. 2. Linear: It increase retryWaitingTime by retryLinearIncrement after each connection failure. 3. Fixed: Always use retryWaitingTime as the time between retries. The option is a: <code>java.lang.String</code> type. Default: Exponential Group: scheduling
        Parameters:
        backOffStrategy - the value to set
        Returns:
        the dsl builder
      • maxRetryWaitingTime

        default SoroushBotEndpointBuilderFactory.SoroushBotEndpointProducerBuilder maxRetryWaitingTime​(long maxRetryWaitingTime)
        Maximum amount of time (in millisecond) a thread wait before retrying failed request. The option is a: <code>long</code> type. Default: 3600000 Group: scheduling
        Parameters:
        maxRetryWaitingTime - the value to set
        Returns:
        the dsl builder
      • maxRetryWaitingTime

        default SoroushBotEndpointBuilderFactory.SoroushBotEndpointProducerBuilder maxRetryWaitingTime​(String maxRetryWaitingTime)
        Maximum amount of time (in millisecond) a thread wait before retrying failed request. The option will be converted to a <code>long</code> type. Default: 3600000 Group: scheduling
        Parameters:
        maxRetryWaitingTime - the value to set
        Returns:
        the dsl builder
      • reconnectIdleConnectionTimeout

        default SoroushBotEndpointBuilderFactory.SoroushBotEndpointProducerBuilder reconnectIdleConnectionTimeout​(long reconnectIdleConnectionTimeout)
        The timeout in millisecond to reconnect the existing getMessage connection to ensure that the connection is always live and does not dead without notifying the bot. this value should not be changed. The option is a: <code>long</code> type. Default: 300000 Group: scheduling
        Parameters:
        reconnectIdleConnectionTimeout - the value to set
        Returns:
        the dsl builder
      • reconnectIdleConnectionTimeout

        default SoroushBotEndpointBuilderFactory.SoroushBotEndpointProducerBuilder reconnectIdleConnectionTimeout​(String reconnectIdleConnectionTimeout)
        The timeout in millisecond to reconnect the existing getMessage connection to ensure that the connection is always live and does not dead without notifying the bot. this value should not be changed. The option will be converted to a <code>long</code> type. Default: 300000 Group: scheduling
        Parameters:
        reconnectIdleConnectionTimeout - the value to set
        Returns:
        the dsl builder
      • retryExponentialCoefficient

        default SoroushBotEndpointBuilderFactory.SoroushBotEndpointProducerBuilder retryExponentialCoefficient​(long retryExponentialCoefficient)
        Coefficient to compute back off time when using Exponential Back Off strategy. The option is a: <code>long</code> type. Default: 2 Group: scheduling
        Parameters:
        retryExponentialCoefficient - the value to set
        Returns:
        the dsl builder
      • retryExponentialCoefficient

        default SoroushBotEndpointBuilderFactory.SoroushBotEndpointProducerBuilder retryExponentialCoefficient​(String retryExponentialCoefficient)
        Coefficient to compute back off time when using Exponential Back Off strategy. The option will be converted to a <code>long</code> type. Default: 2 Group: scheduling
        Parameters:
        retryExponentialCoefficient - the value to set
        Returns:
        the dsl builder
      • retryLinearIncrement

        default SoroushBotEndpointBuilderFactory.SoroushBotEndpointProducerBuilder retryLinearIncrement​(long retryLinearIncrement)
        The amount of time (in millisecond) which adds to waiting time when using Linear back off strategy. The option is a: <code>long</code> type. Default: 10000 Group: scheduling
        Parameters:
        retryLinearIncrement - the value to set
        Returns:
        the dsl builder
      • retryLinearIncrement

        default SoroushBotEndpointBuilderFactory.SoroushBotEndpointProducerBuilder retryLinearIncrement​(String retryLinearIncrement)
        The amount of time (in millisecond) which adds to waiting time when using Linear back off strategy. The option will be converted to a <code>long</code> type. Default: 10000 Group: scheduling
        Parameters:
        retryLinearIncrement - the value to set
        Returns:
        the dsl builder
      • retryWaitingTime

        default SoroushBotEndpointBuilderFactory.SoroushBotEndpointProducerBuilder retryWaitingTime​(long retryWaitingTime)
        Waiting time before retry failed request (Millisecond). If backOffStrategy is not Fixed this is the based value for computing back off waiting time. the first retry is always happen immediately after failure and retryWaitingTime do not apply to the first retry. The option is a: <code>long</code> type. Default: 1000 Group: scheduling
        Parameters:
        retryWaitingTime - the value to set
        Returns:
        the dsl builder
      • retryWaitingTime

        default SoroushBotEndpointBuilderFactory.SoroushBotEndpointProducerBuilder retryWaitingTime​(String retryWaitingTime)
        Waiting time before retry failed request (Millisecond). If backOffStrategy is not Fixed this is the based value for computing back off waiting time. the first retry is always happen immediately after failure and retryWaitingTime do not apply to the first retry. The option will be converted to a <code>long</code> type. Default: 1000 Group: scheduling
        Parameters:
        retryWaitingTime - the value to set
        Returns:
        the dsl builder
      • authorizationToken

        default SoroushBotEndpointBuilderFactory.SoroushBotEndpointProducerBuilder authorizationToken​(String authorizationToken)
        The authorization token for using the bot. if uri path does not contain authorization token, this token will be used. The option is a: <code>java.lang.String</code> type. Group: security
        Parameters:
        authorizationToken - the value to set
        Returns:
        the dsl builder