|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.webbitserver.netty.WebSocketClient
public class WebSocketClient
| Constructor Summary | |
|---|---|
WebSocketClient(URI uri,
WebSocketHandler webSocketHandler)
|
|
WebSocketClient(URI uri,
WebSocketHandler webSocketHandler,
Executor executor)
|
|
| Method Summary | |
|---|---|
WebSocketClient |
connectionExceptionHandler(Thread.UncaughtExceptionHandler handler)
What to do when an exception occurs when attempting to read/write data from/to the underlying connection. |
WebSocketClient |
cookie(HttpCookie httpCookie)
|
Executor |
getExecutor()
Get main work executor that all handlers will execute on. |
URI |
getUri()
Get base URI that endpoint is serving on (or connected to). |
WebSocketClient |
reconnectEvery(long reconnectIntervalMillis)
|
WebSocketClient |
setupSsl(InputStream keyStore,
String storePass)
Setup SSL/TLS handler This is shortcut for setupSsl(keyStore, pass, pass). |
Future<WebSocketClient> |
start()
Start in background. |
Future<WebSocketClient> |
stop()
Stop in background. |
WebSocketClient |
uncaughtExceptionHandler(Thread.UncaughtExceptionHandler handler)
What to do when an exception gets thrown in a handler. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WebSocketClient(URI uri,
WebSocketHandler webSocketHandler)
public WebSocketClient(URI uri,
WebSocketHandler webSocketHandler,
Executor executor)
| Method Detail |
|---|
public WebSocketClient cookie(HttpCookie httpCookie)
public WebSocketClient uncaughtExceptionHandler(Thread.UncaughtExceptionHandler handler)
EndpointPrintStackTraceExceptionHandler.
It is suggested that apps supply their own implementation (e.g. to log somewhere).
uncaughtExceptionHandler in interface Endpoint<WebSocket>public WebSocketClient connectionExceptionHandler(Thread.UncaughtExceptionHandler handler)
EndpointSilentExceptionHandler
as this is a common thing to happen on a network, and most systems should not care.
connectionExceptionHandler in interface Endpoint<WebSocket>public Executor getExecutor()
Endpoint
getExecutor in interface Endpoint<WebSocket>public URI getUri()
Endpoint
getUri in interface Endpoint<WebSocket>
public WebSocketClient setupSsl(InputStream keyStore,
String storePass)
EndpointsetupSsl(keyStore, pass, pass).
setupSsl in interface Endpoint<WebSocket>keyStore - Keystore InputStreamstorePass - Store and key password
#setupSsl(String, String, String)public Future<WebSocketClient> start()
EndpointFuture.get() on the returned future.
start in interface Endpoint<WebSocket>public Future<WebSocketClient> stop()
EndpointFuture.get() on the returned future.
stop in interface Endpoint<WebSocket>public WebSocketClient reconnectEvery(long reconnectIntervalMillis)
reconnectEvery in interface WebSocket
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||