| Modifier and Type | Field and Description |
|---|---|
| private final Set | |
| private ClientManager | |
| private final ErrorCollector | |
| private long | |
| private long | |
| private final Set | |
| private final Set | |
| private int | |
| private int | |
| private boolean | |
| private volatile int | |
| private final ServerApplicationConfig |
| Access | Constructor and Description |
|---|---|
| public | TyrusServerContainer(Set<Class<?>>
classes to be included in this application instance. Can contain any combination of annotated
endpoints (see classes)jakarta.) or jakarta.
descendants.Create new |
| public | TyrusServerContainer(ServerApplicationConfig
provided application config. serverApplicationConfig)Create new |
| Modifier and Type | Method and Description |
|---|---|
| public void | addEndpoint(Class<?>
the class of the annotated endpoint endpointClass)Implements jakarta. Deploys the given annotated endpoint into this ServerContainer. |
| public void | addEndpoint(ServerEndpointConfig
the configuration instance representing the logical endpoint that will be registered. serverEndpointConfig)Implements jakarta. Deploys the given endpoint described by the provided configuration into this ServerContainer. |
| public Future | Returns: Future for the Session created if the connection is successful.the annotated websocket client endpoint. annotatedEndpointClass, URI the complete path to the server endpoint. path)Non-blocking version of |
| public Future | Returns: the Session created if the connection is successful.the programmatic client endpoint class endpointClass, ClientEndpointConfig Endpoint.the configuration used to configure the programmatic endpoint. cec, URI the complete path to the server endpoint. path)Non-blocking version of |
| public Future | Returns: the Session created if the connection is successful.the programmatic client endpoint instance endpointInstance, ClientEndpointConfig Endpoint.the configuration used to configure the programmatic endpoint. cec, URI the complete path to the server endpoint. path)Non-blocking version of |
| public Future | Returns: the Session created if the connection is successful.the annotated websocket client endpoint instance. obj, URI the complete path to the server endpoint. path)Non-blocking version of |
| public Session | connectToServer(Class<T>
the annotated websocket client endpoint. annotatedEndpointClass, URI the complete path to the server endpoint. path)Implements jakarta. Connect the supplied annotated endpoint to its server. |
| public Session | connectToServer(Class<? extends Endpoint>
the programmatic client endpoint class endpointClass, ClientEndpointConfig Endpoint.the configuration used to configure the programmatic endpoint. cec, URI the complete path to the server endpoint. path)Implements jakarta. Connect the supplied programmatic endpoint to its server with the given configuration. |
| public Session | connectToServer(Object
the annotated websocket client endpoint instance. annotatedEndpointInstance, URI the complete path to the server endpoint. path)Implements jakarta. Connect the supplied annotated endpoint instance to its server. |
| public Session | connectToServer(Endpoint
the programmatic client endpoint instance endpointInstance, ClientEndpointConfig Endpoint.the configuration used to configure the programmatic endpoint. cec, URI the complete path to the server endpoint. path)Implements jakarta. Connect the supplied programmatic client endpoint instance to its server with the given configuration. |
| public void | doneDeployment()
Container is no longer required to accept |
| protected synchronized ClientManager | Returns: ClientManager associated with this server container.Can be overridden to provide own |
| public long | getDefaultAsyncSendTimeout()
Implements jakarta. Return the number of milliseconds the implementation will timeout attempting to send a websocket message for all RemoteEndpoints associated with this container. |
| public int | getDefaultMaxBinaryMessageBufferSize()
Implements jakarta. Returns the default maximum size of incoming binary message that this container will buffer. |
| public long | getDefaultMaxSessionIdleTimeout()
Implements jakarta. Return the default time in milliseconds after which any web socket sessions in this container will be closed if it has been inactive. |
| public int | getDefaultMaxTextMessageBufferSize()
Implements jakarta. Returns the default maximum size of incoming text message that this container will buffer. |
| public Set | getInstalledExtensions()
Implements jakarta. Return the set of Extensions installed in the container. |
| public int | Returns: the port of the started container or-1, when the container is not started or the container does
not provide the port.Get port of the started container. |
| public abstract void | |
| public abstract void | |
| public void | setAsyncSendTimeout(long
the timeout in milliseconds; use zero or negative value for no timeout timeoutmillis)Implements jakarta. Sets the number of milliseconds the implementation will timeout attempting to send a websocket message for all RemoteEndpoints associated with this container. |
| public void | setDefaultMaxBinaryMessageBufferSize(int
the maximum size of binary message in number of bytes. max)Implements jakarta. Sets the default maximum size of incoming binary message that this container will buffer. |
| public void | setDefaultMaxSessionIdleTimeout(long
the maximum time in milliseconds; use zero or negative value for no timeout defaultMaxSessionIdleTimeout)Implements jakarta. Sets the default time in milliseconds after which any web socket sessions in this container will be closed if it has been inactive. |
| public void | setDefaultMaxTextMessageBufferSize(int
the maximum size of text message in number of bytes. max)Implements jakarta. Sets the maximum size of incoming text message that this container will buffer. |
| public void | start(String
context path of the deployed websocket application. rootPath, int TCP port port)Implements org. Start the container. |
| public void | stop()
Implements org. Undeploy all endpoints and stop underlying |
| public void | upgradeHttpToWebSocket(Object
The httpServletRequest, Object HttpServletRequest to be processed as a WebSocket handshake as per
section 4.0 of RFC 6455.The httpServletResponse, ServerEndpointConfig HttpServletResponse to be used when processing the
httpServletRequest as a WebSocket handshake as per section 4.0 of RFC 6455.The server endpoint configuration to use to configure the WebSocket endpoint sec, Map<String, String> Provides a mapping of path parameter names and values, if any, to be used for the
WebSocket connection established by the call to this method. If no such mapping is
defined, an empty Map must be passed. pathParameters)Implements jakarta. Upgrade the HTTP connection represented by the |
| classes | back to summary |
|---|---|
| private final Set<Class<?>> classes | |
| clientManager | back to summary |
|---|---|
| private ClientManager clientManager | |
| collector | back to summary |
|---|---|
| private final ErrorCollector collector | |
| defaultAsyncSendTimeout | back to summary |
|---|---|
| private long defaultAsyncSendTimeout | |
| defaultMaxSessionIdleTimeout | back to summary |
|---|---|
| private long defaultMaxSessionIdleTimeout | |
| dynamicallyAddedClasses | back to summary |
|---|---|
| private final Set<Class<?>> dynamicallyAddedClasses | |
| dynamicallyAddedEndpointConfigs | back to summary |
|---|---|
| private final Set<ServerEndpointConfig> dynamicallyAddedEndpointConfigs | |
| maxBinaryMessageBufferSize | back to summary |
|---|---|
| private int maxBinaryMessageBufferSize | |
| maxTextMessageBufferSize | back to summary |
|---|---|
| private int maxTextMessageBufferSize | |
| notYetStarted | back to summary |
|---|---|
| private boolean notYetStarted | |
| port | back to summary |
|---|---|
| private volatile int port | |
| serverApplicationConfig | back to summary |
|---|---|
| private final ServerApplicationConfig serverApplicationConfig | |
| TyrusServerContainer | back to summary |
|---|---|
| public TyrusServerContainer(Set<Class<?>> classes) Create new
| |
| TyrusServerContainer | back to summary |
|---|---|
| public TyrusServerContainer(ServerApplicationConfig serverApplicationConfig) Create new
| |
| addEndpoint | back to summary |
|---|---|
| public void addEndpoint(Class<?> endpointClass) throws DeploymentException Implements jakarta. Doc from jakarta. Deploys the given annotated endpoint into this ServerContainer.
| |
| addEndpoint | back to summary |
|---|---|
| public void addEndpoint(ServerEndpointConfig serverEndpointConfig) throws DeploymentException Implements jakarta. Doc from jakarta. Deploys the given endpoint described by the provided configuration into this ServerContainer.
| |
| asyncConnectToServer | back to summary |
|---|---|
| public Future Non-blocking version of Only simple checks are performed in the main thread; client container is created in different thread, same applies to connecting etc.
| |
| asyncConnectToServer | back to summary |
|---|---|
| public Future Non-blocking version of Only simple checks are performed in the main thread; client container is created in different thread, same applies to connecting etc.
| |
| asyncConnectToServer | back to summary |
|---|---|
| public Future Non-blocking version of Only simple checks are performed in the main thread; client container is created in different thread, same applies to connecting etc.
| |
| asyncConnectToServer | back to summary |
|---|---|
| public Future Non-blocking version of Only simple checks are performed in the main thread; client container is created in different thread, same applies to connecting etc.
| |
| connectToServer | back to summary |
|---|---|
| public Session connectToServer(Class<T> annotatedEndpointClass, URI path) throws DeploymentException, IOException Implements jakarta. Doc from jakarta. Connect the supplied annotated endpoint to its server. The supplied object must be a class decorated with the
class level
| |
| connectToServer | back to summary |
|---|---|
| public Session connectToServer(Class<? extends Endpoint> endpointClass, ClientEndpointConfig cec, URI path) throws DeploymentException, IOException Implements jakarta. Doc from jakarta. Connect the supplied programmatic endpoint to its server with the given configuration. This method blocks until the connection is established, or throws an error if the connection could not be made.
| |
| connectToServer | back to summary |
|---|---|
| public Session connectToServer(Object annotatedEndpointInstance, URI path) throws DeploymentException, IOException Implements jakarta. Doc from jakarta. Connect the supplied annotated endpoint instance to its server. The supplied object must be a class decorated
with the class level
| |
| connectToServer | back to summary |
|---|---|
| public Session connectToServer(Endpoint endpointInstance, ClientEndpointConfig cec, URI path) throws DeploymentException, IOException Implements jakarta. Doc from jakarta. Connect the supplied programmatic client endpoint instance to its server with the given configuration. This
method blocks until the connection is established, or throws an error if the connection could not be made. If the
developer uses this method to deploy the client endpoint, services like dependency injection that are supported,
for example, when the implementation is part of the Java EE platform may not be available. If the client endpoint
uses dependency injection, use
| |
| doneDeployment | back to summary |
|---|---|
| public void doneDeployment() Container is no longer required to accept | |
| getClientManager | back to summary |
|---|---|
| protected synchronized ClientManager getClientManager() Can be overridden to provide own
| |
| getDefaultAsyncSendTimeout | back to summary |
|---|---|
| public long getDefaultAsyncSendTimeout() Implements jakarta. Doc from jakarta. Return the number of milliseconds the implementation will timeout attempting to send a websocket message for all RemoteEndpoints associated with this container. A zero or negative value indicates the implementation will not timeout attempting to send a websocket message asynchronously. Note this default may be overridden in each RemoteEndpoint.
| |
| getDefaultMaxBinaryMessageBufferSize | back to summary |
|---|---|
| public int getDefaultMaxBinaryMessageBufferSize() Implements jakarta. Doc from jakarta. Returns the default maximum size of incoming binary message that this container will buffer. This default may be
overridden on a per session basis using
| |
| getDefaultMaxSessionIdleTimeout | back to summary |
|---|---|
| public long getDefaultMaxSessionIdleTimeout() Implements jakarta. Doc from jakarta. Return the default time in milliseconds after which any web socket sessions in this container will be closed if
it has been inactive. A value that is zero or negative indicates the sessions will never timeout due to inactivity.
The value may be overridden on a per session basis using
| |
| getDefaultMaxTextMessageBufferSize | back to summary |
|---|---|
| public int getDefaultMaxTextMessageBufferSize() Implements jakarta. Doc from jakarta. Returns the default maximum size of incoming text message that this container will buffer. This default may be
overridden on a per session basis using
| |
| getInstalledExtensions | back to summary |
|---|---|
| public Set Implements jakarta. Doc from jakarta. Return the set of Extensions installed in the container. | |
| getPort | back to summary |
|---|---|
| public int getPort() Get port of the started container.
| |
| register | back to summary |
|---|---|
| public abstract void register(Class<?> endpointClass) throws DeploymentException | |
| register | back to summary |
|---|---|
| public abstract void register(ServerEndpointConfig serverEndpointConfig) throws DeploymentException | |
| setAsyncSendTimeout | back to summary |
|---|---|
| public void setAsyncSendTimeout(long timeoutmillis) Implements jakarta. Doc from jakarta. Sets the number of milliseconds the implementation will timeout attempting to send a websocket message for all RemoteEndpoints associated with this container. A zero or negative value indicates the implementation will not timeout attempting to send a websocket message asynchronously. Note this default may be overridden in each RemoteEndpoint.
| |
| setDefaultMaxBinaryMessageBufferSize | back to summary |
|---|---|
| public void setDefaultMaxBinaryMessageBufferSize(int max) Implements jakarta. Doc from jakarta. Sets the default maximum size of incoming binary message that this container will buffer.
| |
| setDefaultMaxSessionIdleTimeout | back to summary |
|---|---|
| public void setDefaultMaxSessionIdleTimeout(long defaultMaxSessionIdleTimeout) Implements jakarta. Doc from jakarta. Sets the default time in milliseconds after which any web socket sessions in this container will be closed if it
has been inactive. A value that is zero or negative indicates the sessions will never timeout due to inactivity. The
value may be overridden on a per session basis using
| |
| setDefaultMaxTextMessageBufferSize | back to summary |
|---|---|
| public void setDefaultMaxTextMessageBufferSize(int max) Implements jakarta. Doc from jakarta. Sets the maximum size of incoming text message that this container will buffer.
| |
| start | back to summary |
|---|---|
| public void start(String rootPath, int port) throws IOException, DeploymentException Implements org. Start the container.
| |
| stop | back to summary |
|---|---|
| public void stop() Implements org. Undeploy all endpoints and stop underlying Release all created threadpools / executor services.
| |
| upgradeHttpToWebSocket | back to summary |
|---|---|
| public void upgradeHttpToWebSocket(Object httpServletRequest, Object httpServletResponse, ServerEndpointConfig sec, Map<String, String> pathParameters) throws IOException, DeploymentException Implements jakarta. Doc from jakarta. Upgrade the HTTP connection represented by the This method is primarily intended to be used by frameworks that implement the front-controller pattern. It does not deploy the provided endpoint.
If the WebSocket implementation is not deployed as part of a Jakarta Servlet container, this method will throw an
| |