@Test public void testListenersThrowingExceptionsDoNotDropCallsToOtherListeners() { makeListenersThrowExceptions(); verifyListenersAreNeverCalled(); m_composite.connectionEstablished(m_session, m_loginProvider, m_certificate, m_isSelfSigned); verifyListenersAreCalled(); }
@Override public void connectionEstablished(NetconfClientSession clientSession, NetconfLoginProvider netconfLoginProvider, X509Certificate peerX509Certificate, boolean isSelfSigned) { for (CallHomeListener listener : m_listeners) { try { listener.connectionEstablished(clientSession, netconfLoginProvider, peerX509Certificate, isSelfSigned); } catch (Exception e) { LOGGER.error(String.format("Error while calling listener {}", listener), e); } } }
CallHomeListenerCompositeImpl implements CallHomeListenerComposite { @Override public void connectionEstablished(NetconfClientSession clientSession, NetconfLoginProvider netconfLoginProvider, X509Certificate peerX509Certificate, boolean isSelfSigned) { for (CallHomeListener listener : m_listeners) { try { listener.connectionEstablished(clientSession, netconfLoginProvider, peerX509Certificate, isSelfSigned); } catch (Exception e) { LOGGER.error(String.format("Error while calling listener {}", listener), e); } } } }
CallHomeListenerCompositeImpl implements CallHomeListenerComposite { @Override public void connectionEstablished(NetconfClientSession clientSession, NetconfLoginProvider netconfLoginProvider, X509Certificate peerX509Certificate, boolean isSelfSigned) { for (CallHomeListener listener : m_listeners) { try { listener.connectionEstablished(clientSession, netconfLoginProvider, peerX509Certificate, isSelfSigned); } catch (Exception e) { LOGGER.error(String.format("Error while calling listener {}", listener), e); } } }  }
CallHomeListenerCompositeImpl implements CallHomeListenerComposite { @Override public void connectionEstablished(NetconfClientSession clientSession, NetconfLoginProvider netconfLoginProvider, X509Certificate peerX509Certificate, boolean isSelfSigned) { for (CallHomeListener listener : m_listeners) { try { listener.connectionEstablished(clientSession, netconfLoginProvider, peerX509Certificate, isSelfSigned); } catch (Exception e) { LOGGER.error(String.format("Error while calling listener {}", listener), e); } } }  @Override void addListener(CallHomeListener callHomeListener); @Override void removeListener(CallHomeListener callHomeListener); @Override void connectionEstablished(NetconfClientSession clientSession, NetconfLoginProvider netconfLoginProvider,
                                      X509Certificate peerX509Certificate, boolean isSelfSigned); }
CallHomeListenerCompositeImpl implements CallHomeListenerComposite { @Override public void connectionEstablished(NetconfClientSession clientSession, NetconfLoginProvider netconfLoginProvider, X509Certificate peerX509Certificate, boolean isSelfSigned) { for (CallHomeListener listener : m_listeners) { try { listener.connectionEstablished(clientSession, netconfLoginProvider, peerX509Certificate, isSelfSigned); } catch (Exception e) { LOGGER.error(String.format("Error while calling listener {}", listener), e); } } }  @Override void addListener(CallHomeListener callHomeListener); @Override void removeListener(CallHomeListener callHomeListener); @Override void connectionEstablished(NetconfClientSession clientSession, NetconfLoginProvider netconfLoginProvider,
                                      X509Certificate peerX509Certificate, boolean isSelfSigned);  }