gerrithudsontrigger/src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/PluginImpl.java
/**
     * Adds a listener to the EventManager.  The listener will receive all events from Gerrit.
     *
     * @param listener the listener.
     * @see GerritHandler#addListener(com.sonyericsson.hudson.plugins.gerrit.gerritevents.GerritEventListener)
     */
Adds a listener to the EventManager.  The listener will receive all events from Gerrit.
@param listener the listener.
Adds a listener to the EventManager . The listener will receive all events from Gerrit . @param listener the listener .
public void addListener(GerritEventListener listener) {
        if (gerritEventManager != null) {
            gerritEventManager.addListener(listener);
        } else {
            if (savedEventListeners == null) {
                savedEventListeners = Collections.synchronizedSet(new HashSet<GerritEventListener>());
            }
            savedEventListeners.add(listener);
        }
    }
public void addListener ( GerritEventListener listener ) { if ( gerritEventManager != null ) { gerritEventManager . addListener ( listener ) ; } else { if ( savedEventListeners == null ) { savedEventListeners = Collections . synchronizedSet ( new HashSet < GerritEventListener > ( ) ) ; } savedEventListeners . add ( listener ) ; } }
Adds a listener to the EventManager.
Adds a listener to the EventManager .
//If the eventmanager isn't created yet, save the eventlistener so it can be added once //the eventmanager is created.