public class ReconnectingSocket extends Object
| Constructor and Description |
|---|
ReconnectingSocket(String host,
int port) |
ReconnectingSocket(String host,
int port,
SocketFactory socketFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush()
Flushes the outputStream best-effort.
|
void |
write(String message)
Try to send the given message.
|
protected static final Logger logger
public ReconnectingSocket(String host, int port, SocketFactory socketFactory) throws IOException
IOException - When we cannot open the remote socket.public ReconnectingSocket(String host, int port) throws IOException
IOExceptionpublic void write(String message) throws Exception
Exception - when a single retry is not enough to have a successful write to
the remote host.public void flush()
throws IOException
IOExceptionpublic void close()
throws IOException
IOExceptionCopyright © 2018. All rights reserved.