Class LAFDelegate<E extends Handler>

  • Type Parameters:
    E -

    public class LAFDelegate<E extends Handler>
    extends Object
    A factory delegate for a specific kind of LAFHandler
    Author:
    dhushon
    • Constructor Detail

      • LAFDelegate

        public LAFDelegate​(Class<E> handler,
                           Class<E> defaultHandler)
    • Method Detail

      • newHandlerInstance

        public E newHandlerInstance​(String classname)
                             throws ClassNotFoundException
        load a concrete Handler for a given Interface (by String classname) if the class is not instantiable, will fallback to default, and then fallback to an abstract implementation. Will always return non-null.
        Parameters:
        classname -
        Returns:
        Throws:
        ClassNotFoundException
      • unregisterChangeListener

        public void unregisterChangeListener​(LAFChangeListener<E> listener)
        unregister a @see LAFChangeListener from the Map which will prevent notification on @see Handler change
        Parameters:
        listener -
      • changeHandler

        public void changeHandler​(E handler)
      • notifyListeners

        protected void notifyListeners()
      • getHandler

        public E getHandler()