/** * {@inheritDoc} */ @Override public void close() { try { _observable.fireEvent( new CloseEvent( _eventMetaData, _source ) ); } catch ( VetoException aException ) { throw new VetoRuntimeException( aException ); } try { _connectionSender.close(); } catch ( CloseException e ) { warn( "Unable to close malfunctioning connection.", e ); } try { _observable.fireEvent( new ClosedEvent( _eventMetaData, _source ) ); } catch ( VetoException ignore ) { /* Cannot happen here */ } }
/** * {@inheritDoc} */ @Override public void close() throws CloseException { try { _observable.fireEvent( new CloseEvent( _eventMetaData, _source ) ); } catch ( VetoException aException ) { throw new VetoRuntimeException( aException ); } _connectionReceiver.close(); try { _observable.fireEvent( new ClosedEvent( _eventMetaData, _source ) ); } catch ( VetoException ignore ) { /* Cannot happen here */ } }