} else if (clientEndpoint != null) {
JsrWebSocketLogger.ROOT_LOGGER.addingAnnotatedClientEndpoint(endpoint);
EncodingFactory encodingFactory = EncodingFactory.createFactory(classIntrospecter, clientEndpoint.decoders(), clientEndpoint.encoders());
AnnotatedEndpointFactory factory = AnnotatedEndpointFactory.create(xnioWorker, endpoint, classIntrospecter.createInstanceFactory(endpoint), encodingFactory, Collections.<String>emptySet());
ClientEndpointConfig config = ClientEndpointConfig.Builder.create()
.decoders(Arrays.asList(clientEndpoint.decoders()))
.encoders(Arrays.asList(clientEndpoint.encoders()))
.preferredSubprotocols(Arrays.asList(clientEndpoint.subprotocols()))
.configurator(clientEndpoint.configurator().newInstance())
.build();