Class TelnetSession
java.lang.Object
org.bgerp.plugin.bgb.getolt.telnet.TelnetSession
- All Implemented Interfaces:
AutoCloseable
Telnet session wrapper. Ported 1:1 from GetOltv2 AutomatedTelnetClient.
-
Constructor Summary
ConstructorsConstructorDescriptionTelnetSession(String server, String[] patterns) TelnetSession(String server, String[] patterns, int oltId) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidclose()String[]booleanbooleanmatchesPattern(String text, String pattern) readByTimeout(long timeoutMs) readUntils(long timeoutMs) voidsetCommandResultCollector(List<TelnetCommandResult> commandResults) voidsetPatterns(String[] patterns) voidsetSensitiveMode(boolean sensitive) Next write() call will mask the value in logs (for passwords).
-
Constructor Details
-
TelnetSession
- Throws:
IOException
-
TelnetSession
- Throws:
IOException
-
-
Method Details
-
getServerIp
-
clearTelnetBuffer
- Throws:
IOException
-
setPatterns
-
getPatterns
-
setCommandResultCollector
-
setSensitiveMode
public void setSensitiveMode(boolean sensitive) Next write() call will mask the value in logs (for passwords). -
write
- Throws:
IOException
-
readUntils
- Throws:
IOException
-
readUntils
- Throws:
IOException
-
readUntil
- Throws:
IOException
-
isConnected
public boolean isConnected() -
close
- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
matchesPattern
-
readUntil
- Throws:
IOException
-
readByTimeout
- Throws:
IOException
-
readByTimeout
- Throws:
IOException
-