aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/AssetServer/Main.cs
diff options
context:
space:
mode:
authorlbsa712008-03-28 21:43:46 +0000
committerlbsa712008-03-28 21:43:46 +0000
commit7f11079f57faacedc2dc8e3f2005b483e7314726 (patch)
tree3df97ace353d92cea53fbaaf4063fa9b53c93730 /OpenSim/Grid/AssetServer/Main.cs
parent* Introduced common abstract UserDataBase provider (diff)
downloadopensim-SC_OLD-7f11079f57faacedc2dc8e3f2005b483e7314726.zip
opensim-SC_OLD-7f11079f57faacedc2dc8e3f2005b483e7314726.tar.gz
opensim-SC_OLD-7f11079f57faacedc2dc8e3f2005b483e7314726.tar.bz2
opensim-SC_OLD-7f11079f57faacedc2dc8e3f2005b483e7314726.tar.xz
* Refactored out common http handler operations
Diffstat (limited to 'OpenSim/Grid/AssetServer/Main.cs')
-rw-r--r--OpenSim/Grid/AssetServer/Main.cs17
1 files changed, 11 insertions, 6 deletions
diff --git a/OpenSim/Grid/AssetServer/Main.cs b/OpenSim/Grid/AssetServer/Main.cs
index d2c247a..c863c76 100644
--- a/OpenSim/Grid/AssetServer/Main.cs
+++ b/OpenSim/Grid/AssetServer/Main.cs
@@ -51,7 +51,7 @@ namespace OpenSim.Grid.AssetServer
51 // Temporarily hardcoded - should be a plugin 51 // Temporarily hardcoded - should be a plugin
52 protected IAssetLoader assetLoader = new AssetLoaderFileSystem(); 52 protected IAssetLoader assetLoader = new AssetLoaderFileSystem();
53 53
54 private IAssetProvider m_assetProvider; 54 private IAssetProvider m_assetProvider;
55 55
56 [STAThread] 56 [STAThread]
57 public static void Main(string[] args) 57 public static void Main(string[] args)
@@ -94,14 +94,19 @@ namespace OpenSim.Grid.AssetServer
94 LoadDefaultAssets(); 94 LoadDefaultAssets();
95 95
96 m_log.Info("[ASSET]: Starting HTTP process"); 96 m_log.Info("[ASSET]: Starting HTTP process");
97 BaseHttpServer httpServer = new BaseHttpServer(m_config.HttpPort); 97 m_httpServer = new BaseHttpServer(m_config.HttpPort);
98 98
99 StatsManager.StartCollectingAssetStats(); 99 StatsManager.StartCollectingAssetStats();
100 100
101 httpServer.AddStreamHandler(new GetAssetStreamHandler(this, m_assetProvider)); 101 AddHttpHandlers();
102 httpServer.AddStreamHandler(new PostAssetStreamHandler(this, m_assetProvider));
103 102
104 httpServer.Start(); 103 m_httpServer.Start();
104 }
105
106 protected void AddHttpHandlers()
107 {
108 m_httpServer.AddStreamHandler(new GetAssetStreamHandler(this, m_assetProvider));
109 m_httpServer.AddStreamHandler(new PostAssetStreamHandler(this, m_assetProvider));
105 } 110 }
106 111
107 public byte[] GetAssetData(LLUUID assetID, bool isTexture) 112 public byte[] GetAssetData(LLUUID assetID, bool isTexture)