public void Initialise(AssetInventoryServer server) { m_server = server; m_openSimConfig = server.ConfigFile.Configs["OpenSim"]; try { m_assetProvider = DataPluginFactory.LoadDataPlugin <IAssetDataPlugin>(m_openSimConfig.GetString("asset_database_provider"), m_openSimConfig.GetString("asset_database_connect")); if (m_assetProvider == null) { m_log.Error("[OPENSIMASSETSTORAGE]: Failed to load a database plugin, server halting."); Environment.Exit(-1); } else { m_log.InfoFormat("[OPENSIMASSETSTORAGE]: Loaded storage backend: {0}", Version); } } catch (Exception e) { m_log.WarnFormat("[OPENSIMASSETSTORAGE]: Failure loading data plugin: {0}", e.ToString()); throw new PluginNotInitialisedException(Name); } }
public HGCommunicationsStandalone( ConfigSettings configSettings, NetworkServersInfo serversInfo, BaseHttpServer httpServer, IAssetCache assetCache, HGGridServices gridService, LibraryRootFolder libraryRootFolder, bool dumpAssetsToFile) : base(serversInfo, httpServer, assetCache, dumpAssetsToFile, libraryRootFolder) { LocalUserServices localUserService = new LocalUserServices( serversInfo.DefaultHomeLocX, serversInfo.DefaultHomeLocY, this); localUserService.AddPlugin(configSettings.StandaloneUserPlugin, configSettings.StandaloneUserSource); HGInventoryServiceClient inventoryService = new HGInventoryServiceClient(serversInfo.InventoryURL, null, false); List <IInventoryDataPlugin> plugins = DataPluginFactory.LoadDataPlugins <IInventoryDataPlugin>( configSettings.StandaloneInventoryPlugin, configSettings.StandaloneInventorySource); foreach (IInventoryDataPlugin plugin in plugins) { // Using the OSP wrapper plugin should be made configurable at some point inventoryService.AddPlugin(new OspInventoryWrapperPlugin(plugin, this)); } AddInventoryService(inventoryService); m_defaultInventoryHost = inventoryService.Host; m_interServiceInventoryService = inventoryService; inventoryService.UserProfileCache = UserProfileCacheService; m_assetCache = assetCache; // Let's swap to always be secure access to inventory AddSecureInventoryService((ISecureInventoryService)inventoryService); m_inventoryServices = null; HGUserServices hgUserService = new HGUserServices(this, localUserService); // This plugin arrangement could eventually be configurable rather than hardcoded here. hgUserService.AddPlugin(new TemporaryUserProfilePlugin()); hgUserService.AddPlugin(new OGS1UserDataPlugin(this)); m_userService = hgUserService; m_userAdminService = hgUserService; m_avatarService = hgUserService; m_messageService = hgUserService; gridService.UserProfileCache = m_userProfileCacheService; m_gridService = gridService; }
public void setupDB(AssetConfig config) { try { m_assetProvider = DataPluginFactory.LoadDataPlugin <IAssetDataPlugin>(config.DatabaseProvider, config.DatabaseConnect); if (m_assetProvider == null) { m_log.Error("[ASSET]: Failed to load a database plugin, server halting"); Environment.Exit(-1); } } catch (Exception e) { m_log.Warn("[ASSET]: setupDB() - Exception occured"); m_log.Warn("[ASSET]: " + e.ToString()); } }
public CommunicationsLocal( ConfigSettings configSettings, NetworkServersInfo serversInfo, BaseHttpServer httpServer, IAssetCache assetCache, LibraryRootFolder libraryRootFolder, bool dumpAssetsToFile) : base(serversInfo, httpServer, assetCache, dumpAssetsToFile, libraryRootFolder) { LocalInventoryService inventoryService = new LocalInventoryService(); List <IInventoryDataPlugin> plugins = DataPluginFactory.LoadDataPlugins <IInventoryDataPlugin>( configSettings.StandaloneInventoryPlugin, configSettings.StandaloneInventorySource); foreach (IInventoryDataPlugin plugin in plugins) { // Using the OSP wrapper plugin for database plugins should be made configurable at some point inventoryService.AddPlugin(new OspInventoryWrapperPlugin(plugin, this)); } AddInventoryService(inventoryService); m_defaultInventoryHost = inventoryService.Host; m_interServiceInventoryService = inventoryService; LocalUserServices lus = new LocalUserServices( serversInfo.DefaultHomeLocX, serversInfo.DefaultHomeLocY, this); lus.AddPlugin(new TemporaryUserProfilePlugin()); lus.AddPlugin(configSettings.StandaloneUserPlugin, configSettings.StandaloneUserSource); m_userService = lus; m_userAdminService = lus; m_avatarService = lus; m_messageService = lus; m_gridService = new LocalBackEndServices(); //LocalLoginService loginService = CreateLoginService(libraryRootFolder, inventoryService, userService, backendService); }
/// <summary> /// Adds a list of user data plugins, as described by `provider' and /// `connect', to `_plugins'. /// </summary> /// <param name="provider"> /// The filename of the inventory server plugin DLL. /// </param> /// <param name="connect"> /// The connection string for the storage backend. /// </param> public void AddPlugin(string provider, string connect) { m_plugins.AddRange(DataPluginFactory.LoadDataPlugins <IUserDataPlugin>(provider, connect)); }
/// <summary> /// Adds a list of grid and log data plugins, as described by /// `provider' and `connect', to `_plugins' and `_logplugins', /// respectively. /// </summary> /// <param name="provider"> /// The filename of the inventory server plugin DLL. /// </param> /// <param name="connect"> /// The connection string for the storage backend. /// </param> public void AddPlugin(string provider, string connect) { _plugins = DataPluginFactory.LoadDataPlugins <IGridDataPlugin>(provider, connect); _logplugins = DataPluginFactory.LoadDataPlugins <ILogDataPlugin>(provider, connect); }