-
Notifications
You must be signed in to change notification settings - Fork 584
Update AutorecoveringConnection to call ShutdownListeners before reco… #136
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
Conversation
this.delegate.addShutdownListener(sh); | ||
} | ||
//Add the auto recovering listener to the new delegate. | ||
addAutomaticRecoveryListener(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find it non-obvious how the (user-provided) hooks are recovered.
I need to think if I'm 100% happy with this particular implementation of the idea in #135. |
@michaelklishin I'd probably say "no not happy" I've worked on a more clear, and probably more importantly, more consistent implementation of calling the user hooks. |
@doswell thank you. One idea I had is simply subclassing Alternatively we could use annotations but then I'm afraid this cannot be backported into |
I didn't see a need for the subclassing in terms of the shutdown listeners just notifying that a disconnect occurs. ie, keeping separate from #132. But I think the idea of subclassing may be useful for #132 in terms of having a RecoveryStartedListener / RecoveryCompletedListener which can register on the RecoveryListeners without needing API changes. |
Add RecoverableConnection to allow easier use of API.
…nnecting.
Re; #135