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

Finer priority management for interceptors #1574

Closed
gdrouet opened this issue Apr 30, 2014 · 2 comments
Closed

Finer priority management for interceptors #1574

gdrouet opened this issue Apr 30, 2014 · 2 comments

Comments

@gdrouet
Copy link
Member

gdrouet commented Apr 30, 2014

Currently we can configure Atmosphere to execute two interceptors before/after the defaults but we can't change the order between them.

@gdrouet
Copy link
Member Author

gdrouet commented May 1, 2014

@jfarcand I just draft a possible refactoring for invocation order. The idea is to make possible to specify the order of invocation between two interceptors that are configured to be executed after default or before default interceptors.

This draft also gives the possibility to simplify AtmosphereFramework class:

  • manage only one list of interceptors well ordered (default + non default)
  • hide the ordering in the Priority class

This approach also introduces new rules:

  • An InvocationOrder IS-A AtmosphereInterceptor
  • Any default AtmosphereInterceptor IS-A InvocationOrder

Take a look at the code and tell me if I'm going in the wrong way. Will continue if you're agree with this.

@gdrouet
Copy link
Member Author

gdrouet commented May 2, 2014

Well, by using meta services provided in #1573, I can order additional interceptors as required. I won't work on it while it is YAGNI. Even if it could be a good internal enhancement, it doesn't bring additional value for the user for now. There is a big challenge to not break anything, we should work on it only if we really need it!

@gdrouet gdrouet closed this as completed May 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant