Class ExternalTaskClientBuilderImpl

    • Field Detail

      • baseUrl

        protected java.lang.String baseUrl
      • workerId

        protected java.lang.String workerId
      • maxTasks

        protected int maxTasks
      • usePriority

        protected boolean usePriority
      • asyncResponseTimeout

        protected java.lang.Long asyncResponseTimeout
      • lockDuration

        protected long lockDuration
      • defaultSerializationFormat

        protected java.lang.String defaultSerializationFormat
      • dateFormat

        protected java.lang.String dateFormat
      • objectMapper

        protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
      • isAutoFetchingEnabled

        protected boolean isAutoFetchingEnabled
      • isBackoffStrategyDisabled

        protected boolean isBackoffStrategyDisabled
    • Constructor Detail

      • ExternalTaskClientBuilderImpl

        public ExternalTaskClientBuilderImpl()
    • Method Detail

      • workerId

        public ExternalTaskClientBuilder workerId​(java.lang.String workerId)
        Description copied from interface: ExternalTaskClientBuilder
        A custom worker id the Workflow Engine is aware of. This information is optional. Note: make sure to choose a unique worker id If not given or null, a worker id is generated automatically which consists of the hostname as well as a random and unique 128 bit string (UUID).
        Specified by:
        workerId in interface ExternalTaskClientBuilder
        Parameters:
        workerId - the Workflow Engine is aware of
        Returns:
        the builder
      • maxTasks

        public ExternalTaskClientBuilder maxTasks​(int maxTasks)
        Description copied from interface: ExternalTaskClientBuilder
        Specifies the maximum amount of tasks that can be fetched within one request. This information is optional. Default is 10.
        Specified by:
        maxTasks in interface ExternalTaskClientBuilder
        Parameters:
        maxTasks - which are supposed to be fetched within one request
        Returns:
        the builder
      • asyncResponseTimeout

        public ExternalTaskClientBuilder asyncResponseTimeout​(long asyncResponseTimeout)
        Description copied from interface: ExternalTaskClientBuilder
        Asynchronous response (long polling) is enabled if a timeout is given. Specifies the maximum waiting time for the response of fetched and locked external tasks. The response is performed immediately, if external tasks are available in the moment of the request. This information is optional. Unless a timeout is given, fetch and lock responses are synchronous.
        Specified by:
        asyncResponseTimeout in interface ExternalTaskClientBuilder
        Parameters:
        asyncResponseTimeout - of fetched and locked external tasks in milliseconds
        Returns:
        the builder
      • lockDuration

        public ExternalTaskClientBuilder lockDuration​(long lockDuration)
        Specified by:
        lockDuration in interface ExternalTaskClientBuilder
        Parameters:
        lockDuration -
        • in milliseconds to lock the external tasks
        • must be greater than zero
        • the default lock duration is 20 seconds (20,000 milliseconds)
        • is overridden by the lock duration configured on a topic subscription
        Returns:
        the builder
      • defaultSerializationFormat

        public ExternalTaskClientBuilder defaultSerializationFormat​(java.lang.String defaultSerializationFormat)
        Description copied from interface: ExternalTaskClientBuilder
        Specifies the serialization format that is used to serialize objects when no specific format is requested. This option defaults to application/json.
        Specified by:
        defaultSerializationFormat in interface ExternalTaskClientBuilder
        Parameters:
        defaultSerializationFormat - serialization format to be used
        Returns:
        the builder
      • initBaseUrl

        protected void initBaseUrl()
      • sanitizeUrl

        protected java.lang.String sanitizeUrl​(java.lang.String url)
      • initWorkerId

        protected void initWorkerId()
      • checkInterceptors

        protected void checkInterceptors()
      • initObjectMapper

        protected void initObjectMapper()
      • initVariableMappers

        protected void initVariableMappers()
      • initEngineClient

        protected void initEngineClient()
      • initTopicSubscriptionManager

        protected void initTopicSubscriptionManager()
      • lookupDataFormats

        protected java.util.Map<java.lang.String,​DataFormat> lookupDataFormats()
      • lookupCustomDataFormats

        protected void lookupCustomDataFormats​(java.util.Map<java.lang.String,​DataFormat> dataFormats)
      • lookupProvider

        protected void lookupProvider​(java.util.Map<java.lang.String,​DataFormat> dataFormats,
                                      DataFormatProvider provider)
      • applyConfigurators

        protected void applyConfigurators​(java.util.Map<java.lang.String,​DataFormat> dataFormats)
      • checkHostname

        public java.lang.String checkHostname()
      • getHostname

        public java.lang.String getHostname()
                                     throws java.net.UnknownHostException
        Throws:
        java.net.UnknownHostException
      • getBaseUrl

        public java.lang.String getBaseUrl()
      • getWorkerId

        protected java.lang.String getWorkerId()
      • getMaxTasks

        protected int getMaxTasks()
      • getAsyncResponseTimeout

        protected java.lang.Long getAsyncResponseTimeout()
      • getLockDuration

        protected long getLockDuration()
      • isAutoFetchingEnabled

        protected boolean isAutoFetchingEnabled()
      • getDefaultSerializationFormat

        public java.lang.String getDefaultSerializationFormat()
      • getDateFormat

        public java.lang.String getDateFormat()
      • getObjectMapper

        public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()