Sha256: 5dda1fdcb4295140f0c8a760ca88c6a6e61d3e37c6c96b959d4bf7ab9767b011

Contents?: true

Size: 642 Bytes

Versions: 1

Compression:

Stored size: 642 Bytes

Contents

# frozen_string_literal: true

module Xip
  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(Xip::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

1 entries across 1 versions & 1 rubygems

Version Path
xip-2.0.0.beta2 lib/xip/services/base_message_handler.rb