Sha256: f7306faaa3ba4f24dad62a75b7101aa928d5d8d2114d2fd0068d9466eef1a6a8

Contents?: true

Size: 666 Bytes

Versions: 35

Compression:

Stored size: 666 Bytes

Contents

# coding: utf-8
# frozen_string_literal: true

module Stealth
  module Services
    class BaseMessageHandler

      attr_reader :params, :headers

      def initialize(params:, headers:)
        @params = params
        @headers = headers
      end

      # Should respond with a Rack response (https://github.com/sinatra/sinatra#return-values)
      def coordinate
        raise(Stealth::Errors::ServiceImpaired, "Service request handler does not implement 'process'")
      end

      # After coordinate responds to the service, an optional async job
      # may be fired that will continue the work via this method
      def process

      end

    end
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
stealth-2.0.0.beta7 lib/stealth/services/base_message_handler.rb
stealth-2.0.0.beta6 lib/stealth/services/base_message_handler.rb
stealth-2.0.0.beta5 lib/stealth/services/base_message_handler.rb
stealth-2.0.0.beta4 lib/stealth/services/base_message_handler.rb
stealth-2.0.0.beta3 lib/stealth/services/base_message_handler.rb
stealth-2.0.0.beta2 lib/stealth/services/base_message_handler.rb
stealth-2.0.0.beta1 lib/stealth/services/base_message_handler.rb
stealth-1.1.6 lib/stealth/services/base_message_handler.rb
stealth-1.1.5 lib/stealth/services/base_message_handler.rb
stealth-1.1.4 lib/stealth/services/base_message_handler.rb
stealth-1.1.3 lib/stealth/services/base_message_handler.rb
stealth-1.1.2 lib/stealth/services/base_message_handler.rb
stealth-1.1.1 lib/stealth/services/base_message_handler.rb
stealth-1.1.0 lib/stealth/services/base_message_handler.rb
stealth-1.1.0.rc3 lib/stealth/services/base_message_handler.rb
stealth-1.1.0.rc2 lib/stealth/services/base_message_handler.rb
stealth-1.1.0.rc1 lib/stealth/services/base_message_handler.rb
stealth-1.0.4 lib/stealth/services/base_message_handler.rb
stealth-1.0.3 lib/stealth/services/base_message_handler.rb
stealth-1.0.2 lib/stealth/services/base_message_handler.rb