From: Alan Webb <awebb@linux.vnet.ibm.com>
I've changed the extension point name, and the internal references that used the same string. I also fixed up the messaging around the asset loader so that it is more explicit.GenericGridServerConcept
parent
383f8b3ac6
commit
8ed631307b
|
@ -8,10 +8,10 @@
|
|||
<Extension path="/OpenSim/AssetCache">
|
||||
<Cache id="Default" provider="Default" type="OpenSim.Framework.Communications.Cache.AssetCache" />
|
||||
</Extension>
|
||||
<Extension path="/OpenSim/AssetServerClient">
|
||||
<ServerClient id="Crypto" provider="Crypto" type="OpenSim.Framework.Communications.Cache.CryptoGridAssetClient" />
|
||||
<ServerClient id="Grid" provider="Grid" type="OpenSim.Framework.Communications.Cache.GridAssetClient" />
|
||||
<ServerClient id="File" provider="File" type="OpenSim.Framework.Communications.Cache.FileAssetClient" />
|
||||
<ServerClient id="SQL" provider="SQL" type="OpenSim.Framework.Communications.Cache.SQLAssetServer" />
|
||||
<Extension path="/OpenSim/AssetClient">
|
||||
<AssetClient id="Crypto" provider="Crypto" type="OpenSim.Framework.Communications.Cache.CryptoGridAssetClient" />
|
||||
<AssetClient id="Grid" provider="Grid" type="OpenSim.Framework.Communications.Cache.GridAssetClient" />
|
||||
<AssetClient id="File" provider="File" type="OpenSim.Framework.Communications.Cache.FileAssetClient" />
|
||||
<AssetClient id="SQL" provider="SQL" type="OpenSim.Framework.Communications.Cache.SQLAssetServer" />
|
||||
</Extension>
|
||||
</Addin>
|
||||
|
|
|
@ -65,11 +65,11 @@ namespace OpenSim.Framework
|
|||
void AssetNotFound(UUID assetID, bool IsTexture);
|
||||
}
|
||||
|
||||
public class AssetServerClientPluginInitialiser : PluginInitialiserBase
|
||||
public class AssetClientPluginInitialiser : PluginInitialiserBase
|
||||
{
|
||||
private ConfigSettings config;
|
||||
|
||||
public AssetServerClientPluginInitialiser (ConfigSettings p_sv)
|
||||
public AssetClientPluginInitialiser (ConfigSettings p_sv)
|
||||
{
|
||||
config = p_sv;
|
||||
}
|
||||
|
@ -80,12 +80,12 @@ namespace OpenSim.Framework
|
|||
}
|
||||
}
|
||||
|
||||
public class LegacyAssetServerClientPluginInitialiser : PluginInitialiserBase
|
||||
public class LegacyAssetClientPluginInitialiser : PluginInitialiserBase
|
||||
{
|
||||
private ConfigSettings config;
|
||||
private string assetURL;
|
||||
|
||||
public LegacyAssetServerClientPluginInitialiser (ConfigSettings p_sv, string p_url)
|
||||
public LegacyAssetClientPluginInitialiser (ConfigSettings p_sv, string p_url)
|
||||
{
|
||||
config = p_sv;
|
||||
assetURL = p_url;
|
||||
|
@ -97,14 +97,14 @@ namespace OpenSim.Framework
|
|||
}
|
||||
}
|
||||
|
||||
public class CryptoAssetServerClientPluginInitialiser : PluginInitialiserBase
|
||||
public class CryptoAssetClientPluginInitialiser : PluginInitialiserBase
|
||||
{
|
||||
private ConfigSettings config;
|
||||
private string assetURL;
|
||||
private string currdir;
|
||||
private bool test;
|
||||
|
||||
public CryptoAssetServerClientPluginInitialiser (ConfigSettings p_sv, string p_url, string p_dir, bool p_test)
|
||||
public CryptoAssetClientPluginInitialiser (ConfigSettings p_sv, string p_url, string p_dir, bool p_test)
|
||||
{
|
||||
config = p_sv;
|
||||
assetURL = p_url;
|
||||
|
|
|
@ -59,7 +59,7 @@ namespace OpenSim
|
|||
// class during system startup.
|
||||
|
||||
private const string PLUGIN_ASSET_CACHE = "/OpenSim/AssetCache";
|
||||
private const string PLUGIN_ASSET_SERVER_CLIENT = "/OpenSim/AssetServerClient";
|
||||
private const string PLUGIN_ASSET_SERVER_CLIENT = "/OpenSim/AssetClient";
|
||||
|
||||
protected string proxyUrl;
|
||||
protected int proxyOffset = 0;
|
||||
|
@ -329,9 +329,9 @@ namespace OpenSim
|
|||
protected virtual void InitialiseAssetCache()
|
||||
{
|
||||
|
||||
LegacyAssetServerClientPluginInitialiser linit = null;
|
||||
CryptoAssetServerClientPluginInitialiser cinit = null;
|
||||
AssetServerClientPluginInitialiser init = null;
|
||||
LegacyAssetClientPluginInitialiser linit = null;
|
||||
CryptoAssetClientPluginInitialiser cinit = null;
|
||||
AssetClientPluginInitialiser init = null;
|
||||
|
||||
IAssetServer assetServer = null;
|
||||
string mode = m_configSettings.AssetStorage;
|
||||
|
@ -358,7 +358,7 @@ namespace OpenSim
|
|||
// of whether the server is standalone.
|
||||
|
||||
case "grid" :
|
||||
linit = new LegacyAssetServerClientPluginInitialiser(m_configSettings, m_networkServersInfo.AssetURL);
|
||||
linit = new LegacyAssetClientPluginInitialiser(m_configSettings, m_networkServersInfo.AssetURL);
|
||||
assetServer = loadAssetServer("Grid", linit);
|
||||
break;
|
||||
|
||||
|
@ -367,7 +367,7 @@ namespace OpenSim
|
|||
// of whether the server is standalone.
|
||||
|
||||
case "cryptogrid" :
|
||||
cinit = new CryptoAssetServerClientPluginInitialiser(m_configSettings, m_networkServersInfo.AssetURL,
|
||||
cinit = new CryptoAssetClientPluginInitialiser(m_configSettings, m_networkServersInfo.AssetURL,
|
||||
Environment.CurrentDirectory, true);
|
||||
assetServer = loadAssetServer("Crypto", cinit);
|
||||
break;
|
||||
|
@ -376,7 +376,7 @@ namespace OpenSim
|
|||
// of whether the server is standalone.
|
||||
|
||||
case "cryptogrid_eou" :
|
||||
cinit = new CryptoAssetServerClientPluginInitialiser(m_configSettings, m_networkServersInfo.AssetURL,
|
||||
cinit = new CryptoAssetClientPluginInitialiser(m_configSettings, m_networkServersInfo.AssetURL,
|
||||
Environment.CurrentDirectory, false);
|
||||
assetServer = loadAssetServer("Crypto", cinit);
|
||||
break;
|
||||
|
@ -385,7 +385,7 @@ namespace OpenSim
|
|||
// of whether the server is standalone.
|
||||
|
||||
case "file" :
|
||||
linit = new LegacyAssetServerClientPluginInitialiser(m_configSettings, m_networkServersInfo.AssetURL);
|
||||
linit = new LegacyAssetClientPluginInitialiser(m_configSettings, m_networkServersInfo.AssetURL);
|
||||
assetServer = loadAssetServer("File", linit);
|
||||
break;
|
||||
|
||||
|
@ -403,7 +403,7 @@ namespace OpenSim
|
|||
default :
|
||||
try
|
||||
{
|
||||
init = new AssetServerClientPluginInitialiser(m_configSettings);
|
||||
init = new AssetClientPluginInitialiser(m_configSettings);
|
||||
assetServer = loadAssetServer(m_configSettings.AssetStorage, init);
|
||||
break;
|
||||
}
|
||||
|
@ -417,7 +417,7 @@ namespace OpenSim
|
|||
|
||||
if (assetServer == null)
|
||||
{
|
||||
init = new AssetServerClientPluginInitialiser(m_configSettings);
|
||||
init = new AssetClientPluginInitialiser(m_configSettings);
|
||||
SQLAssetServer sqlAssetServer = (SQLAssetServer) loadAssetServer("SQL", init);
|
||||
sqlAssetServer.LoadDefaultAssets(m_configSettings.AssetSetsXMLFile);
|
||||
assetServer = sqlAssetServer;
|
||||
|
@ -437,14 +437,28 @@ namespace OpenSim
|
|||
private IAssetServer loadAssetServer(string id, PluginInitialiserBase pi)
|
||||
{
|
||||
|
||||
if(id != null && id != String.Empty)
|
||||
{
|
||||
m_log.DebugFormat("[OPENSIMBASE] Attempting to load asset server id={0}", id);
|
||||
|
||||
try
|
||||
{
|
||||
PluginLoader<IAssetServer> loader = new PluginLoader<IAssetServer>(pi);
|
||||
loader.AddFilter(PLUGIN_ASSET_SERVER_CLIENT, new PluginProviderFilter(id));
|
||||
loader.Load(PLUGIN_ASSET_SERVER_CLIENT);
|
||||
|
||||
if (loader.Plugins.Count > 0)
|
||||
{
|
||||
m_log.DebugFormat("[OPENSIMBASE] Asset server {0} loaded", id);
|
||||
return (IAssetServer) loader.Plugins[0];
|
||||
else
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.DebugFormat("[OPENSIMBASE] Asset server {0} not loaded ({1})", id, e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
}
|
||||
|
@ -465,10 +479,12 @@ namespace OpenSim
|
|||
|
||||
IAssetCache assetCache = null;
|
||||
|
||||
m_log.DebugFormat("[OPENSIMBASE] Attempting to load asset cache id={0}", m_configSettings.AssetCache);
|
||||
|
||||
if (m_configSettings.AssetCache != null && m_configSettings.AssetCache != String.Empty)
|
||||
{
|
||||
|
||||
m_log.DebugFormat("[OPENSIMBASE] Attempting to load asset cache id={0}", m_configSettings.AssetCache);
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<ExtensionPoint path="/OpenSim/AssetCache" name="Region Asset Cache Plugin-point" >
|
||||
<ExtensionNode name="Cache" type="OpenSim.Framework.PluginExtensionNode" objectType="OpenSim.Framework.IAssetCache"/>
|
||||
</ExtensionPoint>
|
||||
<ExtensionPoint path="/OpenSim/AssetServerClient" name="Region Asset Cache Server Interface Plugin-point">
|
||||
<ExtensionNode name="ServerClient" type="OpenSim.Framework.PluginExtensionNode" objectType="OpenSim.Framework.IAssetServer"/>
|
||||
<ExtensionPoint path="/OpenSim/AssetClient" name="Region Asset Cache Server Interface Plugin-point">
|
||||
<ExtensionNode name="AssetClient" type="OpenSim.Framework.PluginExtensionNode" objectType="OpenSim.Framework.IAssetServer"/>
|
||||
</ExtensionPoint>
|
||||
</Addin>
|
||||
|
|
Loading…
Reference in New Issue