Changeset 31135 in vbox
- Timestamp:
- Jul 27, 2010 11:09:18 AM (14 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/Makefile.kmk
r30880 r31135 896 896 endif # VBOX_WITH_JMSCOM 897 897 898 # 899 # Install Java glue sample code. 900 # 901 INSTALLS += javagluesample 902 javagluesample_INST = $(INST_SDK)bindings/glue/java 903 javagluesample_MODE = a+rx,u+w 904 javagluesample_SOURCES = \ 905 $(VBOX_PATH_MAIN_SRC)/glue/tests/TestVBox.java=>TestVBox.java \ 906 $(VBOX_PATH_MAIN_SRC)/glue/tests/Makefile.kmk=>Makefile.kmk 907 898 908 updatenls:: 899 909 $(VBOX_LUPDATE) $(VBoxSVC_SOURCES) $(VBoxSVC_VBOX_HEADERS) -ts $(VBoxSVC_VBOX_TRANSLATIONS) -
trunk/src/VBox/Main/glue/tests/TestVBox.java
r30946 r31135 50 50 } 51 51 52 static void testEvents(VirtualBoxManager mgr, IEventSource es , boolean active)52 static void testEvents(VirtualBoxManager mgr, IEventSource es) 53 53 { 54 54 // active mode for Java doesn't fully work yet, and using passive 55 55 // is more portable (the only mode for MSCOM and WS) and thus generally 56 56 // recommended 57 IEventListener listener = active ? mgr.createListener(new EventHandler()) :es.createListener();57 IEventListener listener = es.createListener(); 58 58 59 59 es.registerListener(listener, Arrays.asList(VBoxEventType.Any), false); … … 63 63 { 64 64 System.out.print("."); 65 if (active) 65 IEvent ev = es.getEvent(listener, 1000); 66 if (ev != null) 66 67 { 67 mgr.waitForEvents(500); 68 } 69 else 70 { 71 IEvent ev = es.getEvent(listener, 1000); 72 if (ev != null) 73 { 74 processEvent(ev); 75 es.eventProcessed(listener, ev); 76 } 68 processEvent(ev); 69 es.eventProcessed(listener, ev); 77 70 } 78 71 } … … 142 135 testEnumeration(mgr, vbox); 143 136 testStart(mgr, vbox); 144 testEvents(mgr, vbox.getEventSource() , false);137 testEvents(mgr, vbox.getEventSource()); 145 138 146 139 System.out.println("done, press Enter...");
Note:
See TracChangeset
for help on using the changeset viewer.