Save This Page
Home » bsf-src-2.4.0 » org.apache.bsf.util.event » [javadoc | source]
org.apache.bsf.util.event
public class: EventAdapterRegistry [javadoc | source]
java.lang.Object
   org.apache.bsf.util.event.EventAdapterRegistry
The EventAdapterRegistry is the registry of event adapters. If a desired adapter is not found, the adapter will be dynamically generated when lookup is attempted. Set the dynamic property to false to disable this feature.

This implementation first looks for an adapter in its lookup table and if it doesn't find one looks for a standard implementation of that adapter in the org.apache.bsf.util.event.adapters package with a standard naming convention. The naming convention it assumes is the following: for event listener type a.b.c.FooListener, it loads an adapter of type org.apache.bsf.util.event.adapters.a_b_c_FooAdapter. If both the loading and the dynamic generation fail, then a null is returned.

Method from org.apache.bsf.util.event.EventAdapterRegistry Summary:
lookup,   register,   setClassLoader,   setDynamic
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.bsf.util.event.EventAdapterRegistry Detail:
 public static Class lookup(Class listenerType) 
 public static  void register(Class listenerType,
    Class eventAdapterClass) 
 public static  void setClassLoader(ClassLoader cloader) 
    Class loader to use to load event adapter classes.
 public static  void setDynamic(boolean dynamic) 
    Indicates whether or not to dynamically generate adapters; default is true.

    If the dynamic property is set to true, and the ClassLoader is unable to resolve an adapter, one will be dynamically generated.