Class: Stealth::Services::BaseMessageHandler
- Inherits:
-
Object
- Object
- Stealth::Services::BaseMessageHandler
- Defined in:
- lib/stealth/services/base_message_handler.rb
Instance Attribute Summary collapse
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
-
#coordinate ⇒ Object
Should respond with a Rack response (github.com/sinatra/sinatra#return-values).
-
#initialize(params:, headers:) ⇒ BaseMessageHandler
constructor
A new instance of BaseMessageHandler.
-
#process ⇒ Object
After coordinate responds to the service, an optional async job may be fired that will continue the work via this method.
Constructor Details
#initialize(params:, headers:) ⇒ BaseMessageHandler
Returns a new instance of BaseMessageHandler.
10 11 12 13 |
# File 'lib/stealth/services/base_message_handler.rb', line 10 def initialize(params:, headers:) @params = params @headers = headers end |
Instance Attribute Details
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
8 9 10 |
# File 'lib/stealth/services/base_message_handler.rb', line 8 def headers @headers end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
8 9 10 |
# File 'lib/stealth/services/base_message_handler.rb', line 8 def params @params end |
Instance Method Details
#coordinate ⇒ Object
Should respond with a Rack response (github.com/sinatra/sinatra#return-values)
16 17 18 |
# File 'lib/stealth/services/base_message_handler.rb', line 16 def coordinate raise(Stealth::Errors::ServiceImpaired, "Service request handler does not implement 'process'") end |
#process ⇒ Object
After coordinate responds to the service, an optional async job may be fired that will continue the work via this method
22 23 24 |
# File 'lib/stealth/services/base_message_handler.rb', line 22 def process end |