Package org.glassfish.tyrus.spi
Interface ServerContainer
-
- All Superinterfaces:
ServerContainer
,WebSocketContainer
- All Known Implementing Classes:
TyrusServerContainer
public interface ServerContainer extends ServerContainer
HTTP server abstraction.TODO rename the class to avoid findbugs
- Author:
- Martin Matula
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description WebSocketEngine
getWebSocketEngine()
Return WebSocketEngine to upgrade requests and setting up the connection.void
start(java.lang.String rootPath, int port)
Start the server.void
stop()
Stop the server.-
Methods inherited from interface jakarta.websocket.server.ServerContainer
addEndpoint, addEndpoint, upgradeHttpToWebSocket
-
Methods inherited from interface jakarta.websocket.WebSocketContainer
connectToServer, connectToServer, connectToServer, connectToServer, getDefaultAsyncSendTimeout, getDefaultMaxBinaryMessageBufferSize, getDefaultMaxSessionIdleTimeout, getDefaultMaxTextMessageBufferSize, getInstalledExtensions, setAsyncSendTimeout, setDefaultMaxBinaryMessageBufferSize, setDefaultMaxSessionIdleTimeout, setDefaultMaxTextMessageBufferSize
-
-
-
-
Method Detail
-
start
void start(java.lang.String rootPath, int port) throws java.io.IOException, DeploymentException
Start the server.Creates a new embedded HTTP server (if supported) listening to incoming connections at a given root path and port.
- Parameters:
rootPath
- context rootport
- TCP port- Throws:
java.io.IOException
- if something goes wrong.DeploymentException
- when there is any issue with endpoints or other, non-specific issues.
-
stop
void stop()
Stop the server.
-
getWebSocketEngine
WebSocketEngine getWebSocketEngine()
Return WebSocketEngine to upgrade requests and setting up the connection.- Returns:
- websocket engine
-
-