public class Test { public static void main(String[] args) throws Exception{ EventRemoteGluer startStopEvtRemoteGluer = new EventRemoteGluer("StartStop"); //startStopEvtRemoteGluer.glue(new startStopEventHandler()); EventRemoteGluer lapEvtRemoteGluer = new EventRemoteGluer("Lap"); //lapEvtRemoteGluer.glue(new lapEventHandler()); } /* public static class startStopEventHandler implements EventHandler { public void handle(Event event) { ///state.startStopPushed(); } } public static class lapEventHandler implements EventHandler { public void handle(Event event) { ///state.lapPushed(); } } */ }