indexing description: "[ A base class for notification events listeners Client classes must derive from this class and implement the notify feature in order to receive events from the space. ]" legal: "See notice at end of class." status: "See notice at end of class." date: "$Date$" revision: "$Revision$" deferred class EGS_REMOTE_EVENT_LISTENER inherit EGS_EXTERNAL_CPP_OBJECT feature notify (event: EGS_REMOTE_EVENT) is -- deferred end feature -- Initialization make is do make_from_external (cpp_create) end feature stop is do cpp_stop (object_ptr) if listener_thread /= Void then listener_thread.join listener_thread := Void end end feature {EGS_EVENT_SESSION} start is do create listener_thread.make (Current) listener_thread.launch end feature {EGS_REMOTE_EVENT_LISTENER_THREAD} -- Implementation get_event: EGS_REMOTE_EVENT is local event_ptr: POINTER do event_ptr := cpp_get_event (object_ptr) if event_ptr /= default_pointer then create Result.make_from_external (event_ptr) cpp_delete_event (event_ptr) end end feature {NONE} -- Implementation listener_thread: EGS_REMOTE_EVENT_LISTENER_THREAD feature {NONE} -- externals cpp_create: POINTER is external "C++ inline use " alias "new EGS_RemoteEventListener()" end cpp_delete (obj_ptr: POINTER) is external "C++ inline use " alias "delete ((EGS_RemoteEventListener*)$obj_ptr)" end cpp_stop (obj_ptr: POINTER) is require obj_ptr_not_null: obj_ptr /= default_pointer external "C++ inline use " alias "((EGS_RemoteEventListener*)$obj_ptr)->stop()" end cpp_get_event (obj_ptr: POINTER): POINTER is require obj_ptr_not_null: obj_ptr /= default_pointer external "C++ blocking inline use " alias "((EGS_RemoteEventListener*)$obj_ptr)->getEvent()" end cpp_delete_event (obj_ptr: POINTER) is external "C++ inline use " alias "delete ((OpenSpaces::RemoteEvent*)$obj_ptr)" end indexing library: "egigs-cpp: Library for accessing the GigaSpaces platform, POCO library based implementation." copyright: "Copyright (c) 2008, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software 356 Storke Road, Goleta, CA 93117 USA Telephone 805-685-1006, Fax 805-685-6869 Website http://www.eiffel.com Customer support http://support.eiffel.com ]" end