Module: RubyRabbitmqJanus::Models::JanusInstanceCallbacks
- Extended by:
- ActiveSupport::Concern
- Included in:
- JanusInstance
- Defined in:
- lib/rrj/models/concerns/janus_instance_callbacks.rb
Overview
Configure callback for Janus Instance models
Instance Method Summary collapse
-
#callback_create_after ⇒ Object
Create a session in Janus Instance.
-
#callback_destroy_after ⇒ Object
Destroy a session in Janus Instance :reek:UtilityFunction.
-
#callback_update_after ⇒ Object
Update a keepalive transaction in Janus Instance Enable or Disable transaction.
Instance Method Details
#callback_create_after ⇒ Object
Create a session in Janus Instance
11 12 13 14 |
# File 'lib/rrj/models/concerns/janus_instance_callbacks.rb', line 11 def callback_create_after Tools::Log.instance.debug 'Callback AFTER_VALIDATION' create_a_session_in_janus_instance if enable end |
#callback_destroy_after ⇒ Object
Destroy a session in Janus Instance :reek:UtilityFunction
29 30 31 32 |
# File 'lib/rrj/models/concerns/janus_instance_callbacks.rb', line 29 def callback_destroy_after Tools::Log.instance.debug 'Callback AFTER_DESTROY' # LCO: nothing to do, thread will close session and die end |
#callback_update_after ⇒ Object
Update a keepalive transaction in Janus Instance Enable or Disable transaction
18 19 20 21 22 23 24 25 |
# File 'lib/rrj/models/concerns/janus_instance_callbacks.rb', line 18 def callback_update_after Tools::Log.instance.debug 'Callback AFTER_UPDATE' if enable && enable_changed? create_a_session_in_janus_instance elsif !enable && enable_changed? destroy_a_session_in_janus_instance end end |