Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-229

Explicit need to have a default client configuration

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Major Major
    • 1.1.Beta1
    • None
    • None
    • None

      In this test I have to provide a default ClientEndpointConfig object

      @Test
          public void websocketORG() throws IOException, DeploymentException, URISyntaxException {
              final WebSocketContainer container = ContainerProvider.getWebSocketContainer();
              final URI securedEndpointURL = new URI("ws://echo.websocket.org"); // hrm, I really have to specify a port here ?
      
              container.connectToServer(new Endpoint() {
                  @Override
                  public void onOpen(Session session, EndpointConfig config) {
                      System.out.println("Connected!!!!!");
                  }
              },
                      ClientEndpointConfig.Builder.create().build(), // for some reason I have to provide that default config; Not so w/ Tyrus
                      securedEndpointURL);
          }
      

      Wouldn't it be nice if the default configuration is provided for users convenience ?

              sdouglas1@redhat.com Stuart Douglas (Inactive)
              mwessend@redhat.com Matthias Wessendorf
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: