Class: Operaton::Bpm::Client::Impl::ExternalTaskClientImpl
- Inherits:
-
Object
- Object
- Operaton::Bpm::Client::Impl::ExternalTaskClientImpl
- Defined in:
- lib/operaton/bpm/client/impl/external_task_client_impl.rb
Overview
Mirrors org.operaton.bpm.client.impl.ExternalTaskClientImpl
Instance Attribute Summary collapse
-
#topic_subscription_manager ⇒ Object
readonly
Returns the value of attribute topic_subscription_manager.
Instance Method Summary collapse
-
#active? ⇒ Boolean
(also: #is_active?)
True while the client is actively fetching tasks.
-
#initialize(topic_subscription_manager) ⇒ ExternalTaskClientImpl
constructor
A new instance of ExternalTaskClientImpl.
-
#start ⇒ Object
Starts continuous fetching and locking of tasks.
-
#stop ⇒ Object
Stops continuous fetching and locking of tasks.
-
#subscribe(topic_name) ⇒ Object
Creates a fluent builder to create and configure a topic subscription.
Constructor Details
#initialize(topic_subscription_manager) ⇒ ExternalTaskClientImpl
Returns a new instance of ExternalTaskClientImpl.
13 14 15 |
# File 'lib/operaton/bpm/client/impl/external_task_client_impl.rb', line 13 def initialize(topic_subscription_manager) @topic_subscription_manager = topic_subscription_manager end |
Instance Attribute Details
#topic_subscription_manager ⇒ Object (readonly)
Returns the value of attribute topic_subscription_manager.
11 12 13 |
# File 'lib/operaton/bpm/client/impl/external_task_client_impl.rb', line 11 def topic_subscription_manager @topic_subscription_manager end |
Instance Method Details
#active? ⇒ Boolean Also known as: is_active?
True while the client is actively fetching tasks.
33 34 35 |
# File 'lib/operaton/bpm/client/impl/external_task_client_impl.rb', line 33 def active? topic_subscription_manager.running? end |
#start ⇒ Object
Starts continuous fetching and locking of tasks.
28 29 30 |
# File 'lib/operaton/bpm/client/impl/external_task_client_impl.rb', line 28 def start topic_subscription_manager.start end |
#stop ⇒ Object
Stops continuous fetching and locking of tasks.
23 24 25 |
# File 'lib/operaton/bpm/client/impl/external_task_client_impl.rb', line 23 def stop topic_subscription_manager.stop end |
#subscribe(topic_name) ⇒ Object
Creates a fluent builder to create and configure a topic subscription.
18 19 20 |
# File 'lib/operaton/bpm/client/impl/external_task_client_impl.rb', line 18 def subscribe(topic_name) Topic::Impl::TopicSubscriptionBuilderImpl.new(topic_name, topic_subscription_manager) end |