Class: Liebre::Actor::RPC::Client::Reporter
- Inherits:
-
Object
- Object
- Liebre::Actor::RPC::Client::Reporter
- Defined in:
- lib/liebre/actor/rpc/client/reporter.rb
Instance Method Summary collapse
-
#initialize(context) ⇒ Reporter
constructor
A new instance of Reporter.
- #on_clean ⇒ Object
- #on_expire ⇒ Object
- #on_reply ⇒ Object
- #on_request ⇒ Object
- #on_start ⇒ Object
- #on_stop ⇒ Object
Constructor Details
#initialize(context) ⇒ Reporter
Returns a new instance of Reporter.
7 8 9 |
# File 'lib/liebre/actor/rpc/client/reporter.rb', line 7 def initialize context @context = context end |
Instance Method Details
#on_clean ⇒ Object
48 49 50 51 52 53 |
# File 'lib/liebre/actor/rpc/client/reporter.rb', line 48 def on_clean yield rescue Exception => error logger.error("Error cleaning RPC client: #{name}\n#{error.message}\n#{error.backtrace}") raise error end |
#on_expire ⇒ Object
41 42 43 44 45 46 |
# File 'lib/liebre/actor/rpc/client/reporter.rb', line 41 def on_expire yield rescue Exception => error logger.error("Error expiring RPC client pending requests: #{name}\n#{error.message}\n#{error.backtrace}") raise error end |
#on_reply ⇒ Object
34 35 36 37 38 39 |
# File 'lib/liebre/actor/rpc/client/reporter.rb', line 34 def on_reply yield rescue Exception => error logger.error("Error receiving request reply: #{name}\n#{error.message}\n#{error.backtrace}") raise error end |
#on_request ⇒ Object
27 28 29 30 31 32 |
# File 'lib/liebre/actor/rpc/client/reporter.rb', line 27 def on_request yield rescue Exception => error logger.error("Error performing request: #{name}\n#{error.message}\n#{error.backtrace}") raise error end |
#on_start ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/liebre/actor/rpc/client/reporter.rb', line 11 def on_start yield logger.info("RPC client started: #{name}") rescue Exception => error logger.error("Error starting RPC client: #{name}\n#{error.message}\n#{error.backtrace}") raise error end |
#on_stop ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/liebre/actor/rpc/client/reporter.rb', line 19 def on_stop yield logger.info("RPC client stopped: #{name}") rescue Exception => error logger.error("Error stopping RPC client: #{name}\n#{error.message}\n#{error.backtrace}") raise error end |