Browse Prior Art Database

Generating Event Adapters to Facilitate Connections Between Java Beans

IP.com Disclosure Number: IPCOM000122808D
Original Publication Date: 1998-Jan-01
Included in the Prior Art Database: 2005-Apr-04
Document File: 4 page(s) / 174K

Publishing Venue

IBM

Related People

Gest, SB: AUTHOR

Abstract

Disclosed is a paradigm for dynamically creating Java internal event adapters that can be utilized to "wire" Java beans together. Java beans are wired together for the purposes of sharing information between them, augmenting the existing behavior of the beans, or for connecting the beans together such that actions upon one bean affect the other beans. The internal event adapter is dynamically created based upon introspection of the Java beans, and facilitates a connection between a "source" (a bean that generates and dispatches events) and one or more "targets" (beans that are the targets for those events). The resulting Java class represents a single event adapter that handles connections from multiple sources to multiple targets, and only implements interfaces to which actual event connections were requested.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 31% of the total text.

Generating Event Adapters to Facilitate Connections Between Java Beans

      Disclosed is a paradigm for dynamically creating Java internal
event adapters that can be utilized to "wire" Java beans together.
Java beans are wired together for the purposes of sharing information
between them, augmenting the existing behavior of the beans, or for
connecting the beans together such that actions upon one bean affect
the other beans.  The internal event adapter is dynamically created
based upon introspection of the Java beans, and facilitates a
connection between a "source" (a bean that generates and dispatches
events) and one or more  "targets" (beans that are the targets for
those events).  The resulting  Java class represents a single event
adapter that handles connections from multiple sources to multiple
targets, and only implements interfaces  to which actual event
connections were requested.  Before discussing the implementation.
This disclosure begins with a brief overview of the  Java AWT
delegation event model.

      The Java AWT delegation event model APIs support a clean
separation between application and GUI code, are extendible to
support new types of events, and enable run-time discovery of both
events that  a bean generates as well as the events it may observe.
Event types are  encapsulated in a class  hierarchy rooted at
java.util.EventObject. Each  event class is defined by the data
representing that event type or related group of event types.  For
example, the MouseEvent class represents mouse up, mouse down, mouse
drag, mouse move, etc.  The Java  Development Kit defines a concrete
set of events, but applications are free to define their own event
types by subclassing either java.util.EventObject or one of the
existing event classes.

      An event is propagated from a "source" object to a "target
listener" object by invoking a method on the listener and passing in
the instance of the event subclass which defines the event type
generated.  A listener is an object that implements a specific
listener interface extended from the generic java.util.EventListener
interface.  This interface defines one or more methods which are to
be invoked by the event source in response to each specific event
type handled by the interface.  An event source is an object which
originates or "fires" events.  The source defines the set of events
it fires by providing a set of add<EventType>Listener methods which
are used to register specific listeners for those events.

      The paradigm presented here utilizes introspection on the
source and target beans, and the AWT delegation event model, to
establish connections between a source and target bean.  Events that
form the basis  of these connections range from the predefined AWT
events, events from  bound and constrained properties, and
application-defined events discovered through introspection at
run-time.  Unlike the Java AWT delegation event model, where an ev...