Comment #5 on issue 524 by sberlin: Extension introspection API
http://code.google.com/p/google-guice/issues/detail?id=524
Another variation on how servlet can expose its bindings.
guice-extension-spi.txt would still be applied, but this time the
ServletModuleTargetVisitor looks like:
V visit(LinkedFilterBinding)
V visit(InstanceFilterBinding)
V visit(LinkedServletBinding)
V visit(InstanceServletBinding)
more in the spirit of the other visitor interfaces. Each binding interface
has:
boolean isRegex
String getPattern
Map<String, String> getContextParams
and also one of:
Filter getFilterInstance,
HttpServlet getServletInstance,
Key<? extends Filter> getLinkedKey,
or Key<? extends HttpServlet> getLinkedKey
I like this variation slightly better, despite the increase in interfaces,
because it's more suited to growth in the future (if the extension wants to
add any more options to its bindings), and the visitor interface is much
simpler. I was thinking of also adding a parent interface
ServletModuleBinding that contained the three shared methods, but didn't
see much use in it now, so didn't do it.
Attachments:
servlet-extension-spi2.txt 57.3 KB
--
You received this message because you are subscribed to the Google Groups
"google-guice-dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-guice-dev?hl=en.