aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/AssetInventoryServer/AssetInventoryServer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Grid/AssetInventoryServer/AssetInventoryServer.cs')
-rw-r--r--OpenSim/Grid/AssetInventoryServer/AssetInventoryServer.cs26
1 files changed, 22 insertions, 4 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)