Sha256: eb159e80cf41d4ce7717e036c3085176819891d01c99be3ec84bc94d203d0ab0
Contents?: true
Size: 1.4 KB
Versions: 13
Compression:
Stored size: 1.4 KB
Contents
# frozen_string_literal: true # :reek:UtilityFunction module RubyRabbitmqJanus module Process module Concurrencies # Manage message used for keepalive thread # # @attribute [r] instance # @return [String] ID to Janus Instance class KeepaliveMessage attr_reader :instance def initialize(instance) @instance = instance.id end def session Janus::Messages::Standard.new('base::create', param_instance) end def response_session(message) RubyRabbitmqJanus::Janus::Responses::Standard.new(message).session end def keepalive(session) parameter = param_session(session) Janus::Messages::Standard.new('base::keepalive', parameter) end def response_acknowledgement(message) RubyRabbitmqJanus::Janus::Responses::Standard.new(message).error? end def destroy(session) parameter = param_session(session) Janus::Messages::Standard.new('base::destroy', parameter) end def response_destroy(message) RubyRabbitmqJanus::Janus::Responses::Standard.new(message) end private def param_instance { 'instance' => @instance } end def param_session(session) { 'session_id' => session }.merge(param_instance) end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems