Top Description Methods
org.glassfish.tyrus.spi

public Interface ServerContainer

extends ServerContainer
Imports
java.io.IOException, jakarta.websocket.DeploymentException

HTTP server abstraction.

TODO rename the class to avoid findbugs

Author
Martin Matula

Method Summary

Modifier and TypeMethod and Description
public WebSocketEngine

Returns:

websocket engine
getWebSocketEngine
()

Return WebSocketEngine to upgrade requests and setting up the connection.

public void
start(String
context root
rootPath
,
int
TCP port
port
)

Start the server.

public void
stop()

Stop the server.

Inherited from jakarta.websocket.server.ServerContainer:
addEndpointaddEndpointupgradeHttpToWebSocket

Method Detail

getWebSocketEngineback to summary
public WebSocketEngine getWebSocketEngine()

Return WebSocketEngine to upgrade requests and setting up the connection.

Returns:WebSocketEngine

websocket engine

startback to summary
public void start(String rootPath, int port) throws 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:String

context root

port:int

TCP port

Exceptions
IOException:
if something goes wrong.
DeploymentException:
when there is any issue with endpoints or other, non-specific issues.
stopback to summary
public void stop()

Stop the server.