Class: PatientHttp::InlineTaskHandler Private

Inherits:
TaskHandler show all
Defined in:
lib/patient_http/inline_task_handler.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

No-op task handler used for inline request execution.

The SynchronousExecutor invokes the user callback directly, so the completion and error hooks here are never exercised in practice; they are defined as no-ops to satisfy the TaskHandler contract. Inline requests have no job queue, so retrying is not supported.

Instance Method Summary collapse

Instance Method Details

#on_complete(response, callback) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

This method returns an undefined value.

Parameters:

  • response (Response)

    the HTTP response object

  • callback (String)

    callback class name



16
17
# File 'lib/patient_http/inline_task_handler.rb', line 16

def on_complete(response, callback)
end

#on_error(error, callback) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

This method returns an undefined value.

Parameters:

  • error (Error)

    the error object

  • callback (String)

    callback class name



22
23
# File 'lib/patient_http/inline_task_handler.rb', line 22

def on_error(error, callback)
end

#retryObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Raises:

  • (NotImplementedError)

    inline requests cannot be retried



26
27
28
# File 'lib/patient_http/inline_task_handler.rb', line 26

def retry
  raise NotImplementedError, "Inline requests cannot be retried"
end