Class: Bosh::Agent::AgentController
- Defined in:
- lib/bosh_agent/http_handler.rb
Instance Method Summary collapse
- #handle_message(json) ⇒ Object
-
#initialize(handler) ⇒ AgentController
constructor
A new instance of AgentController.
Constructor Details
#initialize(handler) ⇒ AgentController
Returns a new instance of AgentController.
107 108 109 110 |
# File 'lib/bosh_agent/http_handler.rb', line 107 def initialize(handler) super() @handler = handler end |
Instance Method Details
#handle_message(json) ⇒ Object
125 126 127 128 129 130 131 132 133 |
# File 'lib/bosh_agent/http_handler.rb', line 125 def (json) begin payload = @handler.(json) rescue => e payload = RemoteException.from(e).to_hash end Yajl::Encoder.encode(payload, :terminator => "\n") end |