|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Endpoint<T>
| Method Summary | |
|---|---|
T |
connectionExceptionHandler(Thread.UncaughtExceptionHandler handler)
What to do when an exception occurs when attempting to read/write data from/to the underlying connection. |
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). |
T |
setupSsl(InputStream keyStore,
String pass)
Setup SSL/TLS handler This is shortcut for setupSsl(keyStore, pass, pass). |
Future<? extends T> |
start()
Start in background. |
Future<? extends T> |
stop()
Stop in background. |
T |
uncaughtExceptionHandler(Thread.UncaughtExceptionHandler handler)
What to do when an exception gets thrown in a handler. |
| Method Detail |
|---|
Future<? extends T> start()
Future.get() on the returned future.
Future<? extends T> stop()
Future.get() on the returned future.
T uncaughtExceptionHandler(Thread.UncaughtExceptionHandler handler)
PrintStackTraceExceptionHandler.
It is suggested that apps supply their own implementation (e.g. to log somewhere).
T connectionExceptionHandler(Thread.UncaughtExceptionHandler handler)
SilentExceptionHandler
as this is a common thing to happen on a network, and most systems should not care.
Executor getExecutor()
URI getUri()
T setupSsl(InputStream keyStore,
String pass)
throws WebbitException
setupSsl(keyStore, pass, pass).
keyStore - Keystore InputStreampass - Store and key password
WebbitException - A problem loading the keystore#setupSsl(String, String, String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||