Class: UU::OS::CMD::CommandCallbackContext
- Inherits:
-
CommandContext
- Object
- Application::UseCaseContext
- CommandContext
- UU::OS::CMD::CommandCallbackContext
- Defined in:
- uu_os_cmd-server-2.5.1/lib/uu/os/cmd/command_callback_context.rb
Overview
Callback execution context.
Constant Summary
Instance Attribute Summary (collapse)
-
- (Exception?) exception
readonly
Error raised from invocation of asynchronous command for which was callback invoked.
-
- (Object?) result
readonly
Result of asynchronous command for which was callback invoked.
-
- (String) state
readonly
State of asynchronous command for which was callback invoked.
Attributes inherited from Application::UseCaseContext
#parameters, #session, #uu_uri
Instance Method Summary (collapse)
-
- (Object) prepare_callback(action, session = nil, options = {})
Prepares callback object to be used in CommandClient.
Methods inherited from CommandContext
#invoke_async, #invoke_async_status
Instance Attribute Details
- (Exception?) exception (readonly)
Error raised from invocation of asynchronous command for which was callback
invoked. In case asynchronous command finished successfully,
exception
should be nil
.
23 24 25 |
# File 'uu_os_cmd-server-2.5.1/lib/uu/os/cmd/command_callback_context.rb', line 23 def exception @exception end |
- (Object?) result (readonly)
Result of asynchronous command for which was callback invoked. May be
nil
if asynchronous command did not provide any result or
invocation of asynchronous command failed.
18 19 20 |
# File 'uu_os_cmd-server-2.5.1/lib/uu/os/cmd/command_callback_context.rb', line 18 def result @result end |
- (String) state (readonly)
State of asynchronous command for which was callback invoked.
13 14 15 |
# File 'uu_os_cmd-server-2.5.1/lib/uu/os/cmd/command_callback_context.rb', line 13 def state @state end |
Instance Method Details
- (Object) prepare_callback(action, session = nil, options = {})
Prepares callback object to be used in UU::OS::CMD::CommandClient.
53 54 55 |
# File 'uu_os_cmd-server-2.5.1/lib/uu/os/cmd/command_callback_context.rb', line 53 def prepare_callback(action, session = nil, = {}) raise 'Not supported for callbacks' end |