public TangoConnectionImpl(final String uri, String attributeName, boolean requireEvents) throws Exception { super(uri, attributeName); createTangoHost(); this.tangoProxy = new DeviceProxy(uri); if (requireEvents) { this.tangoEvents = new TangoEventsAdapter(tangoProxy); this.listener = new ITangoChangeListener() { @Override public void change(TangoChangeEvent event) { fireTangoConnectionListeners(event); lastEvent = System.currentTimeMillis(); } }; if (attributeName != null) { tangoEvents.addTangoChangeListener(listener, attributeName, new String[0]); } else { this.attributeName = "Output"; tangoEvents.addTangoChangeListener(listener, attributeName, new String[0]); } } }