javax.websocket.server

Interface ServerContainer

  • All Superinterfaces:
    WebSocketContainer

    public interface ServerContainer
    extends WebSocketContainer
    The ServerContainer is the specialized view of the WebSocketContainer available in server-side deployments. There is one ServerContainer instance per websocket application. The ServerContainer holds the methods to be able to register server endpoints during the initialization phase of the application.

    For websocket enabled web containers, developers may obtain a reference to the ServerContainer instance by retrieving it as an attribute named javax.websocket.server.ServerContainer on the ServletContext. This way, the registration methods held on this interface may be called to register server endpoints from a ServletContextListener during the deployment of the WAR file containing the endpoint.

    WebSocket implementations that run outside the web container may have other means by which to provide a ServerContainer instance to the developer at application deployment time.

    Once the application deployment phase is complete, and the websocket application has begun accepting incoming connections, the registration methods may no longer be called.

    Author:
    dannycoward
    • Method Detail

      • addEndpoint

        void addEndpoint(Class<?> endpointClass)
                  throws DeploymentException
        Deploys the given annotated endpoint into this ServerContainer during the initialization phase of deploying the application.
        Parameters:
        endpointClass - the class of the annotated endpoint
        Throws:
        DeploymentException - if the annotated endpoint was badly formed.
        IllegalStateException - if the containing websocket application has already been deployed.

Traduction non disponible

Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.

Version en cache

07/10/2025 05:54:52 Cette version de la page est en cache (à la date du 07/10/2025 05:54:52) afin d'accélérer le traitement.
Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la version plus récente de la page.

Document créé le 11/06/2005, dernière modification le 18/08/2025
Source du document imprimé : https://www.gaudry.be/java-api-javaee-rf-javax/websocket/server/servercontainer.html

L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.

Références

  1. Consulter le document html Langue du document :fr Manuel PHP : https://docs.oracle.com/en/java/, Interface ServerContainer

Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.