quantranhong1999 commented on code in PR #3059:
URL: https://github.com/apache/james-project/pull/3059#discussion_r3420129363
##########
server/container/guice/protocols/imap/src/main/java/org/apache/james/modules/protocols/ImapDefaultSaslMechanismFactories.java:
##########
@@ -17,12 +17,15 @@
* under the License. *
****************************************************************/
-package org.apache.james.utils;
+package org.apache.james.modules.protocols;
-import org.apache.james.protocols.api.sasl.SaslMechanism;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
-public interface SaslMechanismInstantiator {
- Class<? extends SaslMechanism> locate(ClassName className) throws
ClassNotFoundException;
+import java.lang.annotation.Retention;
- SaslMechanism instantiate(ClassName className) throws
ClassNotFoundException;
+import com.google.inject.BindingAnnotation;
+
+@BindingAnnotation
+@Retention(RUNTIME)
+public @interface ImapDefaultSaslMechanismFactories {
Review Comment:
Yes, it is an alternative to `@Named`, but more strongly typed.
The idea is to allow a community extended IMAP server that relies on custom
IMAP packages to define their own default SASL(s).
Example for TMail adoption:
https://github.com/linagora/tmail-backend/pull/2438/changes/70442e1814882ca0286f2c8bdc06dae6fb9db1db#diff-eaea009076d7697f8f5a888b5793fb33e5b2fefc08d2773bfd88f7c5ddd8eef5
If you prefer `@Named`, I can switch it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]