Class: Operaton::Bpm::Client::Impl::ExternalTaskClientBuilderImpl
- Inherits:
-
Object
- Object
- Operaton::Bpm::Client::Impl::ExternalTaskClientBuilderImpl
show all
- Includes:
- ExternalTaskClientBuilder
- Defined in:
- lib/operaton/bpm/client/impl/external_task_client_builder_impl.rb
Overview
Mirrors org.operaton.bpm.client.impl.ExternalTaskClientBuilderImpl
Constant Summary
ExternalTaskClientBuilder::INTERFACE_METHODS
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
Returns a new instance of ExternalTaskClientBuilderImpl.
Instance Attribute Details
#engine_client ⇒ Object
Returns the value of attribute engine_client.
45
46
47
|
# File 'lib/operaton/bpm/client/impl/external_task_client_builder_impl.rb', line 45
def engine_client
@engine_client
end
|
#object_mapper ⇒ Object
Returns the value of attribute object_mapper.
45
46
47
|
# File 'lib/operaton/bpm/client/impl/external_task_client_builder_impl.rb', line 45
def object_mapper
@object_mapper
end
|
#typed_values ⇒ Object
Returns the value of attribute typed_values.
45
46
47
|
# File 'lib/operaton/bpm/client/impl/external_task_client_builder_impl.rb', line 45
def typed_values
@typed_values
end
|
#value_mappers ⇒ Object
Returns the value of attribute value_mappers.
45
46
47
|
# File 'lib/operaton/bpm/client/impl/external_task_client_builder_impl.rb', line 45
def value_mappers
@value_mappers
end
|
Instance Method Details
#add_interceptor(interceptor) ⇒ Object
85
86
87
88
|
# File 'lib/operaton/bpm/client/impl/external_task_client_builder_impl.rb', line 85
def add_interceptor(interceptor)
@interceptors << interceptor
self
end
|
#asc ⇒ Object
113
114
115
116
|
# File 'lib/operaton/bpm/client/impl/external_task_client_builder_impl.rb', line 113
def asc
@ordering_config.configure_direction_on_last_field(Task::OrderingConfig::Direction::ASC)
self
end
|
#async_response_timeout(async_response_timeout) ⇒ Object
123
124
125
126
|
# File 'lib/operaton/bpm/client/impl/external_task_client_builder_impl.rb', line 123
def async_response_timeout(async_response_timeout)
@async_response_timeout = async_response_timeout
self
end
|
#backoff_strategy(backoff_strategy) ⇒ Object
138
139
140
141
|
# File 'lib/operaton/bpm/client/impl/external_task_client_builder_impl.rb', line 138
def backoff_strategy(backoff_strategy)
@backoff_strategy = backoff_strategy
self
end
|
#base_url(base_url) ⇒ Object
70
71
72
73
|
# File 'lib/operaton/bpm/client/impl/external_task_client_builder_impl.rb', line 70
def base_url(base_url)
@url_resolver = PermanentUrlResolver.new(base_url)
self
end
|
#build ⇒ Object
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
|
# File 'lib/operaton/bpm/client/impl/external_task_client_builder_impl.rb', line 166
def build
raise logger.max_tasks_not_greater_than_zero_exception(@max_tasks) if @max_tasks <= 0
if !@async_response_timeout.nil? && @async_response_timeout <= 0
raise logger.async_response_timeout_not_greater_than_zero_exception(@async_response_timeout)
end
raise logger.lock_duration_is_not_greater_than_zero_exception(@lock_duration) if @lock_duration <= 0
raise logger.base_url_null_exception if @url_resolver.nil? || get_base_url.nil? || get_base_url.empty?
check_interceptors
@ordering_config.validate_ordering_properties
init_base_url
init_worker_id
init_object_mapper
init_engine_client
init_variable_mappers
init_topic_subscription_manager
ExternalTaskClientImpl.new(@topic_subscription_manager)
end
|
#customize_http_client(customizer = nil, &block) ⇒ Object
Accepts a block invoked with the Net::HTTP instance of every request.
161
162
163
164
|
# File 'lib/operaton/bpm/client/impl/external_task_client_builder_impl.rb', line 161
def customize_http_client(customizer = nil, &block)
@http_customizer = customizer || block
self
end
|
A Ruby strftime pattern (default "%Y-%m-%dT%H:%M:%S.%L%z", the
equivalent of the Java client's "yyyy-MM-dd'T'HH:mm:ss.SSSZ").
155
156
157
158
|
# File 'lib/operaton/bpm/client/impl/external_task_client_builder_impl.rb', line 155
def date_format(date_format)
@date_format = date_format
self
end
|
148
149
150
151
|
# File 'lib/operaton/bpm/client/impl/external_task_client_builder_impl.rb', line 148
def default_serialization_format(default_serialization_format)
@default_serialization_format = default_serialization_format
self
end
|
#desc ⇒ Object
118
119
120
121
|
# File 'lib/operaton/bpm/client/impl/external_task_client_builder_impl.rb', line 118
def desc
@ordering_config.configure_direction_on_last_field(Task::OrderingConfig::Direction::DESC)
self
end
|
#disable_auto_fetching ⇒ Object
133
134
135
136
|
# File 'lib/operaton/bpm/client/impl/external_task_client_builder_impl.rb', line 133
def disable_auto_fetching
@is_auto_fetching_enabled = false
self
end
|
#disable_backoff_strategy ⇒ Object
143
144
145
146
|
# File 'lib/operaton/bpm/client/impl/external_task_client_builder_impl.rb', line 143
def disable_backoff_strategy
@is_backoff_strategy_disabled = true
self
end
|
#get_base_url ⇒ Object
rubocop:disable Naming/AccessorMethodName
190
191
192
|
# File 'lib/operaton/bpm/client/impl/external_task_client_builder_impl.rb', line 190
def get_base_url @url_resolver.base_url
end
|
rubocop:disable Naming/AccessorMethodName
198
199
200
|
# File 'lib/operaton/bpm/client/impl/external_task_client_builder_impl.rb', line 198
def get_date_format @date_format
end
|
rubocop:disable Naming/AccessorMethodName
194
195
196
|
# File 'lib/operaton/bpm/client/impl/external_task_client_builder_impl.rb', line 194
def get_default_serialization_format @default_serialization_format
end
|
#lock_duration(lock_duration) ⇒ Object
128
129
130
131
|
# File 'lib/operaton/bpm/client/impl/external_task_client_builder_impl.rb', line 128
def lock_duration(lock_duration)
@lock_duration = lock_duration
self
end
|
#max_tasks(max_tasks) ⇒ Object
90
91
92
93
|
# File 'lib/operaton/bpm/client/impl/external_task_client_builder_impl.rb', line 90
def max_tasks(max_tasks)
@max_tasks = max_tasks
self
end
|
#order_by_create_time ⇒ Object
108
109
110
111
|
# File 'lib/operaton/bpm/client/impl/external_task_client_builder_impl.rb', line 108
def order_by_create_time
@ordering_config.configure_field(Task::OrderingConfig::SortingField::CREATE_TIME)
self
end
|
#url_resolver(url_resolver) ⇒ Object
75
76
77
78
|
# File 'lib/operaton/bpm/client/impl/external_task_client_builder_impl.rb', line 75
def url_resolver(url_resolver)
@url_resolver = url_resolver
self
end
|
#use_create_time(use_create_time) ⇒ Object
#use_priority(use_priority) ⇒ Object
95
96
97
98
|
# File 'lib/operaton/bpm/client/impl/external_task_client_builder_impl.rb', line 95
def use_priority(use_priority)
@use_priority = use_priority
self
end
|
#worker_id(worker_id) ⇒ Object
80
81
82
83
|
# File 'lib/operaton/bpm/client/impl/external_task_client_builder_impl.rb', line 80
def worker_id(worker_id)
@worker_id = worker_id
self
end
|