package org.yamcs.api.ws;

import java.net.URI;
import java.net.URISyntaxException;

import org.yamcs.ConfigurationException;

public class YamcsConnectionProperties {
    private String host;
    private int port;
    private String instance;
    
    public YamcsConnectionProperties(String host, int port, String instance) {
        this.host = host;
        this.port = port;
        this.instance = instance;
    }

    public URI webResourceURI(String relativePath) {
        if (!relativePath.startsWith("/")) {
            relativePath = "/" + relativePath;
        }
        try {
            return new URI("http://" + host + ":" + port + "/" + instance + relativePath);
        } catch (URISyntaxException e) {
            throw new ConfigurationException("Invalid URL", e);
        }
    }

    public URI webSocketURI() {
        try {
            return new URI("ws://" + host + ":" + port + "/" + instance + "/_websocket");
        } catch (URISyntaxException e) {
            throw new ConfigurationException("Invalid URL", e);
        }
    }
}
@@ -408,24 +408,215 @@
 tance;%0A    %7D
+%0A    %0A    public String getHost() %7B%0A        return host;%0A    %7D%0A    %0A    public int getPort() %7B%0A        return port;%0A    %7D%0A    %0A    public String getInstance() %7B%0A        return instance;%0A    %7D
 %0A%0A    public
@@ -1244,9 +1244,131 @@
 %7D%0A    %7D%0A
+    %0A    public String getYamcsConnectionString() %7B%0A        return %22yamcs://%22 + host + %22:%22 + port + %22/%22 + instance;%0A    %7D%0A
 %7D

Add a few getters to YamcsConnectionProperties