Search in sources :

Example 1 with VncClient

use of vncclient.VncClient in project cloudstack by apache.

the class Client method setMainElementAndAddressBasedOnProtocol.

private Element setMainElementAndAddressBasedOnProtocol(Protocol protocol, SSLState sslState) {
    Element main;
    switch(protocol) {
        case VNC:
            address = new InetSocketAddress(hostName.value, vncPort.value);
            main = new VncClient("client", password.value, screen, canvas);
            break;
        case RDP:
            address = new InetSocketAddress(hostName.value, rdpPort.value);
            main = new RdpClient("client", hostName.value, domain.value, userName.value, rdpPassword.value, null, screen, canvas, sslState);
            break;
        case HYPERV:
            address = new InetSocketAddress(hostName.value, hyperVPort.value);
            main = new RdpClient("client", hostName.value, domain.value, userName.value, password.value, hyperVInstanceId.value, screen, canvas, sslState);
            break;
        default:
            address = null;
            main = null;
    }
    return main;
}
Also used : InetSocketAddress(java.net.InetSocketAddress) Element(streamer.Element) VncClient(vncclient.VncClient) RdpClient(rdpclient.RdpClient)

Aggregations

InetSocketAddress (java.net.InetSocketAddress)1 RdpClient (rdpclient.RdpClient)1 Element (streamer.Element)1 VncClient (vncclient.VncClient)1