package hexagon_example;

import hexagon_example.driven_adapter.ConsolePublisher;
import hexagon_example.driven_adapter.EnglishPoetryLibrary;
import hexagon_example.driven_adapter.GermanPoetryLibrary;
import hexagon_example.driver_adapter.Driver;
import hexagon_example.hexagon.boundary.Boundary;
import hexagon_example.hexagon.boundary.driven_port.IObtainPoems;
import hexagon_example.hexagon.boundary.driven_port.IWriteLines;

/**
 * Main class that starts the hexagon example application.
 * 
 * Inspired by a talk by A. Cockburn and T. Pierrain on hexagonal architecture:
 * https://www.youtube.com/watch?v=th4AgBcrEHA
 * 
 * @author b_muth
 *
 */
public class Main {
	public static void main(String[] args) {
		new Main().startApplication();
	}

	private void startApplication() {
		// Instantiate driven, right-side adapters
		IObtainPoems englishLibrary = new EnglishPoetryLibrary();
		IObtainPoems germanLibrary = new GermanPoetryLibrary();
		IWriteLines consolePublisher = new ConsolePublisher();

		// Inject driven adapters into application
		Boundary application = new Boundary(englishLibrary, germanLibrary, consolePublisher);
		
		// Start the driver adapter for the application
		Driver driver = new Driver(application);
		driver.run();
	}
}

@@ -420,16 +420,86 @@
 teLines;
+%0Aimport hexagon_example.hexagon.boundary.driver_port.IReactToCommands;
 %0A%0A/**%0A *
@@ -1107,42 +1107,44 @@
 nto 
-application%0A%09%09Boundary application
+boundary%0A%09%09IReactToCommands boundary
  = n
@@ -1264,57 +1264,28 @@
 n%0A%09%09
-Driver driver = new Driver(application);%0A%09%09driver
+new Driver(boundary)
 .run

Update Main.java