note description: "Query system status use case." author: "Patrick Ruckstuhl " date: "$Date$" revision: "$Revision$" class A_SYSTEM_STATUS inherit A_SYSTEM_CONSTANTS THREAD_CONTROL A_GENERAL_CONSTANTS create make feature -- Access namespace: STRING -- Namespace of this use case. once Result := system_namespace end type: STRING -- Message type of this use case. once Result := system_status_type end feature -- Basic operation start (a_msg: A_MESSAGE) -- Start the use case by a_msg. local l_result: STRING l_req: A_GENERIC_MESSAGE l_rep: A_GENERAL_STRING_MESSAGE l_result_mutex: MUTEX do create l_result_mutex.make create l_result.make_empty l_result.append ("===========================%N") -- send message to all topic create l_req.make (aranea_system_namespace, aranea_system_status_node_type) -- this call blocks until it does no longer receive a message in 1 sec node.send_message_with_multiple_replies (l_req, aranea_all_topic, 3000, agent (aa_msg: A_MESSAGE; al_result: STRING; al_result_mutex: MUTEX) local ll_msg: A_GENERAL_STRING_MESSAGE do ll_msg ?= aa_msg check string_message: ll_msg /= Void end al_result_mutex.lock al_result.append (ll_msg.string) al_result.append ("===========================%N") al_result_mutex.unlock end (?, l_result, l_result_mutex)) -- generate reply create l_rep.make (l_result) node.send_message_reply (l_rep, a_msg) end end