I have a trouble with subclassing class that extends ... . The problem
is - I don't know how to add more "serve" bindings in the subclass.
For example
public class GuiceServletConfig extends GuiceServletContextListener {
private static final Logger LOG =
Logger.getLogger(GuiceServletConfig.class.getName());
@Override
protected Injector getInjector() {
ServletModule servletModule = new ServletModule() {
@Override
protected void configureServlets() {
serveRegex("\\/_wave/.*").with(ForumBotty.class);
serve("/admin/jsonrpc").with(JsonRpcProcessor.class);
serve("/send_email_updates").with(SendEmailUpdates.class);
serve("/send_wave_updates").with(SendWaveUpdates.class);
serve("/
add_participants_task").with(AddParticipantsTask.class);
serve("/feeds/
get_tag_counts").with(GetTagCounts.class);
serve("/feeds/get_post_counts").with(GetPostCounts.class);
serve("/feeds/get_forum_posts").with(GetForumPosts.class);
serve("/feeds/get_latest_digest").with(GetLatestDigest.class);
serve("/feeds/json").with(JsonGenerator.class);
serve("/feeds/atom").with(AtomGenerator.class);
serve("/info").with(InfoServlet.class); //TODO remove
//serve("/migrateTags").with(MigrateTags.class);
//serve("/migrateTagsTask").with(MigrateTagsTask.class);
}
};
// more stuff
return Guice.createInjector(servletModule, businessModule);
}
Now, I have a class
public class AggfiGuiceServiceConfig extends GuiceServletConfig{
//
}
--
You received this message because you are subscribed to the Google Groups
"google-guice" 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?hl=en.