Skip to content
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

Prober circular list #218

Merged
merged 338 commits into from Aug 12, 2019
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
338 commits
Select commit Hold shift + click to select a range
f5e1814
Fixed Javadoc and comments for ActionHandler
Sanger2000 Jul 11, 2019
efaa9b0
Fixed comments and JavaDoc on other files
Sanger2000 Jul 11, 2019
4dc6411
EOL added
Sanger2000 Jul 11, 2019
6c6d091
Removed Unnecessary Files
Sanger2000 Jul 12, 2019
9ff8bc5
fixed .gradle files styles
Sanger2000 Jul 12, 2019
84bbd05
Removed outbound message from ActionHandler's fields and renamed Mark…
Sanger2000 Jul 15, 2019
ee74c6e
Fixed javadoc for Marker Interfaced
Sanger2000 Jul 15, 2019
8b6f292
Modified Comments on ActionHandler
Sanger2000 Jul 15, 2019
4e6c00e
Removed LocalAddress from Protocol
Sanger2000 Jul 15, 2019
2c3f14c
Fixed Travis Build Issues
Sanger2000 Jul 15, 2019
91b5b58
Rebased to Master and added in modified Handlers and ProbingAction
Sanger2000 Jul 16, 2019
18393ff
Fixed changes suggested by CydeWeys
Sanger2000 Jul 2, 2019
ae9980c
Added missing license headers and JavaDoc
Sanger2000 Jul 17, 2019
368e47d
Minor fix in NewChannelAction JavaDoc
Sanger2000 Jul 17, 2019
532581f
Minor Style Fix
Sanger2000 Jul 17, 2019
cd9c51c
Full WebWhoIs Sequence Added
Sanger2000 Jul 18, 2019
3f32f7b
fixed build issues
Sanger2000 Jul 18, 2019
37e32f9
Refactored by responses suggested by jianglai.
Sanger2000 Jul 26, 2019
f0e72a1
Minor Style Fixes
Sanger2000 Jul 29, 2019
62351d2
Updated build.gradle file
Sanger2000 Jul 29, 2019
54493e4
Modified license header dates
Sanger2000 Jul 29, 2019
41d6c5d
Updated WebWhois tests.
Sanger2000 Jul 29, 2019
8e589cd
Refactored WebWhois to accomodate jianglai's suggested changes and mo…
Sanger2000 Aug 1, 2019
4314613
SpotlessApply run to fix style issues
Sanger2000 Aug 1, 2019
2f38a3f
Added license header and newline where appropriate.
Sanger2000 Aug 2, 2019
2258394
Javadoc style fix in tests and removed unused methods
Sanger2000 Aug 2, 2019
f61ac5d
Refactored ProbingAction to minimize number of unnecessary methods
Sanger2000 Aug 5, 2019
32359c8
Modified tests for WebWhois according to changes suggested by laijiang.
Sanger2000 Aug 6, 2019
bd8fe96
Removed TestProvider from TestUtils.
Sanger2000 Aug 6, 2019
3395366
Rebased to Master and added in modified Handlers and ProbingAction
Sanger2000 Jul 16, 2019
f6d8a0c
Fixed changes suggested by CydeWeys
Sanger2000 Jul 2, 2019
189423e
Added missing license headers and JavaDoc
Sanger2000 Jul 17, 2019
474cbce
Minor fix in NewChannelAction JavaDoc
Sanger2000 Jul 17, 2019
9695519
Minor Style Fix
Sanger2000 Jul 17, 2019
dfc8401
Full WebWhoIs Sequence Added
Sanger2000 Jul 18, 2019
48f476b
fixed build issues
Sanger2000 Jul 18, 2019
ad39f49
Refactored by responses suggested by jianglai.
Sanger2000 Jul 26, 2019
47f8d7f
Minor Style Fixes
Sanger2000 Jul 29, 2019
ed5ed79
Updated build.gradle file
Sanger2000 Jul 29, 2019
a1dd385
Modified license header dates
Sanger2000 Jul 29, 2019
36c9ad5
Updated WebWhois tests.
Sanger2000 Jul 29, 2019
67350ed
Refactored WebWhois to accomodate jianglai's suggested changes and mo…
Sanger2000 Aug 1, 2019
48e4d53
SpotlessApply run to fix style issues
Sanger2000 Aug 1, 2019
3f5dfc0
Added license header and newline where appropriate.
Sanger2000 Aug 2, 2019
172cb19
Javadoc style fix in tests and removed unused methods
Sanger2000 Aug 2, 2019
6b1ab3d
Refactored ProbingAction to minimize number of unnecessary methods
Sanger2000 Aug 5, 2019
3312240
Modified tests for WebWhois according to changes suggested by laijiang.
Sanger2000 Aug 6, 2019
9c6235f
Removed TestProvider from TestUtils.
Sanger2000 Aug 6, 2019
1520444
Rebased to master
Sanger2000 Aug 7, 2019
498f586
Updated issues in rebasing
Sanger2000 Aug 7, 2019
2764dda
Minor style change on prober/build.gradle
Sanger2000 Aug 7, 2019
2014108
Fixed warnings for java compilation
Sanger2000 Aug 7, 2019
bbc4113
Fixed files to pass all style tests
Sanger2000 Aug 7, 2019
5d99868
Initial Commit.
Sanger2000 Jun 20, 2019
f482ab1
Deleted unfinished features. Added ActionHandler and its Unit Tests.
Sanger2000 Jun 21, 2019
5a7912b
Included prober subproject in settings.gradle
Sanger2000 Jun 21, 2019
9837fd1
Added Protocol Class and its Basic Unit Tests
Sanger2000 Jun 24, 2019
e241adb
Added Changes Suggested by jianglai
Sanger2000 Jun 28, 2019
3c2434e
Fixed Gitignore to take out AutoValue generated code
Sanger2000 Jul 1, 2019
665c4f2
Removed AutoValue java files
Sanger2000 Jul 1, 2019
9d35037
Added gitignore within prober
Sanger2000 Jul 1, 2019
c928778
Removed all generated java
Sanger2000 Jul 1, 2019
7e3e5a0
Final Changes in .gitignore
Sanger2000 Jul 1, 2019
8611222
Added Ssl and WebWhois Action Handlers and their unit tests in additi…
Sanger2000 Jul 1, 2019
d310d65
Fixed build.gradle changes requested
Sanger2000 Jul 1, 2019
36ec1f1
Removed Files irrelevant to current pull request
Sanger2000 Jul 2, 2019
715184c
Minor fixes to ActionHandler, as responded in comments, removed packa…
Sanger2000 Jul 10, 2019
6aeb55e
Fully Updated ActionHandler (missing updated JavaDoc)
Sanger2000 Jul 10, 2019
3f20384
Added changed Protocol and both Inbound and Outbound Markers
Sanger2000 Jul 10, 2019
bcfdb05
Removed AutoVaue ignore clause from .gitignore
Sanger2000 Jul 11, 2019
d1fdc03
removed unneccessary dependencies in build.gradle
Sanger2000 Jul 11, 2019
b4b64e3
Fixed Javadoc and comments for ActionHandler
Sanger2000 Jul 11, 2019
5530684
Fixed comments and JavaDoc on other files
Sanger2000 Jul 11, 2019
d8bbdc5
EOL added
Sanger2000 Jul 11, 2019
5bda338
Removed Unnecessary Files
Sanger2000 Jul 12, 2019
3b587ab
fixed .gradle files styles
Sanger2000 Jul 12, 2019
c950efe
Removed outbound message from ActionHandler's fields and renamed Mark…
Sanger2000 Jul 15, 2019
ac8f3ca
Fixed javadoc for Marker Interfaced
Sanger2000 Jul 15, 2019
1ed07fd
Modified Comments on ActionHandler
Sanger2000 Jul 15, 2019
fd5e56d
Removed LocalAddress from Protocol
Sanger2000 Jul 15, 2019
3c361ec
Fixed Travis Build Issues
Sanger2000 Jul 15, 2019
fe03464
Rebased to Master and added in modified Handlers and ProbingAction
Sanger2000 Jul 16, 2019
d20e48e
Fixed changes suggested by CydeWeys
Sanger2000 Jul 2, 2019
d219267
Added missing license headers and JavaDoc
Sanger2000 Jul 17, 2019
76ba85c
Minor fix in NewChannelAction JavaDoc
Sanger2000 Jul 17, 2019
cebfab2
Minor Style Fix
Sanger2000 Jul 17, 2019
d623715
Full WebWhoIs Sequence Added
Sanger2000 Jul 18, 2019
867a379
fixed build issues
Sanger2000 Jul 18, 2019
9d03526
Refactored by responses suggested by jianglai.
Sanger2000 Jul 26, 2019
7ca4e6f
Minor Style Fixes
Sanger2000 Jul 29, 2019
2e7bce2
Updated build.gradle file
Sanger2000 Jul 29, 2019
b426749
Modified license header dates
Sanger2000 Jul 29, 2019
6189dd2
Updated WebWhois tests.
Sanger2000 Jul 29, 2019
138f681
Refactored WebWhois to accomodate jianglai's suggested changes and mo…
Sanger2000 Aug 1, 2019
72dd6cd
SpotlessApply run to fix style issues
Sanger2000 Aug 1, 2019
73c3e71
Added license header and newline where appropriate.
Sanger2000 Aug 2, 2019
20ca1a4
Javadoc style fix in tests and removed unused methods
Sanger2000 Aug 2, 2019
379871b
Refactored ProbingAction to minimize number of unnecessary methods
Sanger2000 Aug 5, 2019
381b175
Modified tests for WebWhois according to changes suggested by laijiang.
Sanger2000 Aug 6, 2019
7eae99a
Removed TestProvider from TestUtils.
Sanger2000 Aug 6, 2019
891215a
Rebased to Master and added in modified Handlers and ProbingAction
Sanger2000 Jul 16, 2019
618be06
Fixed changes suggested by CydeWeys
Sanger2000 Jul 2, 2019
0ad9ace
Added missing license headers and JavaDoc
Sanger2000 Jul 17, 2019
dccedaa
Minor fix in NewChannelAction JavaDoc
Sanger2000 Jul 17, 2019
59ea21d
Minor Style Fix
Sanger2000 Jul 17, 2019
c3c83bb
Full WebWhoIs Sequence Added
Sanger2000 Jul 18, 2019
0569640
fixed build issues
Sanger2000 Jul 18, 2019
9e01a8b
Refactored by responses suggested by jianglai.
Sanger2000 Jul 26, 2019
2179244
Minor Style Fixes
Sanger2000 Jul 29, 2019
7778d34
Updated build.gradle file
Sanger2000 Jul 29, 2019
6c6052a
Modified license header dates
Sanger2000 Jul 29, 2019
dd523cd
Updated WebWhois tests.
Sanger2000 Jul 29, 2019
599fea0
Refactored WebWhois to accomodate jianglai's suggested changes and mo…
Sanger2000 Aug 1, 2019
665b066
SpotlessApply run to fix style issues
Sanger2000 Aug 1, 2019
a09fbc6
Added license header and newline where appropriate.
Sanger2000 Aug 2, 2019
e2931f3
Javadoc style fix in tests and removed unused methods
Sanger2000 Aug 2, 2019
a8a53a2
Refactored ProbingAction to minimize number of unnecessary methods
Sanger2000 Aug 5, 2019
dc93bf9
Modified tests for WebWhois according to changes suggested by laijiang.
Sanger2000 Aug 6, 2019
705d262
Removed TestProvider from TestUtils.
Sanger2000 Aug 6, 2019
f79d80b
Rebased to master
Sanger2000 Aug 7, 2019
c21953e
Updated issues in rebasing
Sanger2000 Aug 7, 2019
e46445a
Minor style change on prober/build.gradle
Sanger2000 Aug 7, 2019
40624f0
Fixed warnings for java compilation
Sanger2000 Aug 7, 2019
b4bfc35
Fixed files to pass all style tests
Sanger2000 Aug 7, 2019
60e5909
Minor syle fixes after succesful rebase onto master
Sanger2000 Aug 8, 2019
fe95316
Initial Commit.
Sanger2000 Jun 20, 2019
b88d1c3
Added Protocol Class and its Basic Unit Tests
Sanger2000 Jun 24, 2019
79d35fa
Fixed Gitignore to take out AutoValue generated code
Sanger2000 Jul 1, 2019
f2635d3
Final Changes in .gitignore
Sanger2000 Jul 1, 2019
b845092
Minor fixes to ActionHandler, as responded in comments, removed packa…
Sanger2000 Jul 10, 2019
961eee3
Removed AutoVaue ignore clause from .gitignore
Sanger2000 Jul 11, 2019
d3110ec
Rebased to Master and added in modified Handlers and ProbingAction
Sanger2000 Jul 16, 2019
a73ba4f
Full WebWhoIs Sequence Added
Sanger2000 Jul 18, 2019
e207975
fixed build issues
Sanger2000 Jul 18, 2019
79f1552
Refactored by responses suggested by jianglai.
Sanger2000 Jul 26, 2019
e0cb08b
Refactored WebWhois to accomodate jianglai's suggested changes and mo…
Sanger2000 Aug 1, 2019
94897b3
Added missing license headers and JavaDoc
Sanger2000 Jul 17, 2019
ffcffe8
Minor fix in NewChannelAction JavaDoc
Sanger2000 Jul 17, 2019
050e0a3
Full WebWhoIs Sequence Added
Sanger2000 Jul 18, 2019
0681030
fixed build issues
Sanger2000 Jul 18, 2019
ffcb444
Refactored by responses suggested by jianglai.
Sanger2000 Jul 26, 2019
e8a160a
Minor Style Fixes
Sanger2000 Jul 29, 2019
1b2bdca
Modified license header dates
Sanger2000 Jul 29, 2019
c6994fe
Refactored WebWhois to accomodate jianglai's suggested changes and mo…
Sanger2000 Aug 1, 2019
abc079d
SpotlessApply run to fix style issues
Sanger2000 Aug 1, 2019
75ece91
Added license header and newline where appropriate.
Sanger2000 Aug 2, 2019
3509b96
Javadoc style fix in tests and removed unused methods
Sanger2000 Aug 2, 2019
1b01803
Fixed files to pass all style tests
Sanger2000 Aug 7, 2019
ad1ddae
Rebased to Master and added in modified Handlers and ProbingAction
Sanger2000 Jul 16, 2019
2f68f4f
Fixed changes suggested by CydeWeys
Sanger2000 Jul 2, 2019
485096b
Added missing license headers and JavaDoc
Sanger2000 Jul 17, 2019
711ef15
Minor fix in NewChannelAction JavaDoc
Sanger2000 Jul 17, 2019
4ba5ed8
Minor Style Fix
Sanger2000 Jul 17, 2019
05f676c
Full WebWhoIs Sequence Added
Sanger2000 Jul 18, 2019
5551bcb
Refactored by responses suggested by jianglai.
Sanger2000 Jul 26, 2019
5801726
Minor Style Fixes
Sanger2000 Jul 29, 2019
8dc86a1
Updated build.gradle file
Sanger2000 Jul 29, 2019
57a8899
Modified license header dates
Sanger2000 Jul 29, 2019
ee69184
Updated WebWhois tests.
Sanger2000 Jul 29, 2019
9cae7e7
Refactored WebWhois to accomodate jianglai's suggested changes and mo…
Sanger2000 Aug 1, 2019
f899771
SpotlessApply run to fix style issues
Sanger2000 Aug 1, 2019
44a2dc9
Added license header and newline where appropriate.
Sanger2000 Aug 2, 2019
8fa0b5f
Javadoc style fix in tests and removed unused methods
Sanger2000 Aug 2, 2019
1b046a4
Refactored ProbingAction to minimize number of unnecessary methods
Sanger2000 Aug 5, 2019
53b6a7f
Modified tests for WebWhois according to changes suggested by laijiang.
Sanger2000 Aug 6, 2019
f93afbf
Removed TestProvider from TestUtils.
Sanger2000 Aug 6, 2019
0a4fbc5
Rebased to Master and added in modified Handlers and ProbingAction
Sanger2000 Jul 16, 2019
199137e
Fixed changes suggested by CydeWeys
Sanger2000 Jul 2, 2019
2c1d005
Added missing license headers and JavaDoc
Sanger2000 Jul 17, 2019
8d894f9
Minor fix in NewChannelAction JavaDoc
Sanger2000 Jul 17, 2019
984d0ea
Minor Style Fix
Sanger2000 Jul 17, 2019
bf465f2
Full WebWhoIs Sequence Added
Sanger2000 Jul 18, 2019
d95faac
fixed build issues
Sanger2000 Jul 18, 2019
17b826d
Refactored by responses suggested by jianglai.
Sanger2000 Jul 26, 2019
58bbfa5
Minor Style Fixes
Sanger2000 Jul 29, 2019
b4a5830
Updated build.gradle file
Sanger2000 Jul 29, 2019
b5db355
Modified license header dates
Sanger2000 Jul 29, 2019
23bd04e
Updated WebWhois tests.
Sanger2000 Jul 29, 2019
634a4b9
Added license header and newline where appropriate.
Sanger2000 Aug 2, 2019
770463b
Javadoc style fix in tests and removed unused methods
Sanger2000 Aug 2, 2019
0c026d8
Refactored ProbingAction to minimize number of unnecessary methods
Sanger2000 Aug 5, 2019
ddf0dae
Modified tests for WebWhois according to changes suggested by laijiang.
Sanger2000 Aug 6, 2019
92e8571
Removed TestProvider from TestUtils.
Sanger2000 Aug 6, 2019
e1644ba
Rebased to master
Sanger2000 Aug 7, 2019
be30cbc
Updated issues in rebasing
Sanger2000 Aug 7, 2019
4d43c9a
Added circular linked list to utils
Sanger2000 Aug 2, 2019
3f80cb3
License Header added
Sanger2000 Aug 2, 2019
afc60c8
Refactored probing sequence to be circular linked list iterator
Sanger2000 Aug 2, 2019
9f2405d
Modified ProbingStep tests to reflect new ProbingStep structure.
Sanger2000 Aug 2, 2019
cd1ee7d
ProbingStepTest modified to have fewer unnecessary helper methods
Sanger2000 Aug 7, 2019
dcce22e
Added circular linked list to utils
Sanger2000 Aug 2, 2019
887d596
License Header added
Sanger2000 Aug 2, 2019
53a8d77
Added circular linked list to utils
Sanger2000 Aug 2, 2019
9d882c5
License Header added
Sanger2000 Aug 2, 2019
e5fcd0d
Refactored probing sequence to be circular linked list iterator
Sanger2000 Aug 2, 2019
0f973a6
Modified ProbingStep tests to reflect new ProbingStep structure.
Sanger2000 Aug 2, 2019
f29bd67
Added missing license header to DefaultCircularLinkedListIterator
Sanger2000 Aug 7, 2019
8ac3d02
Fixed max column length to be 100
Sanger2000 Aug 7, 2019
39f2f08
Rebased to Master and added in modified Handlers and ProbingAction
Sanger2000 Jul 16, 2019
8b8aff0
Fixed changes suggested by CydeWeys
Sanger2000 Jul 2, 2019
a359887
Added missing license headers and JavaDoc
Sanger2000 Jul 17, 2019
da40cb7
Minor fix in NewChannelAction JavaDoc
Sanger2000 Jul 17, 2019
e1b6a02
Minor Style Fix
Sanger2000 Jul 17, 2019
7eb4e4a
Full WebWhoIs Sequence Added
Sanger2000 Jul 18, 2019
198b17e
fixed build issues
Sanger2000 Jul 18, 2019
8762baa
Refactored by responses suggested by jianglai.
Sanger2000 Jul 26, 2019
bc54d3c
Updated build.gradle file
Sanger2000 Jul 29, 2019
e564292
Modified license header dates
Sanger2000 Jul 29, 2019
be4bbc6
Updated WebWhois tests.
Sanger2000 Jul 29, 2019
77ea13a
Refactored WebWhois to accomodate jianglai's suggested changes and mo…
Sanger2000 Aug 1, 2019
d44fe23
Javadoc style fix in tests and removed unused methods
Sanger2000 Aug 2, 2019
e2ae27c
Refactored ProbingAction to minimize number of unnecessary methods
Sanger2000 Aug 5, 2019
b7e7bda
Modified tests for WebWhois according to changes suggested by laijiang.
Sanger2000 Aug 6, 2019
6917e08
Rebased to Master and added in modified Handlers and ProbingAction
Sanger2000 Jul 16, 2019
d9165af
Fixed changes suggested by CydeWeys
Sanger2000 Jul 2, 2019
d9b225f
Added missing license headers and JavaDoc
Sanger2000 Jul 17, 2019
6deeaa0
Minor fix in NewChannelAction JavaDoc
Sanger2000 Jul 17, 2019
c41a60e
Minor Style Fix
Sanger2000 Jul 17, 2019
4ebefa1
Full WebWhoIs Sequence Added
Sanger2000 Jul 18, 2019
457d126
fixed build issues
Sanger2000 Jul 18, 2019
411407c
Refactored by responses suggested by jianglai.
Sanger2000 Jul 26, 2019
a520808
Minor Style Fixes
Sanger2000 Jul 29, 2019
280a648
Updated build.gradle file
Sanger2000 Jul 29, 2019
a2788bc
Modified license header dates
Sanger2000 Jul 29, 2019
a1efc6f
Updated WebWhois tests.
Sanger2000 Jul 29, 2019
390c951
Refactored WebWhois to accomodate jianglai's suggested changes and mo…
Sanger2000 Aug 1, 2019
49d6d61
SpotlessApply run to fix style issues
Sanger2000 Aug 1, 2019
a323bfa
Added license header and newline where appropriate.
Sanger2000 Aug 2, 2019
d9bca34
Javadoc style fix in tests and removed unused methods
Sanger2000 Aug 2, 2019
2753291
Refactored ProbingAction to minimize number of unnecessary methods
Sanger2000 Aug 5, 2019
dd3c764
Modified tests for WebWhois according to changes suggested by laijiang.
Sanger2000 Aug 6, 2019
7caf909
Removed TestProvider from TestUtils.
Sanger2000 Aug 6, 2019
5274a99
Updated issues in rebasing
Sanger2000 Aug 7, 2019
1a8aa8e
Added circular linked list to utils
Sanger2000 Aug 2, 2019
3cf9fb6
License Header added
Sanger2000 Aug 2, 2019
6ee1113
Refactored probing sequence to be circular linked list iterator
Sanger2000 Aug 2, 2019
20b1d17
ProbingStepTest modified to have fewer unnecessary helper methods
Sanger2000 Aug 7, 2019
116af1b
Added circular linked list to utils
Sanger2000 Aug 2, 2019
ecfd5ea
License Header added
Sanger2000 Aug 2, 2019
2e0fce2
Refactored probing sequence to be circular linked list iterator
Sanger2000 Aug 2, 2019
cd99c80
Fixed max column length to be 100
Sanger2000 Aug 7, 2019
c7af351
Minor changes to pass style tests
Sanger2000 Aug 7, 2019
c9f1a9b
Successful rebase onto finished web-whois branch
Sanger2000 Aug 8, 2019
b94c4c1
Removed need for TestTokens with Mockito mocks of Tokens
Sanger2000 Aug 8, 2019
58a0c18
Fixed style issues in DefaultCircularLinkedListIterator and AbstractC…
Sanger2000 Aug 8, 2019
6f39743
Modified CircularList according to changes suggested by jianglai.
Sanger2000 Aug 9, 2019
861a111
Merge branch 'master' into prober-circular-list
Sanger2000 Aug 9, 2019
3d2e736
Modified ProbingSequenceTest to not expect unnecessary NullPointerExc…
Sanger2000 Aug 9, 2019
c6361d2
ProbingSequence and tests modified to reflect addition of Unrecoverab…
Sanger2000 Aug 12, 2019
1309bcd
Modified ProbingSequence and its tests to reflect action generation a…
Sanger2000 Aug 12, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -14,14 +14,22 @@

