Class: PatientHttp::ProcessorObserver
- Inherits:
-
Object
- Object
- PatientHttp::ProcessorObserver
- Defined in:
- lib/patient_http/processor_observer.rb
Overview
Interface for observing request processing. A process observer can be registered with a Processor and receive events as requests are processed. Observers will run on the main processor thread and so should be lightweight and not do processing other than recording metrics or similar.
Instance Method Summary collapse
-
#capacity_exceeded ⇒ void
Called when a request cannot be enqueued because the processor is at capacity.
-
#request_end(request_task) ⇒ void
Called when a request finishes processing.
-
#request_error(error) ⇒ void
Called when a request encounters an error.
-
#request_start(request_task) ⇒ void
Called when a request starts processing.
-
#start ⇒ void
Called when the processor starts.
-
#stop ⇒ void
Called when the processor stops.
Instance Method Details
#capacity_exceeded ⇒ void
This method returns an undefined value.
Called when a request cannot be enqueued because the processor is at capacity.
24 25 |
# File 'lib/patient_http/processor_observer.rb', line 24 def capacity_exceeded end |
#request_end(request_task) ⇒ void
This method returns an undefined value.
Called when a request finishes processing.
38 39 |
# File 'lib/patient_http/processor_observer.rb', line 38 def request_end(request_task) end |
#request_error(error) ⇒ void
This method returns an undefined value.
Called when a request encounters an error.
45 46 |
# File 'lib/patient_http/processor_observer.rb', line 45 def request_error(error) end |
#request_start(request_task) ⇒ void
This method returns an undefined value.
Called when a request starts processing.
31 32 |
# File 'lib/patient_http/processor_observer.rb', line 31 def request_start(request_task) end |
#start ⇒ void
This method returns an undefined value.
Called when the processor starts.
12 13 |
# File 'lib/patient_http/processor_observer.rb', line 12 def start end |
#stop ⇒ void
This method returns an undefined value.
Called when the processor stops.
18 19 |
# File 'lib/patient_http/processor_observer.rb', line 18 def stop end |