aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/AssetServer/Main.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-02-04 16:22:58 +0000
committerJustin Clarke Casey2008-02-04 16:22:58 +0000
commita1c9349d4765833691e7816d7f4df7bd37b9ee36 (patch)
tree2e108496bc6761f6ed1ec671a97bf6b4ba5e6137 /OpenSim/Grid/AssetServer/Main.cs
parent* Added note in CONTRIBUTORS.txt for _someone/mikkopa - RealXtend (diff)
downloadopensim-SC-a1c9349d4765833691e7816d7f4df7bd37b9ee36.zip
opensim-SC-a1c9349d4765833691e7816d7f4df7bd37b9ee36.tar.gz
opensim-SC-a1c9349d4765833691e7816d7f4df7bd37b9ee36.tar.bz2
opensim-SC-a1c9349d4765833691e7816d7f4df7bd37b9ee36.tar.xz
Refactor only: serve stats objects directly through StatsManager singleton
Diffstat (limited to 'OpenSim/Grid/AssetServer/Main.cs')
-rw-r--r--OpenSim/Grid/AssetServer/Main.cs10
1 files changed, 4 insertions, 6 deletions
diff --git a/OpenSim/Grid/AssetServer/Main.cs b/OpenSim/Grid/AssetServer/Main.cs
index c9f7e8e..23b0afa 100644
--- a/OpenSim/Grid/AssetServer/Main.cs
+++ b/OpenSim/Grid/AssetServer/Main.cs
@@ -52,9 +52,7 @@ namespace OpenSim.Grid.AssetServer
52 // Temporarily hardcoded - should be a plugin 52 // Temporarily hardcoded - should be a plugin
53 protected IAssetLoader assetLoader = new AssetLoaderFileSystem(); 53 protected IAssetLoader assetLoader = new AssetLoaderFileSystem();
54 54
55 private IAssetProvider m_assetProvider; 55 private IAssetProvider m_assetProvider;
56
57 protected AssetStatsReporter m_stats;
58 56
59 [STAThread] 57 [STAThread]
60 public static void Main(string[] args) 58 public static void Main(string[] args)
@@ -101,9 +99,9 @@ namespace OpenSim.Grid.AssetServer
101 m_console.Verbose("ASSET", "Starting HTTP process"); 99 m_console.Verbose("ASSET", "Starting HTTP process");
102 BaseHttpServer httpServer = new BaseHttpServer(m_config.HttpPort); 100 BaseHttpServer httpServer = new BaseHttpServer(m_config.HttpPort);
103 101
104 m_stats = new AssetStatsReporter(); 102 StatsManager.StartCollectingAssetStats();
105 103
106 httpServer.AddStreamHandler(new GetAssetStreamHandler(this, m_assetProvider, m_stats)); 104 httpServer.AddStreamHandler(new GetAssetStreamHandler(this, m_assetProvider));
107 httpServer.AddStreamHandler(new PostAssetStreamHandler(this, m_assetProvider)); 105 httpServer.AddStreamHandler(new PostAssetStreamHandler(this, m_assetProvider));
108 106
109 httpServer.Start(); 107 httpServer.Start();
@@ -184,7 +182,7 @@ namespace OpenSim.Grid.AssetServer
184 break; 182 break;
185 183
186 case "stats": 184 case "stats":
187 m_console.Notice("STATS", Environment.NewLine + m_stats.Report()); 185 m_console.Notice("STATS", Environment.NewLine + StatsManager.AssetStats.Report());
188 break; 186 break;
189 187
190 case "shutdown": 188 case "shutdown":