private void registerEventListeners(final Properties props, final URLClassLoader classLoader, final AbstractPlugin plugin)
            throws Exception {
        final String eventListenerClasses = props.getProperty(Plugin.PLUGIN_EVENT_LISTENER_CLASSES);
        final String[] eventListenerClassArray = eventListenerClasses.split(",");

        for (final String eventListenerClassName : eventListenerClassArray) {
            if (StringUtils.isBlank(eventListenerClassName)) {
                LOGGER.log(Level.INFO, "No event listener to load for plugin[name={0}]", plugin.getName());
                return;
            }

            LOGGER.log(Level.DEBUG, "Loading event listener[className={0}]", eventListenerClassName);

            final Class<?> eventListenerClass = classLoader.loadClass(eventListenerClassName);
            final AbstractEventListener<?> eventListener = (AbstractEventListener) eventListenerClass.newInstance();

            plugin.addEventListener(eventListener);

            LOGGER.log(Level.DEBUG, "Registered event listener[class={0}, eventType={1}] for plugin[name={2}]",
                    eventListener.getClass(), eventListener.getEventType(), plugin.getName());
        }
    }
private void registerEventListeners ( final Properties props , final URLClassLoader classLoader , final AbstractPlugin plugin ) throws Exception { final String eventListenerClasses = props . getProperty ( Plugin . PLUGIN_EVENT_LISTENER_CLASSES ) ; final String [ ] eventListenerClassArray = eventListenerClasses . split ( "," ) ; for ( final String eventListenerClassName : eventListenerClassArray ) { if ( StringUtils . isBlank ( eventListenerClassName ) ) { LOGGER . log ( Level . INFO , "No event listener to load for plugin[name={0}]" , plugin . getName ( ) ) ; return ; } LOGGER . log ( Level . DEBUG , "Loading event listener[className={0}]" , eventListenerClassName ) ; final Class < ? > eventListenerClass = classLoader . loadClass ( eventListenerClassName ) ; final AbstractEventListener < ? > eventListener = ( AbstractEventListener ) eventListenerClass . newInstance ( ) ; plugin . addEventListener ( eventListener ) ; LOGGER . log ( Level . DEBUG , "Registered event listener[class={0}, eventType={1}] for plugin[name={2}]" , eventListener . getClass ( ) , eventListener . getEventType ( ) , plugin . getName ( ) ) ; } }
Registers event listeners with the specified plugin properties, class loader and plugin.

@param props       the specified plugin properties
@param classLoader the specified class loader
@param plugin      the specified plugin
@throws Exception exception