public abstract class AbstractDirectConnectionHandler extends Object implements WavefrontConnectionHandler, Runnable
Modifier | Constructor and Description |
---|---|
protected |
AbstractDirectConnectionHandler(String server,
String token) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
connect()
Connects to the server.
|
void |
flush()
Flushes buffer, if applicable
|
protected abstract void |
internalFlush() |
boolean |
isConnected()
Returns true if ready to send data
|
protected javax.ws.rs.core.Response |
report(String format,
InputStream is) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFailureCount
public void connect() throws IllegalStateException, IOException
WavefrontConnectionHandler
connect
in interface WavefrontConnectionHandler
IllegalStateException
- if the client is already connectedIOException
- if there is an error connectingpublic void flush() throws IOException
WavefrontConnectionHandler
flush
in interface WavefrontConnectionHandler
IOException
protected abstract void internalFlush() throws IOException
IOException
public boolean isConnected()
WavefrontConnectionHandler
isConnected
in interface WavefrontConnectionHandler
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
protected javax.ws.rs.core.Response report(String format, InputStream is) throws IOException
IOException
Copyright © 2019. All rights reserved.