Package org.glassfish.tyrus.spi
Interface ServerContainer
- All Superinterfaces:
ServerContainer
,WebSocketContainer
- All Known Implementing Classes:
TyrusServerContainer
HTTP server abstraction.
TODO rename the class to avoid findbugs
- Author:
- Martin Matula
-
Method Summary
Modifier and TypeMethodDescriptionReturn WebSocketEngine to upgrade requests and setting up the connection.void
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 Details
-
start
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:
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
-