package google.registry.monitoring.blackbox;

import com.google.common.flogger.FluentLogger;
import google.registry.monitoring.blackbox.exceptions.UndeterminedStateException;
import google.registry.monitoring.blackbox.tokens.Token;
import google.registry.util.AbstractCircularLinkedListIterator;
import io.netty.bootstrap.Bootstrap;
import io.netty.channel.AbstractChannel;
import io.netty.channel.ChannelFuture;
import io.netty.channel.EventLoopGroup;

/**
* Represents Sequence of {@link ProbingStep}s that the Prober performs in order.
*
* <p>Inherits from {@link AbstractCircularLinkedListIterator}</p>, with element type of
* {@link ProbingStep} as the manner in which the sequence is carried out is analogous to the {@link
* AbstractCircularLinkedListIterator}
*
*
* <p>Created with {@link Builder} where we specify {@link EventLoopGroup}, {@link AbstractChannel}
* class type, then sequentially add in the {@link ProbingStep.Builder}s in order and mark which one
Expand All @@ -31,78 +39,146 @@
* the first one is activated with the requisite {@link Token}, the {@link ProbingStep}s do the rest
* of the work.</p>
*/
public class ProbingSequence {
public class ProbingSequence extends AbstractCircularLinkedListIterator<ProbingStep> {

private ProbingStep firstStep;
private static final FluentLogger logger = FluentLogger.forEnclosingClass();

/**
* Each {@link ProbingSequence} requires a start token to begin running.
*/
private Token startToken;

private ProbingSequence(ProbingStep firstStep, Token startToken) {
this.firstStep = firstStep;
private ProbingSequence(Entry<ProbingStep> first, Entry<ProbingStep> last, Token startToken) {
super(first, last);
this.startToken = startToken;
}

/**
* Starts ProbingSequence by calling first {@code runStep} with {@code startToken}.
*/
public void start() {
// calls the first step with startToken;
firstStep.accept(startToken);
runStep(startToken);
}

/**
* Generates new {@link ProbingAction} from {@link ProbingStep}, calls the action, then retrieves
* the result of the action.
*
* @param token - used to generate the {@link ProbingAction} by calling {@code
* get().generateAction}.
*
* <p>Moves on to next {@link ProbingStep} in the iterator and changes the {@link Token}
* to the next one if the previous step was the last one in the loop.</p>
*
* <p>If unable to generate the action, or the calling the action results in an immediate error,
* we note an error. Otherwise, if the future marked as finished when the action is completed is
* marked as a success, we note a success. Otherwise, if the cause of failure will either be a
* failure or error. </p>
*/
private void runStep(Token token) {
Token finalToken;
if (get() == getLast()) {
finalToken = token.next();
} else {
finalToken = token;
}

//Calls next runStep
next();

ProbingAction currentAction;
//attempt to generate new action. On error, move on to next step
try {
currentAction = get().generateAction(finalToken);
} catch (UndeterminedStateException e) {
logger.atWarning().withCause(e).log("Error in Action Generation");
runStep(finalToken);
return;
}

ChannelFuture future;
try {
//call the generated action
future = currentAction.call();
} catch (Exception e) {
//On error in calling action, log error and note an error
logger.atWarning().withCause(e).log("Error in Action Performed");

//Calls next runStep
runStep(finalToken);
return;
}

future.addListener(f -> {
if (f.isSuccess()) {
//On a successful result, we log as a successful step, and not a success
logger.atInfo().log(String.format("Successfully completed Probing Step: %s", this));

} else {
//On a failed result, we log the failure and note either a failure or error
logger.atSevere().withCause(f.cause()).log("Did not result in future success");
}

if (get().protocol().persistentConnection()) {
//If the connection is persistent, we store the channel in the token

finalToken.setChannel(currentAction.channel());
}

//Calls next runStep
runStep(finalToken);


});
}

/**
* Turns {@link ProbingStep.Builder}s into fully self-dependent sequence with supplied {@link
* Bootstrap}.
*/
public static class Builder {
public static class Builder extends AbstractCircularLinkedListIterator.Builder<ProbingStep,
Builder, ProbingSequence> {

private ProbingStep currentStep;
private ProbingStep firstStep;
private ProbingStep firstRepeatedStep;
private Entry<ProbingStep> firstRepeatedStepEntry;

private Token startToken;

/**
* This Builder must also be supplied with a {@link Token} to construct a {@link
* ProbingSequence}.
*/
public Builder(Token startToken) {
this.startToken = startToken;
}

/**
* Adds {@link ProbingStep}, which is supplied with {@link Bootstrap}, built, and pointed to by
* the previous {@link ProbingStep} added.
* We take special note of the first repeated step.
*/
public Builder addStep(ProbingStep step) {

if (currentStep == null) {
firstStep = step;
} else {
currentStep.nextStep(step);
}

currentStep = step;
public Builder markFirstRepeated() {
firstRepeatedStepEntry = current;
return this;
}

/**
* We take special note of the first repeated step.
* Returns this builder as childBuilder.
*/
public Builder markFirstRepeated() {
firstRepeatedStep = currentStep;
@Override
public Builder childBuilder() {
return this;
}

/**
* Points last {@link ProbingStep} to the {@code firstRepeatedStep} and calls private
* constructor to create {@link ProbingSequence}.
*/
@Override
public ProbingSequence build() {
if (firstRepeatedStep == null) {
firstRepeatedStep = firstStep;
if (firstRepeatedStepEntry == null) {
firstRepeatedStepEntry = first;
}

currentStep.nextStep(firstRepeatedStep);
currentStep.lastStep();
return new ProbingSequence(this.firstStep, this.startToken);
current.setNext(firstRepeatedStepEntry);
return new ProbingSequence(first, current, startToken);
}
}
}

Expand Up @@ -15,13 +15,10 @@
package google.registry.monitoring.blackbox;

import com.google.auto.value.AutoValue;
import com.google.common.flogger.FluentLogger;
import google.registry.monitoring.blackbox.exceptions.UndeterminedStateException;
import google.registry.monitoring.blackbox.messages.OutboundMessageType;
import google.registry.monitoring.blackbox.tokens.Token;
import io.netty.bootstrap.Bootstrap;
import io.netty.channel.ChannelFuture;
import java.util.function.Consumer;
import org.joda.time.Duration;

/**
Expand All @@ -34,15 +31,7 @@
* Token} and from that, generates a new {@link ProbingAction} to call.</p>
*/
@AutoValue
public abstract class ProbingStep implements Consumer<Token> {

private static final FluentLogger logger = FluentLogger.forEnclosingClass();

/**
* Necessary boolean to inform when to obtain next {@link Token}
*/
protected boolean isLastStep = false;
private ProbingStep nextStep;
public abstract class ProbingStep {

public static Builder builder() {
return new AutoValue_ProbingStep.Builder();
Expand All @@ -69,22 +58,10 @@ public static Builder builder() {
*/
abstract Bootstrap bootstrap();

void lastStep() {
isLastStep = true;
}

void nextStep(ProbingStep step) {
this.nextStep = step;
}

ProbingStep nextStep() {
return this.nextStep;
}

/**
* Generates a new {@link ProbingAction} from {@code token} modified {@link OutboundMessageType}
*/
private ProbingAction generateAction(Token token) throws UndeterminedStateException {
public ProbingAction generateAction(Token token) throws UndeterminedStateException {
OutboundMessageType message = token.modifyMessage(messageTemplate());
ProbingAction.Builder probingActionBuilder = ProbingAction.builder()
.setDelay(duration())
Expand All @@ -101,71 +78,6 @@ private ProbingAction generateAction(Token token) throws UndeterminedStateExcept
return probingActionBuilder.build();
}

/**
* On the last step, gets the next {@link Token}. Otherwise, uses the same one.
*/
private Token generateNextToken(Token token) {
return isLastStep ? token.next() : token;
}

/**
* Generates new {@link ProbingAction}, calls the action, then retrieves the result of the
* action.
*
* @param token - used to generate the {@link ProbingAction} by calling {@code generateAction}.
*
* <p>If unable to generate the action, or the calling the action results in an immediate error,
* we note an error. Otherwise, if the future marked as finished when the action is completed is
* marked as a success, we note a success. Otherwise, if the cause of failure will either be a
* failure or error. </p>
*/
@Override
public void accept(Token token) {
ProbingAction currentAction;
//attempt to generate new action. On error, move on to next step
try {
currentAction = generateAction(token);
} catch (UndeterminedStateException e) {
logger.atWarning().withCause(e).log("Error in Action Generation");
nextStep.accept(generateNextToken(token));
return;
}

ChannelFuture future;
try {
//call the generated action
future = currentAction.call();
} catch (Exception e) {
//On error in calling action, log error and note an error
logger.atWarning().withCause(e).log("Error in Action Performed");

//Move on to next step in ProbingSequence
nextStep.accept(generateNextToken(token));
return;
}

future.addListener(f -> {
if (f.isSuccess()) {
//On a successful result, we log as a successful step, and not a success
logger.atInfo().log(String.format("Successfully completed Probing Step: %s", this));

} else {
//On a failed result, we log the failure and note either a failure or error
logger.atSevere().withCause(f.cause()).log("Did not result in future success");
}

if (protocol().persistentConnection()) {
//If the connection is persistent, we store the channel in the token
token.setChannel(currentAction.channel());
}

//Move on the the next step in the ProbingSequence
nextStep.accept(generateNextToken(token));


});
}

@Override
public final String toString() {
return String.format("ProbingStep with Protocol: %s\n"
Expand All @@ -174,9 +86,7 @@ public final String toString() {
messageTemplate().getClass().getName());
}

/**
* Default {@link AutoValue.Builder} for {@link ProbingStep}.
*/
/** Standard {@link AutoValue.Builder} for {@link ProbingStep}. */
@AutoValue.Builder
public abstract static class Builder {

Expand All @@ -193,4 +103,3 @@ public abstract static class Builder {

}


Expand Up @@ -23,6 +23,7 @@
import google.registry.monitoring.blackbox.handlers.WebWhoisMessageHandler;
import google.registry.monitoring.blackbox.messages.HttpRequestMessage;
import google.registry.monitoring.blackbox.tokens.WebWhoisToken;
import google.registry.util.DefaultCircularLinkedListIterator;
import io.netty.bootstrap.Bootstrap;
import io.netty.channel.Channel;
import io.netty.channel.ChannelHandler;
Expand All @@ -31,6 +32,7 @@
import io.netty.handler.codec.http.HttpClientCodec;
import io.netty.handler.codec.http.HttpObjectAggregator;
import io.netty.handler.ssl.SslProvider;
import java.util.Iterator;
import javax.inject.Provider;
import javax.inject.Qualifier;
import javax.inject.Singleton;
Expand Down Expand Up @@ -121,7 +123,6 @@ static ImmutableList<Provider<? extends ChannelHandler>> providerHttpWhoisHandle
messageHandlerProvider,
webWhoisActionHandlerProvider);
}

/**
* {@link Provides} the list of providers of {@link ChannelHandler}s that are used for https
* protocol.
Expand Down Expand Up @@ -188,7 +189,7 @@ ProbingSequence provideWebWhoisSequence(
WebWhoisToken webWhoisToken) {

return new ProbingSequence.Builder(webWhoisToken)
.addStep(probingStep)
.addElement(probingStep)
.build();
}

Expand All @@ -204,8 +205,10 @@ int provideMaximumMessageLengthBytes() {
@Singleton
@Provides
@WebWhoisProtocol
ImmutableList<String> provideTopLevelDomains() {
return ImmutableList.of("how", "soy", "xn--q9jyb4c");
Iterator<String> provideTopLevelDomains() {
return new DefaultCircularLinkedListIterator.Builder<String>()
.addElements("how", "soy", "xn--q9jyb4c")
.build();
}

@Provides
Expand Down Expand Up @@ -243,6 +246,5 @@ int provideHttpsWhoisPort() {
public @interface WebWhoisProtocol {

}


}