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;
}
Aggregations