Exemple #1
0
 /**
  * Gets {@link CipherSuite}s available for the connection with the remote host.
  *
  * @param connectionHandle {@link ConnectionHandle} to the connection created before
  * @see #createConnection(InetAddress)
  * @return list of the {@link CipherSuite}s that are allowed during the connection
  * @throws Exception when sending message to the managed system fails
  */
 public List<CipherSuite> getAvailableCipherSuites(ConnectionHandle connectionHandle)
     throws Exception {
   int tries = 0;
   List<CipherSuite> result = null;
   while (tries <= retries && result == null) {
     try {
       ++tries;
       result = connectionManager.getAvailableCipherSuites(connectionHandle.getHandle());
     } catch (Exception e) {
       logger.warn("Failed to receive answer, cause:", e);
       if (tries > retries) {
         throw e;
       }
     }
   }
   return result;
 }