public abstract class AbstractProxyConnectionHandler extends Object implements WavefrontConnectionHandler
Modifier | Constructor and Description |
---|---|
protected |
AbstractProxyConnectionHandler(InetSocketAddress address,
SocketFactory socketFactory) |
protected |
AbstractProxyConnectionHandler(InetSocketAddress address,
SocketFactory socketFactory,
Long connectionTimeToLiveMillis,
java.util.function.Supplier<Long> timeSupplier) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
connect()
Connects to the server.
|
void |
flush()
Flushes buffer, if applicable
|
boolean |
isConnected()
Returns true if ready to send data
|
protected void |
sendData(String lineData)
Sends the given data to the Wavefront proxy.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFailureCount
protected AbstractProxyConnectionHandler(InetSocketAddress address, SocketFactory socketFactory)
protected AbstractProxyConnectionHandler(InetSocketAddress address, SocketFactory socketFactory, @Nullable Long connectionTimeToLiveMillis, @Nullable java.util.function.Supplier<Long> timeSupplier)
public void connect() throws IllegalStateException, IOException
WavefrontConnectionHandler
connect
in interface WavefrontConnectionHandler
IllegalStateException
- if the client is already connectedIOException
- if there is an error connectingpublic boolean isConnected()
WavefrontConnectionHandler
isConnected
in interface WavefrontConnectionHandler
public void flush() throws IOException
WavefrontConnectionHandler
flush
in interface WavefrontConnectionHandler
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2019. All rights reserved.