Skip to content

Add Javadoc to public methods in de.rub.nds.crawler.targetlist package #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ public class CruxListProvider extends ZipFileProvider {
private static final String ZIP_FILENAME = "current.csv.gz";
private static final String FILENAME = "current.csv";

/**
* Constructs a CruxListProvider with the specified list size.
*
* @param cruxListNumber The number of hosts to extract from the Crux list
*/
public CruxListProvider(CruxListNumber cruxListNumber) {
super(cruxListNumber.getNumber(), SOURCE, ZIP_FILENAME, FILENAME, "Crux");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,10 @@

public interface ITargetListProvider {

/**
* Retrieves the list of target hosts to scan.
*
* @return A list of target host names
*/
List<String> getTargetList();
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ public class TargetFileProvider implements ITargetListProvider {

private String filename;

/**
* Constructs a TargetFileProvider with the specified file.
*
* @param filename Path to the file containing target hosts
*/
public TargetFileProvider(String filename) {
this.filename = filename;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ public class TrancoEmailListProvider implements ITargetListProvider {

private final ITargetListProvider trancoList;

/**
* Constructs a TrancoEmailListProvider with the specified Tranco list provider.
*
* @param trancoList The Tranco list provider to extract email servers from
*/
public TrancoEmailListProvider(ITargetListProvider trancoList) {
this.trancoList = trancoList;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ public class TrancoListProvider extends ZipFileProvider {
private static final String ZIP_FILENAME = "tranco-1m.csv.zip";
private static final String FILENAME = "tranco-1m.csv";

/**
* Constructs a TrancoListProvider with the specified number of hosts.
*
* @param number The number of top hosts to extract from the Tranco list
*/
public TrancoListProvider(int number) {
super(number, SOURCE, ZIP_FILENAME, FILENAME, "Tranco");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ protected ZipFileProvider(
this.listName = listName;
}

/**
* Downloads, extracts, and processes the target list from the configured zip file source.
*
* @return A list of target hosts extracted from the downloaded file
*/
public List<String> getTargetList() {
List<String> targetList;
try {
Expand Down