Example #1
0
 public CompatibleConnection findCompatibelConnection(ApplicationEntity remote)
     throws IncompatibleConnectionException {
   CompatibleConnection cc = null;
   for (Connection remoteConn : remote.connections)
     if (remoteConn.isInstalled() && remoteConn.isServer())
       for (Connection conn : connections)
         if (conn.isInstalled() && conn.isCompatible(remoteConn)) {
           if (cc == null || conn.isTls() || conn.getProtocol() == Connection.Protocol.SYSLOG_TLS)
             cc = new CompatibleConnection(conn, remoteConn);
         }
   if (cc == null)
     throw new IncompatibleConnectionException(
         "No compatible connection to " + remote + " available on " + this);
   return cc;
 }