aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMike Mazur2009-02-16 02:27:01 +0000
committerMike Mazur2009-02-16 02:27:01 +0000
commitf1e71ca5e115366e55fb1b721d85cef08e3e5816 (patch)
tree7f8bcad91db1de772a6580abe255fb39e706e2e0
parentMove NullAuthentication and AuthorizeAll extensions to plugins. (diff)
downloadopensim-SC_OLD-f1e71ca5e115366e55fb1b721d85cef08e3e5816.zip
opensim-SC_OLD-f1e71ca5e115366e55fb1b721d85cef08e3e5816.tar.gz
opensim-SC_OLD-f1e71ca5e115366e55fb1b721d85cef08e3e5816.tar.bz2
opensim-SC_OLD-f1e71ca5e115366e55fb1b721d85cef08e3e5816.tar.xz
- add list for backend plugins and Dispose() all plugins on shutdown
- fix some plugin names - remove most references to ExtensionLoader - remove commented out AssetInventoryServer blobs from prebuild.xml
Diffstat (limited to '')
-rw-r--r--OpenSim/Grid/AssetInventoryServer/AssetInventoryServer.cs26
-rw-r--r--OpenSim/Grid/AssetInventoryServer/Plugins/AuthorizeAllPlugin.cs2
-rw-r--r--OpenSim/Grid/AssetInventoryServer/Plugins/NullAuthenticationPlugin.cs2
-rw-r--r--OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetFrontendPlugin.cs4
-rw-r--r--OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetStoragePlugin.cs2
-rw-r--r--OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimInventoryFrontendPlugin.cs3
-rw-r--r--OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimInventoryStoragePlugin.cs2
-rw-r--r--OpenSim/Grid/AssetInventoryServer/Plugins/Simple/SimpleAssetStoragePlugin.cs1
-rw-r--r--OpenSim/Grid/AssetInventoryServer/Plugins/Simple/SimpleInventoryStoragePlugin.cs1
-rw-r--r--prebuild.xml59
10 files changed, 25 insertions, 77 deletions
diff --git a/OpenSim/Grid/AssetInventoryServer/AssetInventoryServer.cs b/OpenSim/Grid/AssetInventoryServer/AssetInventoryServer.cs
index c6c7da2..19f2081 100644
--- a/OpenSim/Grid/AssetInventoryServer/AssetInventoryServer.cs
+++ b/OpenSim/Grid/AssetInventoryServer/AssetInventoryServer.cs
@@ -56,6 +56,7 @@ namespace OpenSim.Grid.AssetInventoryServer
56 public IMetricsProvider MetricsProvider; 56 public IMetricsProvider MetricsProvider;
57 57
58 private List<IAssetInventoryServerPlugin> frontends = new List<IAssetInventoryServerPlugin>(); 58 private List<IAssetInventoryServerPlugin> frontends = new List<IAssetInventoryServerPlugin>();
59 private List<IAssetInventoryServerPlugin> backends = new List<IAssetInventoryServerPlugin>();
59 60
60 public AssetInventoryServer() 61 public AssetInventoryServer()
61 { 62 {
@@ -107,8 +108,13 @@ namespace OpenSim.Grid.AssetInventoryServer
107 } 108 }
108 109
109 StorageProvider = LoadAssetInventoryServerPlugin("/OpenSim/AssetInventoryServer/StorageProvider", "OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim.dll") as IAssetStorageProvider; 110 StorageProvider = LoadAssetInventoryServerPlugin("/OpenSim/AssetInventoryServer/StorageProvider", "OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim.dll") as IAssetStorageProvider;
111 backends.Add(StorageProvider);
112
110 InventoryProvider = LoadAssetInventoryServerPlugin("/OpenSim/AssetInventoryServer/InventoryProvider", "OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim.dll") as IInventoryStorageProvider; 113 InventoryProvider = LoadAssetInventoryServerPlugin("/OpenSim/AssetInventoryServer/InventoryProvider", "OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim.dll") as IInventoryStorageProvider;
114 backends.Add(InventoryProvider);
115
111 MetricsProvider = LoadAssetInventoryServerPlugin("/OpenSim/AssetInventoryServer/MetricsProvider", String.Empty) as IMetricsProvider; 116 MetricsProvider = LoadAssetInventoryServerPlugin("/OpenSim/AssetInventoryServer/MetricsProvider", String.Empty) as IMetricsProvider;
117 backends.Add(MetricsProvider);
112 118
113 try 119 try
114 { 120 {
@@ -122,20 +128,32 @@ namespace OpenSim.Grid.AssetInventoryServer
122 } 128 }
123 129
124 frontends.AddRange(LoadAssetInventoryServerPlugins("/OpenSim/AssetInventoryServer/Frontend", String.Empty)); 130 frontends.AddRange(LoadAssetInventoryServerPlugins("/OpenSim/AssetInventoryServer/Frontend", String.Empty));
131
125 AuthenticationProvider = LoadAssetInventoryServerPlugin("/OpenSim/AssetInventoryServer/AuthenticationProvider", String.Empty) as IAuthenticationProvider; 132 AuthenticationProvider = LoadAssetInventoryServerPlugin("/OpenSim/AssetInventoryServer/AuthenticationProvider", String.Empty) as IAuthenticationProvider;
133 backends.Add(AuthenticationProvider);
134
126 AuthorizationProvider = LoadAssetInventoryServerPlugin("/OpenSim/AssetInventoryServer/AuthorizationProvider", String.Empty) as IAuthorizationProvider; 135 AuthorizationProvider = LoadAssetInventoryServerPlugin("/OpenSim/AssetInventoryServer/AuthorizationProvider", String.Empty) as IAuthorizationProvider;
136 backends.Add(AuthorizationProvider);
127 137
128 return true; 138 return true;
129 } 139 }
130 140
131 public void Shutdown() 141 public void Shutdown()
132 { 142 {
133 foreach (IExtension<AssetInventoryServer> extension in ExtensionLoader<AssetInventoryServer>.Extensions) 143 foreach (IAssetInventoryServerPlugin plugin in frontends)
144 {
145 Logger.Log.Debug("Disposing plugin " + plugin.Name);
146 try { plugin.Dispose(); }
147 catch (Exception ex)
148 { Logger.Log.ErrorFormat("Failure shutting down plugin {0}: {1}", plugin.Name, ex.Message); }
149 }
150
151 foreach (IAssetInventoryServerPlugin plugin in backends)
134 { 152 {
135 Logger.Log.Debug("Disposing extension " + extension.GetType().Name); 153 Logger.Log.Debug("Disposing plugin " + plugin.Name);
136 try { extension.Stop(); } 154 try { plugin.Dispose(); }
137 catch (Exception ex) 155 catch (Exception ex)
138 { Logger.Log.ErrorFormat("Failure shutting down extension {0}: {1}", extension.GetType().Name, ex.Message); } 156 { Logger.Log.ErrorFormat("Failure shutting down plugin {0}: {1}", plugin.Name, ex.Message); }
139 } 157 }
140 158
141 if (HttpServer != null) 159 if (HttpServer != null)
diff --git a/OpenSim/Grid/AssetInventoryServer/Plugins/AuthorizeAllPlugin.cs b/OpenSim/Grid/AssetInventoryServer/Plugins/AuthorizeAllPlugin.cs
index 8974b6f..1c0fca7 100644
--- a/OpenSim/Grid/AssetInventoryServer/Plugins/AuthorizeAllPlugin.cs
+++ b/OpenSim/Grid/AssetInventoryServer/Plugins/AuthorizeAllPlugin.cs
@@ -71,7 +71,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins
71 71
72 public string Name 72 public string Name
73 { 73 {
74 get { return "AssetInventoryServer Null authentication frontend"; } 74 get { return "AssetInventoryServer Authorize All"; }
75 } 75 }
76 76
77 #endregion IPlugin implementation 77 #endregion IPlugin implementation
diff --git a/OpenSim/Grid/AssetInventoryServer/Plugins/NullAuthenticationPlugin.cs b/OpenSim/Grid/AssetInventoryServer/Plugins/NullAuthenticationPlugin.cs
index 81e58c6..ccb21b0 100644
--- a/OpenSim/Grid/AssetInventoryServer/Plugins/NullAuthenticationPlugin.cs
+++ b/OpenSim/Grid/AssetInventoryServer/Plugins/NullAuthenticationPlugin.cs
@@ -71,7 +71,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins
71 71
72 public string Name 72 public string Name
73 { 73 {
74 get { return "AssetInventoryServer Null authentication frontend"; } 74 get { return "AssetInventoryServer Null authentication"; }
75 } 75 }
76 76
77 #endregion IPlugin implementation 77 #endregion IPlugin implementation
diff --git a/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetFrontendPlugin.cs b/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetFrontendPlugin.cs
index ebab557..f831e24 100644
--- a/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetFrontendPlugin.cs
+++ b/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetFrontendPlugin.cs
@@ -34,7 +34,6 @@ using System.IO;
34using System.Text; 34using System.Text;
35using System.Xml; 35using System.Xml;
36using System.Xml.Serialization; 36using System.Xml.Serialization;
37using ExtensionLoader;
38using OpenMetaverse; 37using OpenMetaverse;
39using HttpServer; 38using HttpServer;
40using OpenSim.Framework; 39using OpenSim.Framework;
@@ -147,8 +146,6 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
147 { 146 {
148 Metadata metadata = new Metadata(); 147 Metadata metadata = new Metadata();
149 148
150 Logger.Log.Debug("Handling OpenSim asset upload");
151
152 try 149 try
153 { 150 {
154 AssetBase asset = (AssetBase) new XmlSerializer(typeof (AssetBase)).Deserialize(request.Body); 151 AssetBase asset = (AssetBase) new XmlSerializer(typeof (AssetBase)).Deserialize(request.Body);
@@ -185,7 +182,6 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
185 response.Status = HttpStatusCode.BadRequest; 182 response.Status = HttpStatusCode.BadRequest;
186 } 183 }
187 184
188 Logger.Log.Debug("Finished handling OpenSim asset upload, Status: " + response.Status.ToString());
189 return true; 185 return true;
190 } 186 }
191 } 187 }
diff --git a/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetStoragePlugin.cs b/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetStoragePlugin.cs
index 6c02cde..eb000ae 100644
--- a/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetStoragePlugin.cs
+++ b/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetStoragePlugin.cs
@@ -32,8 +32,6 @@ using System.Collections.Generic;
32using System.Net; 32using System.Net;
33using System.Data; 33using System.Data;
34using MySql.Data.MySqlClient; 34using MySql.Data.MySqlClient;
35using ExtensionLoader;
36using ExtensionLoader.Config;
37using OpenMetaverse; 35using OpenMetaverse;
38using OpenMetaverse.StructuredData; 36using OpenMetaverse.StructuredData;
39using OpenSim.Framework; 37using OpenSim.Framework;
diff --git a/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimInventoryFrontendPlugin.cs b/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimInventoryFrontendPlugin.cs
index 6e33cdf..0f3867a 100644
--- a/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimInventoryFrontendPlugin.cs
+++ b/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimInventoryFrontendPlugin.cs
@@ -32,7 +32,6 @@ using System.Collections.Generic;
32using System.Net; 32using System.Net;
33using System.IO; 33using System.IO;
34using System.Xml; 34using System.Xml;
35using ExtensionLoader;
36using OpenMetaverse; 35using OpenMetaverse;
37using OpenMetaverse.StructuredData; 36using OpenMetaverse.StructuredData;
38using HttpServer; 37using HttpServer;
@@ -92,7 +91,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
92 91
93 public string Name 92 public string Name
94 { 93 {
95 get { return "AssetInventoryServer OpenSim asset frontend"; } 94 get { return "AssetInventoryServer OpenSim inventory frontend"; }
96 } 95 }
97 96
98 #endregion IPlugin implementation 97 #endregion IPlugin implementation
diff --git a/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimInventoryStoragePlugin.cs b/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimInventoryStoragePlugin.cs
index 3fd06c0..a41c48d 100644
--- a/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimInventoryStoragePlugin.cs
+++ b/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimInventoryStoragePlugin.cs
@@ -32,8 +32,6 @@ using System.Collections.Generic;
32using System.Net; 32using System.Net;
33using System.Data; 33using System.Data;
34using MySql.Data.MySqlClient; 34using MySql.Data.MySqlClient;
35using ExtensionLoader;
36using ExtensionLoader.Config;
37using OpenMetaverse; 35using OpenMetaverse;
38using OpenMetaverse.StructuredData; 36using OpenMetaverse.StructuredData;
39using OpenSim.Framework; 37using OpenSim.Framework;
diff --git a/OpenSim/Grid/AssetInventoryServer/Plugins/Simple/SimpleAssetStoragePlugin.cs b/OpenSim/Grid/AssetInventoryServer/Plugins/Simple/SimpleAssetStoragePlugin.cs
index fd198d9..301a55f 100644
--- a/OpenSim/Grid/AssetInventoryServer/Plugins/Simple/SimpleAssetStoragePlugin.cs
+++ b/OpenSim/Grid/AssetInventoryServer/Plugins/Simple/SimpleAssetStoragePlugin.cs
@@ -31,7 +31,6 @@ using System;
31using System.Collections.Generic; 31using System.Collections.Generic;
32using System.Net; 32using System.Net;
33using System.IO; 33using System.IO;
34using ExtensionLoader;
35using OpenMetaverse; 34using OpenMetaverse;
36using OpenMetaverse.StructuredData; 35using OpenMetaverse.StructuredData;
37using OpenSim.Framework; 36using OpenSim.Framework;
diff --git a/OpenSim/Grid/AssetInventoryServer/Plugins/Simple/SimpleInventoryStoragePlugin.cs b/OpenSim/Grid/AssetInventoryServer/Plugins/Simple/SimpleInventoryStoragePlugin.cs
index 78dae35..415874a 100644
--- a/OpenSim/Grid/AssetInventoryServer/Plugins/Simple/SimpleInventoryStoragePlugin.cs
+++ b/OpenSim/Grid/AssetInventoryServer/Plugins/Simple/SimpleInventoryStoragePlugin.cs
@@ -32,7 +32,6 @@ using System.Collections.Generic;
32using System.Net; 32using System.Net;
33using System.IO; 33using System.IO;
34using System.Text; 34using System.Text;
35using ExtensionLoader;
36using OpenMetaverse; 35using OpenMetaverse;
37using OpenMetaverse.StructuredData; 36using OpenMetaverse.StructuredData;
38using OpenSim.Framework; 37using OpenSim.Framework;
diff --git a/prebuild.xml b/prebuild.xml
index 83e31f2..a284f72 100644
--- a/prebuild.xml
+++ b/prebuild.xml
@@ -836,7 +836,6 @@
836 836
837 <!-- Remove these eventually --> 837 <!-- Remove these eventually -->
838 <Reference name="MySql.Data" /> 838 <Reference name="MySql.Data" />
839 <Reference name="ExtensionLoader" />
840 839
841 <Files> 840 <Files>
842 <Match pattern="*.cs" recurse="false" /> 841 <Match pattern="*.cs" recurse="false" />
@@ -868,7 +867,6 @@
868 867
869 <!-- Remove these eventually --> 868 <!-- Remove these eventually -->
870 <Reference name="MySql.Data" /> 869 <Reference name="MySql.Data" />
871 <Reference name="ExtensionLoader" />
872 870
873 <Files> 871 <Files>
874 <Match pattern="*.cs" recurse="false" /> 872 <Match pattern="*.cs" recurse="false" />
@@ -876,63 +874,6 @@
876 </Files> 874 </Files>
877 </Project> 875 </Project>
878 876
879 <!--Project name="OpenSim.Grid.AssetInventoryServer.Simple" path="OpenSim/Grid/AssetInventoryServer/Extensions/Simple" type="Library">
880 <Configuration name="Debug">
881 <Options>
882 <OutputPath>../../../../../bin/</OutputPath>
883 </Options>
884 </Configuration>
885 <Configuration name="Release">
886 <Options>
887 <OutputPath>../../../../../bin/</OutputPath>
888 </Options>
889 </Configuration>
890
891 <ReferencePath>../../../../../bin/</ReferencePath>
892 <Reference name="System"/>
893 <Reference name="System.ServiceProcess"/>
894 <Reference name="System.Xml"/>
895 <Reference name="log4net2"/>
896 <Reference name="OpenSim.Grid.AssetServer.exe"/>
897 <Reference name="OpenMetaverse"/>
898 <Reference name="OpenMetaverseTypes"/>
899 <Reference name="OpenMetaverse.StructuredData2"/>
900 <Reference name="ExtensionLoader"/>
901
902 <Files>
903 <Match pattern="*.cs" recurse="true"/>
904 </Files>
905 </Project>
906
907 <Project name="OpenSim.Grid.AssetInventoryServer.OpenSimMySQL" path="OpenSim/Grid/AssetInventoryServer/Extensions/OpenSimMySQL" type="Library">
908 <Configuration name="Debug">
909 <Options>
910 <OutputPath>../../../../../bin/</OutputPath>
911 </Options>
912 </Configuration>
913 <Configuration name="Release">
914 <Options>
915 <OutputPath>../../../../../bin/</OutputPath>
916 </Options>
917 </Configuration>
918
919 <ReferencePath>../../../../../bin/</ReferencePath>
920 <Reference name="System"/>
921 <Reference name="System.Data"/>
922 <Reference name="System.ServiceProcess"/>
923 <Reference name="System.Xml"/>
924 <Reference name="log4net2"/>
925 <Reference name="OpenSim.Grid.AssetServer.exe"/>
926 <Reference name="OpenMetaverseTypes"/>
927 <Reference name="OpenMetaverse.StructuredData2"/>
928 <Reference name="ExtensionLoader"/>
929 <Reference name="MySql.Data"/>
930
931 <Files>
932 <Match pattern="*.cs" recurse="true"/>
933 </Files>
934 </Project-->
935
936 <Project name="OpenSim.Grid.UserServer" path="OpenSim/Grid/UserServer" type="Exe"> 877 <Project name="OpenSim.Grid.UserServer" path="OpenSim/Grid/UserServer" type="Exe">
937 <Configuration name="Debug"> 878 <Configuration name="Debug">
938 <Options> 879 <Options>