All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.webbitserver.WebSocket Maven / Gradle / Ivy

There is a newer version: 0.4.15
Show newest version
package org.webbitserver;

import org.webbitserver.netty.WebSocketClient;

import java.io.InputStream;
import java.util.concurrent.Future;

public interface WebSocket {
    Future start();

    WebSocket close();

    WebSocket reconnectEvery(long millis);

    WebSocket setupSsl(InputStream keyStore, String storePass);

    /**
     * What to do when an exception gets thrown in a handler.
     * 

* Defaults to using {@link org.webbitserver.handler.exceptions.PrintStackTraceExceptionHandler}. * It is suggested that apps supply their own implementation (e.g. to log somewhere). */ WebSocketClient uncaughtExceptionHandler(Thread.UncaughtExceptionHandler handler); /** * What to do when an exception occurs when attempting to read/write data * from/to the underlying connection. e.g. If an HTTP request disconnects * before it was expected. *

* Defaults to using {@link org.webbitserver.handler.exceptions.SilentExceptionHandler} * as this is a common thing to happen on a network, and most systems should not care. */ WebSocketClient connectionExceptionHandler(Thread.UncaughtExceptionHandler handler); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy