private GuacamoleSocket getUnconfiguredGuacamoleSocket ( GuacamoleProxyConfiguration proxyConfig , Runnable socketClosedCallback ) throws GuacamoleException { // Select socket type depending on desired encryption switch ( proxyConfig . getEncryptionMethod ( ) ) { // Use SSL if requested case SSL : return new ManagedSSLGuacamoleSocket ( proxyConfig . getHostname ( ) , proxyConfig . getPort ( ) , socketClosedCallback ) ; // Use straight TCP if unencrypted case NONE : return new ManagedInetGuacamoleSocket ( proxyConfig . getHostname ( ) , proxyConfig . getPort ( ) , socketClosedCallback ) ; } // Bail out if encryption method is unknown throw new GuacamoleServerException ( "Unimplemented encryption method." ) ; }
Returns an unconfigured GuacamoleSocket that is already connected to guacd as specified in guacamole . properties using SSL if necessary .