io.higgs.ws.protocol.WebSocketConfiguration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of websocket Show documentation
Show all versions of websocket Show documentation
Higgs' WebSocket server and client implementation
package io.higgs.ws.protocol;
import io.higgs.core.ProtocolDetectorFactory;
import io.higgs.http.server.protocol.HttpProtocolConfiguration;
import io.higgs.ws.DefaultWebSocketEventHandler;
import io.higgs.ws.WebSocketEventHandler;
public class WebSocketConfiguration extends HttpProtocolConfiguration {
private String websocketPath = "/";
private WebSocketEventHandler webSocketEventHandler;
@Override
public ProtocolDetectorFactory getProtocol() {
//this is the method to override to provide a WebSocket detector
return new WebSocketDetectorFactory(this);
}
public String getWebsocketPath() {
return websocketPath;
}
public void setWebsocketPath(String websocketPath) {
this.websocketPath = websocketPath;
}
public WebSocketEventHandler getWebSocketEventHandler() {
return webSocketEventHandler == null ? new DefaultWebSocketEventHandler() : webSocketEventHandler;
}
public void setWebSocketEventHandler(WebSocketEventHandler webSocketEventHandler) {
this.webSocketEventHandler = webSocketEventHandler;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy