HTTPStreamClient
, WSClient
public interface StreamingClient
Modifier and Type | Method | Description |
---|---|---|
void |
addCloseListener(java.lang.Runnable cl) |
Sets a runnable to be ran once this connection is closed.
|
void |
close() |
This will close the client.
|
org.threadly.concurrent.future.ListenableFuture<java.lang.Boolean> |
connect() |
This is called to connect this client to the server.
|
void |
enableSSL() |
This is called to enable ssl on this connection.
|
void |
enableSSL(javax.net.ssl.SSLEngine ssle) |
This is called to enable ssl on this connection.
|
java.util.concurrent.Executor |
getClientsThreadExecutor() |
Gets the
Executor for this client. |
org.threadly.concurrent.future.ListenableFuture<?> |
getLastWriteFuture() |
|
boolean |
isConnected() |
|
void |
setConnectionTimeout(int timeout) |
This sets the timeout on the connection to the remote host.
|
void |
setRequestResponseHeaders(org.threadly.litesockets.protocols.http.request.HTTPRequest httpRequest,
org.threadly.litesockets.protocols.http.response.HTTPResponse httpResponse,
boolean writeResponse) |
Sets the HTTPRequest and HTTPResponse allowing the streaming client to start streaming
w/o sending these in itself.
|
org.threadly.concurrent.future.ListenableFuture<?> |
write(java.nio.ByteBuffer bb) |
This performs a write to the connection.
|
void enableSSL()
void enableSSL(javax.net.ssl.SSLEngine ssle)
SSLEngine
to use for this connection allow you to validate the certificates if needed.ssle
- the SSLEngine
to use for this connection.void setConnectionTimeout(int timeout)
connect()
is called.timeout
- the timeout in milliseconds to use for this connection.void setRequestResponseHeaders(org.threadly.litesockets.protocols.http.request.HTTPRequest httpRequest, org.threadly.litesockets.protocols.http.response.HTTPResponse httpResponse, boolean writeResponse)
httpRequest
- httpResponse
- writeResponse
- org.threadly.concurrent.future.ListenableFuture<?> write(java.nio.ByteBuffer bb)
bb
- the ByteBuffer
to write to socket.ListenableFuture
that will be completed once the frame has been fully written to the socket.org.threadly.concurrent.future.ListenableFuture<?> getLastWriteFuture()
org.threadly.concurrent.future.ListenableFuture<java.lang.Boolean> connect()
ListenableFuture
that will be completed when the upgrade is complete, if the upgrade fails the a ListenableFuture
be failed.void addCloseListener(java.lang.Runnable cl)
cl
- the runnable to run on the connection close.boolean isConnected()
void close()
java.util.concurrent.Executor getClientsThreadExecutor()
Executor
for this client.Executor
for this client.