Class TelnetSession
java.lang.Object
ecmwf.common.ecauth.TelnetSession
-
Constructor Summary
ConstructorsConstructorDescriptionTelnetSession
(Socket socket, String login, String password, byte[] token, boolean debug) Instantiates a new telnet session. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Disconnect.boolean
getDebug()
Gets the debug.boolean
Checks if is connected.void
Sends the.Waitfor.
-
Constructor Details
-
TelnetSession
public TelnetSession(Socket socket, String login, String password, byte[] token, boolean debug) throws IOException Instantiates a new telnet session.- Parameters:
socket
- the socketlogin
- the loginpassword
- the passwordtoken
- the tokendebug
- the debug- Throws:
IOException
- Signals that an I/O exception has occurred.
-
-
Method Details
-
getDebug
public boolean getDebug()Gets the debug. Gets the debug.- Specified by:
getDebug
in interfaceInteractiveSession
- Returns:
- the debug
-
send
Sends the. Send.- Specified by:
send
in interfaceInteractiveSession
- Parameters:
cmd
- the cmd- Throws:
IOException
- Signals that an I/O exception has occurred.
-
waitfor
Waitfor. Waitfor.- Specified by:
waitfor
in interfaceInteractiveSession
- Parameters:
searchElements
- the search elements- Returns:
- the string
- Throws:
IOException
- Signals that an I/O exception has occurred.
-
isConnected
public boolean isConnected()Checks if is connected. Checks if is connected.- Specified by:
isConnected
in interfaceInteractiveSession
- Returns:
- true, if is connected
-
disconnect
public void disconnect()Disconnect. Disconnect.- Specified by:
disconnect
in interfaceInteractiveSession
-