question: protected static void init ( ) { String notificationfactoryClassName = null ; try { notificationfactoryClassName = System . getProperty ( NOTIFICATION_FACTORY_NAME ) ; } catch ( SecurityException e ) { throw new RuntimeException ( e ) ; } if ( notificationfactoryClassName != null ) { Class < ? > nfc ; try { nfc = Class . forName ( notificationfactoryClassName ) ; factory = ( INotificationManagerFactory ) nfc . newInstance ( ) ; } catch ( ClassNotFoundException | InstantiationException | IllegalAccessException e ) { throw new RuntimeException ( e ) ; } } else { factory = new SyslogNotificationFactory ( ) ; } }
target:  A simple mechanism to initialize factory with dynamic binding. Extended to default to SyslogNotifcationFactory in the event a dynamic binding is not specified via System properties. This allows init() to be called multiple times for the unit tests and select the default or a another factory if the System property is cleared or is set, respectively.