- java.lang.Object
-
- javax.websocket.ClientEndpointConfig.Builder
-
- Enclosing interface:
- ClientEndpointConfig
public static final class ClientEndpointConfig.Builder extends Object
The ClientEndpointConfig.Builder is a class used for creatingClientEndpointConfig
objects for the purposes of deploying a client endpoint. Here are some examples: Building a plain configuration with no encoders, decoders, subprotocols or extensions.ClientEndpointConfig cec = ClientEndpointConfig.Builder.create().build();
Building a configuration with no subprotocols and a custom configurator.ClientEndpointConfig customCec = ClientEndpointConfig.Builder.create() .preferredSubprotocols(mySubprotocols) .configurator(new MyClientConfigurator()) .build();
- Author:
- dannycoward
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description ClientEndpointConfig
build()
Builds a configuration object using the attributes set on this builder.ClientEndpointConfig.Builder
configurator(ClientEndpointConfig.Configurator clientEndpointConfigurator)
Sets the configurator object for the configuration this builder will build.static ClientEndpointConfig.Builder
create()
Creates a new builder object with no subprotocols, extensions, encoders, decoders and anull
configurator.ClientEndpointConfig.Builder
decoders(List<Class<? extends Decoder>> decoders)
Assign the list of decoder implementation classes the client will use.ClientEndpointConfig.Builder
encoders(List<Class<? extends Encoder>> encoders)
Assign the list of encoder implementation classes the client will use.ClientEndpointConfig.Builder
extensions(List<Extension> extensions)
Set the extensions for the configuration this builder will build.ClientEndpointConfig.Builder
preferredSubprotocols(List<String> preferredSubprotocols)
Set the preferred sub protocols for the configuration this builder will build.
-
-
-
Method Detail
-
create
public static ClientEndpointConfig.Builder create()
Creates a new builder object with no subprotocols, extensions, encoders, decoders and anull
configurator.- Returns:
- a new builder object.
-
build
public ClientEndpointConfig build()
Builds a configuration object using the attributes set on this builder.- Returns:
- a new configuration object.
-
configurator
public ClientEndpointConfig.Builder configurator(ClientEndpointConfig.Configurator clientEndpointConfigurator)
Sets the configurator object for the configuration this builder will build.- Parameters:
clientEndpointConfigurator
- the configurator- Returns:
- the builder instance
-
preferredSubprotocols
public ClientEndpointConfig.Builder preferredSubprotocols(List<String> preferredSubprotocols)
Set the preferred sub protocols for the configuration this builder will build. The list is treated in order of preference, favorite first, that this client would like to use for its sessions.- Parameters:
preferredSubprotocols
- the preferred subprotocol names.- Returns:
- the builder instance
-
extensions
public ClientEndpointConfig.Builder extensions(List<Extension> extensions)
Set the extensions for the configuration this builder will build. The list is treated in order of preference, favorite first, that the client would like to use for its sessions.- Parameters:
extensions
- the extensions- Returns:
- the builder instance
-
encoders
public ClientEndpointConfig.Builder encoders(List<Class<? extends Encoder>> encoders)
Assign the list of encoder implementation classes the client will use.- Parameters:
encoders
- the encoder implementation classes- Returns:
- the builder instance
-
decoders
public ClientEndpointConfig.Builder decoders(List<Class<? extends Decoder>> decoders)
Assign the list of decoder implementation classes the client will use.- Parameters:
decoders
- the decoder implementation classes- 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/ClientEndpointConfig.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
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.