public static final class ClientEndpointConfig.Builder extends Object
ClientEndpointConfig
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();
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 a
null 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.
|
public static ClientEndpointConfig.Builder create()
null
configurator.public ClientEndpointConfig build()
public ClientEndpointConfig.Builder configurator(ClientEndpointConfig.Configurator clientEndpointConfigurator)
clientEndpointConfigurator
- the configuratorpublic ClientEndpointConfig.Builder preferredSubprotocols(List<String> preferredSubprotocols)
preferredSubprotocols
- the preferred subprotocol names.public ClientEndpointConfig.Builder extensions(List<Extension> extensions)
extensions
- the extensionspublic ClientEndpointConfig.Builder encoders(List<Class<? extends Encoder>> encoders)
encoders
- the encoder implementation classespublic ClientEndpointConfig.Builder decoders(List<Class<? extends Decoder>> decoders)
decoders
- the decoder implementation classesCopyright © 2017 JBoss by Red Hat. All rights reserved.