/*
 * Copyright 2018 Crown Copyright
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package stroom.servlet;

import com.google.inject.AbstractModule;
import stroom.task.api.TaskHandlerBinder;

public class ServletModule extends AbstractModule {
    @Override
    protected void configure() {
        TaskHandlerBinder.create(binder())
                .bind(SessionListAction.class, SessionListHandler.class)
                .bind(SessionListClusterTask.class, SessionListClusterHandler.class);
    }
    //    @Bean
//    @Scope(StroomScope.PROTOTYPE)
//    public DashboardServlet dashboardServlet(final PropertyService propertyService) {
//        return new DashboardServlet(propertyService);
//    }
//
//    @Bean
//    public DebugServlet debugServlet() {
//        return new DebugServlet();
//    }
//
//    @Bean
//    public DynamicCSSServlet dynamicCSSServlet(final PropertyService propertyService) {
//        return new DynamicCSSServlet(propertyService);
//    }
//
//    @Bean
//    public EchoServlet echoServlet() {
//        return new EchoServlet();
//    }
//
//    @Bean
//    public ExportConfigServlet exportConfigServlet(final ImportExportService importExportService,
//                                                   @Named("resourceStore") final ResourceStore resourceStore,
//                                                   final PropertyService propertyService) {
//        return new ExportConfigServlet(importExportService, resourceStore, propertyService);
//    }
//
//    @Bean
//    public HttpServletRequestFilter httpServletRequestFilter(final HttpServletRequestHolder httpServletRequestHolder) {
//        return new HttpServletRequestFilter(httpServletRequestHolder);
//    }
//
//    @Bean
//    public HttpServletRequestHolder httpServletRequestHolder() {
//        return new HttpServletRequestHolderImpl();
//    }
//
//    @Bean
//    public ImportFileServlet importFileServlet(final ResourceStore resourceStore,
//                                               final StreamEventLog streamEventLog) {
//        return new ImportFileServlet(resourceStore, streamEventLog);
//    }
//
//    @Bean
//    @Scope(value = StroomScope.TASK)
//    public SessionListHandler sessionListHandler(final ClusterDispatchAsyncHelper dispatchHelper) {
//        return new SessionListHandler(dispatchHelper);
//    }
//
//    @Bean
//    public SessionListListener sessionListListener(final StroomBeanStore stroomBeanStore) {
//        return new SessionListListener(stroomBeanStore);
//    }
//
//    @Bean
//    @Scope(StroomScope.PROTOTYPE)
//    public SessionListServlet sessionListServlet(final TaskManager taskManager) {
//        return new SessionListServletImpl(taskManager);
//    }
//
//    @Bean(StatusServletImpl.BEAN_NAME)
//    public StatusServlet statusServlet(final NodeService nodeService,
//                                       final ClientPropertiesService clientPropertiesService,
//                                       final VolumeService volumeService,
//                                       final SecurityContext securityContext) {
//        return new StatusServletImpl(nodeService, clientPropertiesService, volumeService, securityContext);
//    }
//
//    @Bean
//    @Scope(StroomScope.PROTOTYPE)
//    public StroomServlet stroomServlet(final PropertyService propertyService) {
//        return new StroomServlet(propertyService);
//    }
}
@@ -801,16 +801,87 @@
 ure() %7B%0A
+        bind(SessionListService.class).to(SessionListListener.class);%0A%0A
         
@@ -915,16 +915,16 @@
 nder())%0A
-
         
@@ -1084,2913 +1084,5 @@
   %7D%0A
-    //    @Bean%0A//    @Scope(StroomScope.PROTOTYPE)%0A//    public DashboardServlet dashboardServlet(final PropertyService propertyService) %7B%0A//        return new DashboardServlet(propertyService);%0A//    %7D%0A//%0A//    @Bean%0A//    public DebugServlet debugServlet() %7B%0A//        return new DebugServlet();%0A//    %7D%0A//%0A//    @Bean%0A//    public DynamicCSSServlet dynamicCSSServlet(final PropertyService propertyService) %7B%0A//        return new DynamicCSSServlet(propertyService);%0A//    %7D%0A//%0A//    @Bean%0A//    public EchoServlet echoServlet() %7B%0A//        return new EchoServlet();%0A//    %7D%0A//%0A//    @Bean%0A//    public ExportConfigServlet exportConfigServlet(final ImportExportService importExportService,%0A//                                                   @Named(%22resourceStore%22) final ResourceStore resourceStore,%0A//                                                   final PropertyService propertyService) %7B%0A//        return new ExportConfigServlet(importExportService, resourceStore, propertyService);%0A//    %7D%0A//%0A//    @Bean%0A//    public HttpServletRequestFilter httpServletRequestFilter(final HttpServletRequestHolder httpServletRequestHolder) %7B%0A//        return new HttpServletRequestFilter(httpServletRequestHolder);%0A//    %7D%0A//%0A//    @Bean%0A//    public HttpServletRequestHolder httpServletRequestHolder() %7B%0A//        return new HttpServletRequestHolderImpl();%0A//    %7D%0A//%0A//    @Bean%0A//    public ImportFileServlet importFileServlet(final ResourceStore resourceStore,%0A//                                               final StreamEventLog streamEventLog) %7B%0A//        return new ImportFileServlet(resourceStore, streamEventLog);%0A//    %7D%0A//%0A//    @Bean%0A//    @Scope(value = StroomScope.TASK)%0A//    public SessionListHandler sessionListHandler(final ClusterDispatchAsyncHelper dispatchHelper) %7B%0A//        return new SessionListHandler(dispatchHelper);%0A//    %7D%0A//%0A//    @Bean%0A//    public SessionListListener sessionListListener(final StroomBeanStore stroomBeanStore) %7B%0A//        return new SessionListListener(stroomBeanStore);%0A//    %7D%0A//%0A//    @Bean%0A//    @Scope(StroomScope.PROTOTYPE)%0A//    public SessionListServlet sessionListServlet(final TaskManager taskManager) %7B%0A//        return new SessionListServletImpl(taskManager);%0A//    %7D%0A//%0A//    @Bean(StatusServletImpl.BEAN_NAME)%0A//    public StatusServlet statusServlet(final NodeService nodeService,%0A//                                       final ClientPropertiesService clientPropertiesService,%0A//                                       final VolumeService volumeService,%0A//                                       final SecurityContext securityContext) %7B%0A//        return new StatusServletImpl(nodeService, clientPropertiesService, volumeService, securityContext);%0A//    %7D%0A//%0A//    @Bean%0A//    @Scope(StroomScope.PROTOTYPE)%0A//    public StroomServlet stroomServlet(final PropertyService propertyService) %7B%0A//        return new StroomServlet(propertyService);%0A//    %7D%0A
 %7D

Remove StroomBeanStore