Event Handling

Both COM and Java technologies support the notion of an event—something occurring dynamically at run time that a listening thread can take action on. It should come as no surprise that the mechanisms each uses to accomplish this are sufficiently incompatible. Here we'll again look to jCOM to come to the rescue and provide a transparent way of conversing between the two.

A COM class defines an event through the use of a interface—more specifically, a source interface. COM classes that implement the interface use it to subscribe to the events defined therein.

Java events are defined by an interface derived from java.util.EventListener. Java event handlers are used to respond to events. You register the events you want to have handled ...

Get BEA WebLogic Server™ 8.1 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.