Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HiveWeb/App_Code/HiveServerModule.cs @ 4791

Last change on this file since 4791 was 4791, checked in by cneumuel, 13 years ago

#1260

  • lifecyclemanager discovers available plugins automatically
File size: 923 bytes
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Web;
6using System.Threading;
7using HeuristicLab.Tracing;
8using System.IO;
9using HeuristicLab.Hive.Contracts.Interfaces;
10using HeuristicLab.PluginInfrastructure;
11using HeuristicLab.PluginInfrastructure.Manager;
12
13namespace HeuristicLab.Hive.Server.Core.IISModules {
14  public class HiveServerModule : IHttpModule {
15    private static object locker = new object();
16    private static ILifecycleManager lifecycleManager;
17    private static PluginManager pm;
18
19    public void Init(HttpApplication context) {
20      lock (locker) {
21        if (lifecycleManager == null) {
22          lifecycleManager = ServiceLocator.GetLifecycleManager();
23        }
24      }
25    }
26
27    public void Dispose() {
28      lock (locker) {
29        if(lifecycleManager != null) lifecycleManager.Stop();
30      }
31    }
32  }
33}
Note: See TracBrowser for help on using the repository browser.