Class: ServerMonitorAction
- Defined in:
- lib/dango/monitor/server_monitor_action.rb
Overview
メインクラス
Instance Attribute Summary collapse
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
-
#session ⇒ Object
readonly
Returns the value of attribute session.
-
#session_list ⇒ Object
readonly
Returns the value of attribute session_list.
-
#shared ⇒ Object
readonly
Returns the value of attribute shared.
-
#socket_list ⇒ Object
readonly
Returns the value of attribute socket_list.
Instance Method Summary collapse
-
#initialize(parent, config, peerhost, peeraddr, ret_obj) ⇒ ServerMonitorAction
constructor
A new instance of ServerMonitorAction.
Constructor Details
#initialize(parent, config, peerhost, peeraddr, ret_obj) ⇒ ServerMonitorAction
Returns a new instance of ServerMonitorAction.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/dango/monitor/server_monitor_action.rb', line 11 def initialize(parent, config, peerhost, peeraddr, ret_obj) @parent = parent @config = config @logger = @parent.logger @shared = @parent.shared @session = @parent.session @socket_list = @parent.socket_list @session_list = @parent.session_list # アクション名 action_name = ret_obj["action"].to_s dango_check_monitor_error(peerhost, peeraddr, action_name) if action_name == '_monitor_all_info' # メンテナンスアクション名なら dango_server_monitor_all_info(ret_obj) elsif action_name == '_monitor_get_server_info' # メンテナンスアクション名なら dango_server_monitor_get_server_info(ret_obj) elsif action_name == '_monitor_get_shared' # メンテナンスアクション名なら dango_server_monitor_get_shared(ret_obj) elsif action_name == '_monitor_get_session_list' # メンテナンスアクション名なら dango_server_monitor_get_session_list(ret_obj) elsif action_name == '_monitor_get_socket_list' # メンテナンスアクション名なら dango_server_monitor_get_socket_list(ret_obj) elsif action_name == '_monitor_send_system_message' # メンテナンスアクション名なら (ret_obj) else end end |
Instance Attribute Details
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
48 49 50 |
# File 'lib/dango/monitor/server_monitor_action.rb', line 48 def logger @logger end |
#session ⇒ Object (readonly)
Returns the value of attribute session.
48 49 50 |
# File 'lib/dango/monitor/server_monitor_action.rb', line 48 def session @session end |
#session_list ⇒ Object (readonly)
Returns the value of attribute session_list.
48 49 50 |
# File 'lib/dango/monitor/server_monitor_action.rb', line 48 def session_list @session_list end |
#shared ⇒ Object (readonly)
Returns the value of attribute shared.
48 49 50 |
# File 'lib/dango/monitor/server_monitor_action.rb', line 48 def shared @shared end |
#socket_list ⇒ Object (readonly)
Returns the value of attribute socket_list.
48 49 50 |
# File 'lib/dango/monitor/server_monitor_action.rb', line 48 def socket_list @socket_list end |