Package bitel.billing.server.util.telnet
Class TelnetSession
java.lang.Object
bitel.billing.server.util.AbstractSession
bitel.billing.server.util.terminal.AbstractTerminalSession
bitel.billing.server.util.telnet.TelnetSession
public class TelnetSession extends AbstractTerminalSession
Класс для работы с telnet.
Для обозначения конца строки задают либо endString либо regexp + regexpBufferSize. Одно перетирает второе .
По возможности нужно использовать просто endString - это более оптимально.
-
Field Summary
Fields inherited from class bitel.billing.server.util.terminal.AbstractTerminalSession
endString, finder, inputStream, outPutStream, regexp, socketTimeTimeoutFields inherited from class bitel.billing.server.util.AbstractSession
host, port, sourceHost, sourcePort, timeout -
Constructor Summary
Constructors Constructor Description TelnetSession(java.lang.String host, int port)Конструктор класса -
Method Summary
Modifier and Type Method Description voiddisconnect()Закрывает соединение с удаленным хостомprotected voidinitConnection()Methods inherited from class bitel.billing.server.util.terminal.AbstractTerminalSession
connect, doCommand, doCommandAsync, doCommandWithoutEndSymbol, getEndString, getRegexp, getRegexpBufferSize, getSocketTimeTimeout, setEndString, setReadWait, setRegexp, setRegexp, setRegexpBufferSize, setSocketTimeTimeoutMethods inherited from class bitel.billing.server.util.AbstractSession
getTimeout, setTimeoutMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
TelnetSession
public TelnetSession(java.lang.String host, int port)Конструктор класса- Parameters:
host- адрес хостаport- номер порта
-
-
Method Details
-
initConnection
protected void initConnection() throws java.io.IOException- Overrides:
initConnectionin classAbstractTerminalSession- Throws:
java.io.IOException
-
disconnect
public void disconnect() throws ru.bitel.bgbilling.common.BGExceptionЗакрывает соединение с удаленным хостом- Overrides:
disconnectin classAbstractTerminalSession- Throws:
ru.bitel.bgbilling.common.BGException
-