/** * Returns reference to {@link BackendListener} * @param clientClass {@link BackendListenerClient} client class * @return BackendListenerClient reference. */ static BackendListenerClient createBackendListenerClientImpl(Class<?> clientClass) { if (clientClass == null) { // failed to initialise the class return new ErrorBackendListenerClient(); } try { return (BackendListenerClient) clientClass.newInstance(); } catch (Exception e) { log.error("Exception creating: {}", clientClass, e); return new ErrorBackendListenerClient(); } }