|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vhosting.netconf.transport.NetconfCatcher
com.vhosting.netconf.transport.ssh.NetconfSshCather
public class NetconfSshCather
This class is the entry point for to establish a connection Netconf over SSH-2.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.vhosting.netconf.transport.NetconfCatcher |
---|
NetconfCatcher.LogLevel |
Constructor Summary | |
---|---|
NetconfSshCather(java.lang.String labelConnection,
SshAuthInfo ai)
Building the catcher for a connection over SSH-2. |
|
NetconfSshCather(java.lang.String labelConnection,
SshAuthInfo ai,
java.lang.String subSystem)
Building the catcher for a connection over SSH-2. |
Method Summary | |
---|---|
protected boolean |
doDisconnect()
This method must necessarily be implemented with the code necessary to perform a disconnect with the server. |
protected byte[] |
doReadDataFromServer()
This method must necessarily be implemented when required to read the next message from the server. |
protected void |
doSendDataToServer(byte[] bytes)
This method must necessarily be implemented so that any type of message can be sent to the Netconf server. |
java.lang.Runnable |
getRunnableConnection()
Create a Runnable connection using a specific name for the remote Netconf sybsystem. |
boolean |
isConnected()
Check if the connection is alive or not. |
Methods inherited from class com.vhosting.netconf.transport.NetconfCatcher |
---|
disconnect, enableLog, fireConnectionClosed, getLogLevel, getLogStream, sendHelloMsg, setLogStream, setNetconfCatcherListener, setSyncRequestsTimeout, throwTransportException, whileRpcReplyCatching |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NetconfSshCather(java.lang.String labelConnection, SshAuthInfo ai)
labelConnection
- A label used to identify the connection.ai
- The authentication informations.public NetconfSshCather(java.lang.String labelConnection, SshAuthInfo ai, java.lang.String subSystem)
labelConnection
- A label used to identify the connection.ai
- The authentication informations.subSystem
- The name of the SSH-2 Netconf subsystem.Method Detail |
---|
public java.lang.Runnable getRunnableConnection()
1. make the connection with the server; 2. authenticate; 3. Send a welcome message; 4. Listen for any messages from the server.
protected boolean doDisconnect()
NetconfCatcher
doDisconnect
in class NetconfCatcher
protected void doSendDataToServer(byte[] bytes) throws java.io.IOException
NetconfCatcher
doSendDataToServer
in class NetconfCatcher
bytes
- The byte array containing the Netconf message.
java.io.IOException
- Throw this exception when the server connection was lost.protected byte[] doReadDataFromServer() throws java.io.IOException
NetconfCatcher
doReadDataFromServer
in class NetconfCatcher
java.io.IOException
- Throw this exception when the server connection was lost.public boolean isConnected()
NetconfCatcher
isConnected
in class NetconfCatcher
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |