indexing description: "Messaging session." author: "Patrick Ruckstuhl " date: "$Date$" revision: "$Revision$" class SESSION inherit WRAPPER_BASE create {CONNECTION} make feature -- Object creation create_queue (a_name: STRING): DESTINATION is -- Create a queue. local l_name: C_STRING do create l_name.make (a_name) create Result.make (cpp_create_queue (item, l_name.item)) end create_topic (a_name: STRING): DESTINATION is -- Create a topic. local l_name: C_STRING do create l_name.make (a_name) create Result.make (cpp_create_topic (item, l_name.item)) end create_temporary_queue: DESTINATION is -- Create a temporary queue. do create Result.make (cpp_create_temporary_queue (item)) end create_temporary_topic: DESTINATION is -- Create a temporary topic. do create Result.make (cpp_create_temporary_topic (item)) end create_producer (a_destination: DESTINATION): MESSAGE_PRODUCER is -- Create a producer. do if a_destination /= Void then create Result.make (cpp_create_producer (item, a_destination.item)) else create Result.make (cpp_create_producer (item, create {POINTER})) end end create_consumer (a_destination: DESTINATION): MESSAGE_CONSUMER is -- Create a consumer. do if a_destination /= Void then create Result.make (cpp_create_consumer (item, a_destination.item)) else create Result.make (cpp_create_consumer (item, create {POINTER})) end end create_text_message (a_text: STRING): TEXT_MESSAGE is -- Create a text message. local l_text: C_STRING do create l_text.make (a_text) create Result.make (cpp_create_text_message (item, l_text.item)) end create_bytes_message (a_pointer: MANAGED_POINTER): BYTES_MESSAGE is -- Create a bytes message. do create Result.make (cpp_create_bytes_message (item, a_pointer.item, a_pointer.count)) end create_bytes_message_empty: BYTES_MESSAGE is -- Create an empty bytes message. do create Result.make (cpp_create_bytes_message_empty (item)) end create_map_message: MAP_MESSAGE is -- Create a map message. do create Result.make (cpp_create_map_message (item)) end close is -- Close. do cpp_close (item) end feature {NONE} -- C++ methods cpp_create_queue (a_object: POINTER; a_name: POINTER): POINTER is -- Create a queue object external "C++ inline use " alias "[ try{ return ((cms::Session*)$a_object)->createQueue((char*)$a_name); }catch(cms::CMSException& e){ eraise((char*)(e.getStackTraceString().c_str()), EN_PROG); } ]" end cpp_create_topic (a_object: POINTER; a_name: POINTER): POINTER is -- Create a topic object external "C++ inline use " alias "[ try{ return ((cms::Session*)$a_object)->createTopic((char*)$a_name); }catch(cms::CMSException& e){ eraise((char*)(e.getStackTraceString().c_str()), EN_PROG); } ]" end cpp_create_temporary_queue (a_object: POINTER): POINTER is -- Create a temporary queue object external "C++ inline use " alias "[ try{ return ((cms::Session*)$a_object)->createTemporaryQueue(); }catch(cms::CMSException& e){ eraise((char*)(e.getStackTraceString().c_str()), EN_PROG); } ]" end cpp_create_temporary_topic (a_object: POINTER): POINTER is -- Create a temporary topic object external "C++ inline use " alias "[ try{ return ((cms::Session*)$a_object)->createTemporaryTopic(); }catch(cms::CMSException& e){ eraise((char*)(e.getStackTraceString().c_str()), EN_PROG); } ]" end cpp_create_producer (a_object: POINTER; a_destination: POINTER): POINTER is -- Create a producer object. external "C++ inline use " alias "[ try{ return ((cms::Session*)$a_object)->createProducer((cms::Destination*)$a_destination); }catch(cms::CMSException& e){ eraise((char*)(e.getStackTraceString().c_str()), EN_PROG); } ]" end cpp_create_consumer (a_object: POINTER; a_destination: POINTER): POINTER is -- Create a consumer object. external "C++ inline use " alias "[ try{ return ((cms::Session*)$a_object)->createConsumer((cms::Destination*)$a_destination); }catch(cms::CMSException& e){ eraise((char*)(e.getStackTraceString().c_str()), EN_PROG); } ]" end cpp_create_text_message (a_object: POINTER; a_text: POINTER): POINTER is -- Create a text message. external "C++ inline use " alias "[ try{ return ((cms::Session*)$a_object)->createTextMessage((char*)$a_text); }catch(cms::CMSException& e){ eraise((char*)(e.getStackTraceString().c_str()), EN_PROG); } ]" end cpp_create_bytes_message_empty (a_object: POINTER): POINTER is -- Create a bytes message. external "C++ inline use " alias "[ try{ return ((cms::Session*)$a_object)->createBytesMessage(); }catch(cms::CMSException& e){ eraise((char*)(e.getStackTraceString().c_str()), EN_PROG); } ]" end cpp_create_bytes_message (a_object: POINTER; a_pointer: POINTER; a_length: INTEGER_32): POINTER is -- Create a bytes message. external "C++ inline use " alias "[ try{ return ((cms::Session*)$a_object)->createBytesMessage((const unsigned char *)$a_pointer, (std::size_t)$a_length); }catch(cms::CMSException& e){ eraise((char*)(e.getStackTraceString().c_str()), EN_PROG); } ]" end cpp_create_map_message (a_object: POINTER): POINTER is -- Create a map message. external "C++ inline use " alias "[ try{ return ((cms::Session*)$a_object)->createMapMessage(); }catch(cms::CMSException& e){ eraise((char*)(e.getStackTraceString().c_str()), EN_PROG); } ]" end cpp_close (a_object: POINTER) is -- Close. external "C++ inline use " alias "[ try{ return ((cms::Session*)$a_object)->close(); }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::Session*)$a_object; ]" end end