MCPcopy Index your code
hub / github.com/Juniper/netconf-java / close

Method close

src/main/java/net/juniper/netconf/Device.java:586–594  ·  view source on GitHub ↗

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.

()

Source from the content-addressed store, hash-verified

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.

Calls 2

isChannelConnectedMethod · 0.95
isSessionConnectedMethod · 0.95