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

Inject dependencies into interceptors #88

Closed
gissuebot opened this issue Jul 7, 2014 · 8 comments
Closed

Inject dependencies into interceptors #88

gissuebot opened this issue Jul 7, 2014 · 8 comments

Comments

@gissuebot
Copy link

From crazyboblee on April 10, 2007 00:55:39

Just like every other instance.

Original issue: http://code.google.com/p/google-guice/issues/detail?id=88

@gissuebot
Copy link
Author

From brian.mccallister on April 10, 2007 23:58:05

Yea!

@gissuebot
Copy link
Author

From kevinb9n on April 20, 2007 07:52:39

I assume you are referring specifically to struts2?  Does this also including making
the interceptors request-scoped?

Labels: -Type-Defect Type-Enhancement

@gissuebot
Copy link
Author

From kevinb9n on April 20, 2007 07:59:49

Ohhh.  You mean method interceptors.  Never mind.

@gissuebot
Copy link
Author

@gissuebot
Copy link
Author

From limpbizkit on June 01, 2008 12:48:32

This can be done once issue 202 has been implemented. That feature request adds this API:
  Binder.requestInjection(Object)

We might also want to bind interceptors using Keys rather than instances:
  void bindInterceptor(Matcher<? super Class<?>> classMatcher,
      Matcher<? super Method> methodMatcher, Key<? extends MethodInterceptor> methodInterceptorKey);

That way the interceptor is fully in-the-club. Since equivalent functionality can already be accomplished via
requestInjection(), I'm deprioritizing this.

Labels: -Priority-Medium Priority-Low

@gissuebot
Copy link
Author

From andres.a.testi on December 17, 2008 06:01:18

Interceptor binding by key would be useful for allowing method interception in Google
GIN.
Would you upgrade the priority?
Regards.

@gissuebot
Copy link
Author

From nzjess on November 20, 2009 20:43:30

Also the use of Binder.requestInjection(Object) precludes constructor injection of interceptor instances :(

@gissuebot
Copy link
Author

From sberlin on February 19, 2011 12:30:48

Constructor injection can be mimicked using code at https://code.google.com/p/google-guice/wiki/AOP#Injecting_Interceptors . (Essentially, use Binder.getProvider(..) and pass to the interceptor's constructor.)

Status: WontFix

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