javax.websocket.server

Class ServerEndpointConfig.Builder

  • Enclosing interface:
    ServerEndpointConfig

    public static final class ServerEndpointConfig.Builder
    extends Object
    The ServerEndpointConfig.Builder is a class used for creating ServerEndpointConfig.Builder objects for the purposes of deploying a server endpoint.

    Here are some examples:

    Building a plain configuration for an endpoint with just a path.

    
     ServerEndpointConfig config = ServerEndpointConfig.Builder.create(ProgrammaticEndpoint.class, "/foo").build();
     

    Building a configuration with no subprotocols and a custom configurator.

    
     ServerEndpointConfig config = ServerEndpointConfig.Builder.create(ProgrammaticEndpoint.class, "/bar")
             .subprotocols(subprotocols)
             .configurator(new MyServerConfigurator())
             .build();
     
    Author:
    dannycoward
    • Method Detail

      • create

        public static ServerEndpointConfig.Builder create(Class<?> endpointClass,
                                                          String path)
        Creates the builder with the mandatory information of the endpoint class (programmatic or annotated), the relative URI or URI-template to use, and with no subprotocols, extensions, encoders, decoders or custom configurator.
        Parameters:
        endpointClass - the class of the endpoint to configure
        path - The URI or URI template where the endpoint will be deployed. A trailing "/" will be ignored and the path must begin with /.
        Returns:
        a new instance of ServerEndpointConfig.Builder
      • build

        public ServerEndpointConfig build()
        Builds the configuration object using the current attributes that have been set on this builder object.
        Returns:
        a new ServerEndpointConfig object.
      • encoders

        public ServerEndpointConfig.Builder encoders(List<Class<? extends Encoder>> encoders)
        Sets the list of encoder implementation classes for this builder.
        Parameters:
        encoders - the encoders
        Returns:
        this builder instance
      • decoders

        public ServerEndpointConfig.Builder decoders(List<Class<? extends Decoder>> decoders)
        Sets the decoder implementation classes to use in the configuration.
        Parameters:
        decoders - the decoders
        Returns:
        this builder instance.
      • subprotocols

        public ServerEndpointConfig.Builder subprotocols(List<String> subprotocols)
        Sets the subprotocols to use in the configuration.
        Parameters:
        subprotocols - the subprotocols.
        Returns:
        this builder instance
      • extensions

        public ServerEndpointConfig.Builder extensions(List<Extension> extensions)
        Sets the extensions to use in the configuration.
        Parameters:
        extensions - the extensions to use.
        Returns:
        this builder instance.

Nederlandse vertaling

U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.

Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.

Bij voorbaat dank.

Document heeft de 11/06/2005 gemaakt, de laatste keer de 18/08/2025 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/java-api-javaee-rf-javax/websocket/server/serverendpointconfig.builder.html

De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.

Referenties

  1. Bekijk - html-document Taal van het document:fr Manuel PHP : https://docs.oracle.com/en/java/, Class ServerEndpointConfig.Builder

Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur van deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.