net.sf.dict4j
Class DictTransportDefault
java.lang.Object
net.sf.dict4j.DictTransportDefault
- All Implemented Interfaces:
- DictTransport
public class DictTransportDefault
- extends java.lang.Object
- implements DictTransport
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DictTransportDefault
public DictTransportDefault(java.net.InetAddress address,
int port)
DictTransportDefault
public DictTransportDefault(java.net.InetAddress address)
DictTransportDefault
public DictTransportDefault(java.lang.String address)
throws DictTransportException
- Throws:
DictTransportException
DictTransportDefault
public DictTransportDefault(java.lang.String address,
int port)
throws DictTransportException
- Throws:
DictTransportException
setSocketSoTimeout
public void setSocketSoTimeout(int socketSoTimeout)
setSocketConnectTimeout
public void setSocketConnectTimeout(int socketConnectTimeout)
setLogAppender
public static void setLogAppender(DictLogAppender appender)
- Parameters:
appender
- Log appender
connect
public java.lang.String connect()
throws DictTransportException
- Specified by:
connect
in interface DictTransport
- Throws:
DictTransportException
disconnect
public void disconnect()
- Specified by:
disconnect
in interface DictTransport
sendCommand
public void sendCommand(java.lang.String string)
- Specified by:
sendCommand
in interface DictTransport
receiveLine
public java.lang.String receiveLine()
- Specified by:
receiveLine
in interface DictTransport
receiveResponse
public java.lang.String receiveResponse()
throws DictTransportException
- Specified by:
receiveResponse
in interface DictTransport
- Throws:
DictTransportException
closeQuietly
public static void closeQuietly(java.io.Closeable closeable)
- Unconditionally close an
Closeable
.
- Parameters:
closeable
- the Closeable to close, may be null or already closed