org.eclipse.edje/src/main/java/org/eclipse/edje/PeripheralManager.java
private static Pump<RegistrationEvent<?>> initializeNotificationEventPump() {
		// start the dynamic event pump if required
		String prefix = "org.eclipse.edje.eventpump.";
		boolean enable = Boolean.getBoolean(new StringBuilder(prefix).append("enabled").toString());

		if (enable) {
			int size = Integer.getInteger(new StringBuilder(prefix).append("size").toString(),
					DEFAULT_EVENT_BUFFER_SIZE);

			EventsQueue = new FixedLengthFIFOQueue<>(size);
			UncaughtExceptionHandler exceptionHandler = null;
			String handlerClass = System.getProperty(new StringBuilder(prefix).append("exceptionHandler").toString(),
					null);
			if (handlerClass != null) {
				try {
					exceptionHandler = (UncaughtExceptionHandler) Class.forName(handlerClass).newInstance();
				} catch (Throwable e) {
					throw new AssertionError(e);
				}
			} else {
				// default handler
				exceptionHandler = new UncaughtExceptionHandler() {
					@Override
					public void uncaughtException(Thread t, Throwable e) {
						e.printStackTrace();
					}
				};
			}
			int priority = Integer.getInteger(new StringBuilder(prefix).append("priority").toString(),
					Thread.NORM_PRIORITY);
			Pump<RegistrationEvent<?>> pump = new Pump<RegistrationEvent<?>>(EventsQueue, priority, exceptionHandler) {

				@Override
				public void execute(RegistrationEvent<? extends Peripheral> data) {
					data.registry.executeEvent(this, data);
				}

			};
			return pump;
		} else {
			return null;
		}
	}
/**
	 * Creates the notification event pump.
	 */
Creates the notification event pump.
Creates the notification event pump .
private static Pump<RegistrationEvent<?>> initializeNotificationEventPump() {
		String prefix = "org.eclipse.edje.eventpump.";
		boolean enable = Boolean.getBoolean(new StringBuilder(prefix).append("enabled").toString());
		if (enable) {
			int size = Integer.getInteger(new StringBuilder(prefix).append("size").toString(),
					DEFAULT_EVENT_BUFFER_SIZE);
			EventsQueue = new FixedLengthFIFOQueue<>(size);
			UncaughtExceptionHandler exceptionHandler = null;
			String handlerClass = System.getProperty(new StringBuilder(prefix).append("exceptionHandler").toString(),
					null);
			if (handlerClass != null) {
				try {
					exceptionHandler = (UncaughtExceptionHandler) Class.forName(handlerClass).newInstance();
				} catch (Throwable e) {
					throw new AssertionError(e);
				}
			} else {
				exceptionHandler = new UncaughtExceptionHandler() {
					@Override
					public void uncaughtException(Thread t, Throwable e) {
						e.printStackTrace();
					}
				};
			}
			int priority = Integer.getInteger(new StringBuilder(prefix).append("priority").toString(),
					Thread.NORM_PRIORITY);
			Pump<RegistrationEvent<?>> pump = new Pump<RegistrationEvent<?>>(EventsQueue, priority, exceptionHandler) {
				@Override
				public void execute(RegistrationEvent<? extends Peripheral> data) {
					data.registry.executeEvent(this, data);
				}
			};
			return pump;
		} else {
			return null;
		}
	}
private static Pump < RegistrationEvent < ? > > initializeNotificationEventPump ( ) { String prefix = "org.eclipse.edje.eventpump." ; boolean enable = Boolean . getBoolean ( new StringBuilder ( prefix ) . append ( "enabled" ) . toString ( ) ) ; if ( enable ) { int size = Integer . getInteger ( new StringBuilder ( prefix ) . append ( "size" ) . toString ( ) , DEFAULT_EVENT_BUFFER_SIZE ) ; EventsQueue = new FixedLengthFIFOQueue < > ( size ) ; UncaughtExceptionHandler exceptionHandler = null ; String handlerClass = System . getProperty ( new StringBuilder ( prefix ) . append ( "exceptionHandler" ) . toString ( ) , null ) ; if ( handlerClass != null ) { try { exceptionHandler = ( UncaughtExceptionHandler ) Class . forName ( handlerClass ) . newInstance ( ) ; } catch ( Throwable e ) { throw new AssertionError ( e ) ; } } else { exceptionHandler = new UncaughtExceptionHandler ( ) { @ Override public void uncaughtException ( Thread t , Throwable e ) { e . printStackTrace ( ) ; } } ; } int priority = Integer . getInteger ( new StringBuilder ( prefix ) . append ( "priority" ) . toString ( ) , Thread . NORM_PRIORITY ) ; Pump < RegistrationEvent < ? > > pump = new Pump < RegistrationEvent < ? > > ( EventsQueue , priority , exceptionHandler ) { @ Override public void execute ( RegistrationEvent < ? extends Peripheral > data ) { data . registry . executeEvent ( this , data ) ; } } ; return pump ; } else { return null ; } }
Creates the notification event pump.
Creates the notification event pump .
// start the dynamic event pump if required // default handler