gerrithudsontrigger/src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/PluginImpl.java
/**
     * Adds a Connection Listener to the manager.
     * Return the current connection status so that listeners that
     * are added later than a connectionestablished/ connectiondown
     * will get the current connection status.
     *
     * @param listener the listener.
     * @return the connection status.
     */
Adds a Connection Listener to the manager.
Return the current connection status so that listeners that
are added later than a connectionestablished/ connectiondown
will get the current connection status.

@param listener the listener.
@return the connection status.
Adds a Connection Listener to the manager . Return the current connection status so that listeners that are added later than a connectionestablished / connectiondown will get the current connection status . @param listener the listener . @return the connection status .
public boolean addListener(ConnectionListener listener) {
        boolean connected = false;
        if (gerritEventManager != null) {
            connected = gerritEventManager.addListener(listener);
        } else {
            if (savedConnectionListeners == null) {
                savedConnectionListeners = Collections.synchronizedSet(new HashSet<ConnectionListener>());
            }
            savedConnectionListeners.add(listener);
        }
        return connected;
    }
public boolean addListener ( ConnectionListener listener ) { boolean connected = false ; if ( gerritEventManager != null ) { connected = gerritEventManager . addListener ( listener ) ; } else { if ( savedConnectionListeners == null ) { savedConnectionListeners = Collections . synchronizedSet ( new HashSet < ConnectionListener > ( ) ) ; } savedConnectionListeners . add ( listener ) ; } return connected ; }
Adds a Connection Listener to the manager.
Adds a Connection Listener to the manager .
//If the eventmanager isn't created yet, save the connectionlistener so it can be added once //the eventmanager is created.