public class AsciiSocketDriver extends AbstractSocketDriver
| Modifier and Type | Field and Description |
|---|---|
private BufferedReader |
bin
Wrapped around the socket output stream on open.
|
private BufferedWriter |
bout
Wrapped around the socket output stream on open.
|
static String |
KEY_ALWAYSCLOSE
The wait period for a sender to check its queue.
|
static String |
KEY_SENDNEWLINE
If true, send a new line after a command.
|
KEY_CLOSETIMEOUT, KEY_SOCKETPORT, KEY_SOCKETSERVER, KEY_SOCKETTIMEOUTKEY_DRIVERNAMEKEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORCONFIG, KEY_CLASS| Constructor and Description |
|---|
AsciiSocketDriver(Map<String,String> prop) |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
commandAndResponse(String cmd) |
boolean |
open()
Connect to remote host.
|
private String |
readLine() |
private void |
writeString(String cmd)
Writes a string to the strean
|
authenticate, close, exit, getInputStream, getOutputStream, getSocket, init, isOpen, setTimeoutcreateDriver, equals, getDriverName, hashCodeaugment, augment, augment, augment, augment, clone, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, initProperties, isNew, parseObject, parseObject, reload, reload, removeProperty, requires, rescanned, setObject, setProperties, setProperty, stringProperties, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitgetDriverNamepublic static final String KEY_ALWAYSCLOSE
public static final String KEY_SENDNEWLINE
private BufferedReader bin
private BufferedWriter bout
public boolean open()
throws IOException
open in interface Driveropen in class AbstractSocketDriverIOException - Exception to throw on connection errorprivate void writeString(String cmd) throws IOException
cmd - IOExceptionprivate String readLine() throws IOException
IOExceptionpublic List<String> commandAndResponse(String cmd) throws IOException
IOException