public void connectToDeviceWithLink ( Device device , Link link ) throws ShanksException { this . connectToLink ( link ) ; try { device . connectToLink ( link ) ; } catch ( ShanksException e ) { this . disconnectFromLink ( link ) ; throw e ; } }
Connect the device to other device with a link