indexing description: "Simple origo node that can send and receive messages." author: "Patrick Ruckstuhl " date: "$Date$" revision: "$Revision$" class NODE_SIMPLE inherit O_NODE_CLIENT redefine register_message_handlers end create make feature -- Access Peer_description: STRING is "A simple node that can send and receive messages." -- Node's peer description name: STRING is "Origo Simple" version: STRING is "$Revision$" feature {NONE} -- Callbacks display_message (a_msg: O_MESSAGE; a_handler: STRING) is -- Display a_msg which was received by a_handler. require a_msg_set: a_msg /= Void a_handler_set: a_handler /= Void and then not a_handler.is_empty do io.put_string ("Message received by ") io.put_string (a_handler) io.new_line io.put_string (a_msg.out) io.put_string ("--------------------") io.new_line end feature {NONE} -- Implementation register_message_handlers is -- Register message handlers. do Precursor peer_module.register_catch_all_message_handler (agent display_message (?, "catch all")) end end