/** * Gets the authentication capabilities for the connection with the remote host. * * @param connectionHandle - {@link ConnectionHandle} associated with the host * @param cipherSuite - {@link CipherSuite} that will be used during the connection * @param requestedPrivilegeLevel - {@link PrivilegeLevel} that is requested for the session * @return - {@link GetChannelAuthenticationCapabilitiesResponseData} * @throws ConnectionException when connection is in the state that does not allow to perform this * operation. * @throws Exception when sending message to the managed system fails */ public GetChannelAuthenticationCapabilitiesResponseData getChannelAuthenticationCapabilities( ConnectionHandle connectionHandle, CipherSuite cipherSuite, PrivilegeLevel requestedPrivilegeLevel) throws Exception { int tries = 0; GetChannelAuthenticationCapabilitiesResponseData result = null; while (tries <= retries && result == null) { try { ++tries; result = connectionManager.getChannelAuthenticationCapabilities( connectionHandle.getHandle(), cipherSuite, requestedPrivilegeLevel); connectionHandle.setCipherSuite(cipherSuite); connectionHandle.setPrivilegeLevel(requestedPrivilegeLevel); } catch (Exception e) { logger.warn("Failed to receive answer, cause:", e); if (tries > retries) { throw e; } } } return result; }