Close the connection to the Netconf server. All associated Netconf sessions will be closed, too. Can be called at any time. Don't forget to call this once you don't need the device anymore.
()
| 584 | * call this once you don't need the device anymore. |
| 585 | */ |
| 586 | @Override |
| 587 | public void close() { |
| 588 | if (isChannelConnected()) { |
| 589 | sshChannel.disconnect(); |
| 590 | } |
| 591 | if (isSessionConnected()) { |
| 592 | sshSession.disconnect(); |
| 593 | } |
| 594 | } |
| 595 | |
| 596 | /** |
| 597 | * Execute a command in shell mode. |