indexing description: "A message producer." author: "Patrick Ruckstuhl " date: "$Date$" revision: "$Revision$" class MESSAGE_PRODUCER inherit WRAPPER_BASE create {SESSION} make feature -- Actions send (a_message: MESSAGE) is -- Send a_message. do cpp_send (item, a_message.item) end send_to_destination (a_destination: DESTINATION; a_message: MESSAGE) is -- Send a_message to a_destination. do cpp_send_to_destination (item, a_destination.item, a_message.item) end feature -- Element Change set_time_to_live (a_time: NATURAL_64) -- Set time to live in millisecond. do cpp_set_time_to_live (item, a_time) end feature {NONE} -- C++ methods cpp_send (a_object: POINTER; a_message: POINTER) is -- Send a message. external "C++ inline use " alias "[ try{ return ((cms::MessageProducer*)$a_object)->send((cms::Message*)$a_message); }catch(cms::CMSException& e){ eraise((char*)(e.getStackTraceString().c_str()), EN_PROG); } ]" end cpp_send_to_destination (a_object: POINTER; a_destination: POINTER; a_message: POINTER) is -- Send a message. external "C++ inline use " alias "[ try{ return ((cms::MessageProducer*)$a_object)->send((cms::Destination*)$a_destination, (cms::Message*)$a_message); }catch(cms::CMSException& e){ eraise((char*)(e.getStackTraceString().c_str()), EN_PROG); } ]" end cpp_set_time_to_live (a_object: POINTER; a_time: NATURAL_64) -- Set time to live external "C++ inline use " alias "[ try{ ((cms::MessageProducer*)$a_object)->setTimeToLive((long long)$a_time); }catch(cms::CMSException& e){ eraise((char*)(e.getStackTraceString().c_str()), EN_PROG); } ]" end cpp_delete (a_object: POINTER) is -- Delete cpp object. external "C++ inline use " alias "[ delete (cms::MessageProducer*)$a_object; ]" end end