Class: UU::OS::CMD::CommandResult
- Inherits:
-
Object
- Object
- UU::OS::CMD::CommandResult
- Defined in:
- uu_os_cmd-2.2.5/lib/uu/os/cmd/command_result.rb
Overview
Wrapper for result of command. Object of this type is returned in case option :raw_response or :async_invocation is used for command invocation.
Instance Attribute Summary (collapse)
-
- (Object) invoked_service
Information about invoked service used for tracing if an error occurs.
Instance Method Summary (collapse)
-
- (Object) get
Returns result processed by handlers.
-
- (UU::OS::HTTP::HTTPResponse) unwrap
Returns unprocessed response of HTTP client.
Instance Attribute Details
- (Object) invoked_service
Information about invoked service used for tracing if an error occurs.
15 16 17 |
# File 'uu_os_cmd-2.2.5/lib/uu/os/cmd/command_result.rb', line 15 def invoked_service @invoked_service end |
Instance Method Details
- (Object) get
Returns result processed by handlers.
31 32 33 34 35 36 37 38 |
# File 'uu_os_cmd-2.2.5/lib/uu/os/cmd/command_result.rb', line 31 def get begin process_result rescue HTTPClient::TimeoutError => e UU::OS::CMD::CommandClient.trace_unsuccessful_call(invoked_service, e); raise e; end end |
- (UU::OS::HTTP::HTTPResponse) unwrap
Returns unprocessed response of HTTP client. In case of asynchronous command invocation this call is non-blocking, however further manipulation with HTTP response results in waiting for request finish.
44 45 46 |
# File 'uu_os_cmd-2.2.5/lib/uu/os/cmd/command_result.rb', line 44 def unwrap @http_response end |