public HGCommunicationsGridMode(
            NetworkServersInfo serversInfo,
            SceneManager sman, LibraryRootFolder libraryRootFolder)
            : base(serversInfo, libraryRootFolder)
        {
            // From constructor at CommunicationsOGS1
            HGGridServices gridInterComms = new HGGridServicesGridMode(serversInfo, sman, m_userProfileCacheService);
            m_gridService = gridInterComms;
            m_osw = gridInterComms;

            // The HG InventoryService always uses secure handlers
            HGInventoryServiceClient invService = new HGInventoryServiceClient(serversInfo.InventoryURL, this.m_userProfileCacheService, true);
            invService.UserProfileCache = m_userProfileCacheService; 
            AddSecureInventoryService(invService);
            m_defaultInventoryHost = invService.Host;
            if (SecureInventoryService != null)
                m_log.Info("[HG]: SecureInventoryService.");
            else
                m_log.Info("[HG]: Non-secureInventoryService.");

            HGUserServices userServices = new HGUserServices(this);
            // This plugin arrangement could eventually be configurable rather than hardcoded here.
            userServices.AddPlugin(new TemporaryUserProfilePlugin());
            userServices.AddPlugin(new OGS1UserDataPlugin(this));            
            
            m_userService = userServices;
            m_messageService = userServices;
            m_avatarService = userServices;           
        }
 public HGCommunicationsStandalone(
     ConfigSettings configSettings,                          
     NetworkServersInfo serversInfo,
     BaseHttpServer httpServer,
     HGGridServices gridService, 
     LibraryRootFolder libraryRootFolder, 
     bool dumpAssetsToFile)
     : base(serversInfo, libraryRootFolder)
 {           
     LocalUserServices localUserService =
         new LocalUserServices(
             serversInfo.DefaultHomeLocX, serversInfo.DefaultHomeLocY, this);
     localUserService.AddPlugin(configSettings.StandaloneUserPlugin, configSettings.StandaloneUserSource); 
     
     HGUserServices hgUserService = new HGUserServices(this, localUserService);
     // This plugin arrangement could eventually be configurable rather than hardcoded here.
     hgUserService.AddPlugin(new TemporaryUserProfilePlugin());
     hgUserService.AddPlugin(new HGUserDataPlugin(this, hgUserService));
     
     m_userService = hgUserService;            
     m_userAdminService = hgUserService;            
     m_avatarService = hgUserService;
     m_messageService = hgUserService;
     
     gridService.UserProfileCache = m_userProfileCacheService;
     m_gridService = gridService;                        
 }
Exemple #3
0
        public CommunicationsOGS1(
            NetworkServersInfo serversInfo,
            LibraryRootFolder libraryRootFolder)
            : base(serversInfo, libraryRootFolder)
        {
            OGS1GridServices gridInterComms = new OGS1GridServices(serversInfo);
            m_gridService = gridInterComms;

            if (serversInfo.secureInventoryServer)
            {
                OGS1SecureInventoryService invService = new OGS1SecureInventoryService(serversInfo.InventoryURL);
                AddSecureInventoryService(invService);
                m_defaultInventoryHost = invService.Host;
            }
            else
            {
                OGS1InventoryService invService = new OGS1InventoryService(serversInfo.InventoryURL);
                AddInventoryService(invService);
                m_defaultInventoryHost = invService.Host;
            }

            // This plugin arrangement could eventually be configurable rather than hardcoded here.           
            OGS1UserServices userServices = new OGS1UserServices(this);
            userServices.AddPlugin(new TemporaryUserProfilePlugin());
            userServices.AddPlugin(new OGS1UserDataPlugin(this));
            
            m_userService = userServices;
            m_messageService = userServices;
            m_avatarService = (IAvatarService)m_userService;
        }
        public CommunicationsLocal(
            ConfigSettings configSettings,                                   
            NetworkServersInfo serversInfo,
            BaseHttpServer httpServer,
            IAssetCache assetCache,
            LibraryRootFolder libraryRootFolder) 
            : base(serversInfo, httpServer, assetCache, libraryRootFolder)
        {
            PluginLoader<IInventoryStoragePlugin> loader = new PluginLoader<IInventoryStoragePlugin>();
            loader.Add("/OpenSim/InventoryStorage", new PluginProviderFilter(configSettings.InventoryPlugin));
            loader.Load();

            loader.Plugin.Initialize(configSettings);
            

            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();                   
        }
Exemple #5
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="userManager"></param>
        /// <param name="libraryRootFolder"></param>
        /// <param name="welcomeMess"></param>
        public LoginService(UserManagerBase userManager, LibraryRootFolder libraryRootFolder,
                            string welcomeMess)
        {
            m_userManager = userManager;
            m_libraryRootFolder = libraryRootFolder;

            if (welcomeMess != String.Empty)
            {
                m_welcomeMessage = welcomeMess;
            }
        }
        public LLStandaloneLoginService(
            UserManagerBase userManager, string welcomeMess, string mapServerURI,
            NetworkServersInfo serversInfo,
            bool authenticate, LibraryRootFolder libraryRootFolder, ILoginServiceToRegionsConnector regionsConnector)
            : base(userManager, libraryRootFolder, welcomeMess, mapServerURI)
        {
            this.m_serversInfo = serversInfo;
            m_defaultHomeX = this.m_serversInfo.DefaultHomeLocX;
            m_defaultHomeY = this.m_serversInfo.DefaultHomeLocY;
            m_authUsers = authenticate;

            m_regionsConnector = regionsConnector;
        }
Exemple #7
0
        public UserLoginService(
            UserManagerBase userManager, IInterServiceInventoryServices inventoryService,
            LibraryRootFolder libraryRootFolder,
            UserConfig config, string welcomeMess, IRegionProfileRouter regionProfileService)
            : base(userManager, libraryRootFolder, welcomeMess)
        {
            m_config = config;
            m_defaultHomeX = m_config.DefaultX;
            m_defaultHomeY = m_config.DefaultY;
            m_interInventoryService = inventoryService;
            m_regionProfileService = regionProfileService;

            m_GridService = new GridServicesConnector(config.GridServerURL.ToString());
        }
        public CommunicationsOGS1(
            NetworkServersInfo serversInfo,
            LibraryRootFolder libraryRootFolder)
            : base(serversInfo, libraryRootFolder)
        {

            // This plugin arrangement could eventually be configurable rather than hardcoded here.
            OGS1UserServices userServices = new OGS1UserServices(this);
            userServices.AddPlugin(new TemporaryUserProfilePlugin());
            userServices.AddPlugin(new OGS1UserDataPlugin(this));
            
            m_userService = userServices;
            m_messageService = userServices;
            m_avatarService = (IAvatarService)m_userService;
        }
        public HGCommunicationsGridMode(
            NetworkServersInfo serversInfo,
            SceneManager sman, LibraryRootFolder libraryRootFolder)
            : base(serversInfo, libraryRootFolder)
        {

            HGUserServices userServices = new HGUserServices(this);
            // This plugin arrangement could eventually be configurable rather than hardcoded here.
            userServices.AddPlugin(new TemporaryUserProfilePlugin());
            userServices.AddPlugin(new HGUserDataPlugin(this, userServices));
            
            m_userService = userServices;
            m_messageService = userServices;
            m_avatarService = userServices;
        }
        public LLStandaloneLoginService(
            UserManagerBase userManager, string welcomeMess,
            IInventoryService interServiceInventoryService,
            NetworkServersInfo serversInfo,
            bool authenticate, LibraryRootFolder libraryRootFolder, ILoginServiceToRegionsConnector regionsConnector)
            : base(userManager, libraryRootFolder, welcomeMess)
        {
            this.m_serversInfo = serversInfo;
            m_defaultHomeX = this.m_serversInfo.DefaultHomeLocX;
            m_defaultHomeY = this.m_serversInfo.DefaultHomeLocY;
            m_authUsers = authenticate;

            m_InventoryService = interServiceInventoryService;
            m_regionsConnector = regionsConnector;
            // Standard behavior: In StandAlone, silent logout of last hung session
            m_warn_already_logged = false;
        }
        public HGCommunicationsGridMode(
            NetworkServersInfo serversInfo,
            SceneManager sman, LibraryRootFolder libraryRootFolder)
            : base(serversInfo, libraryRootFolder)
        {
            // From constructor at CommunicationsOGS1
            HGGridServices gridInterComms = new HGGridServicesGridMode(serversInfo, sman, m_userProfileCacheService);
            m_gridService = gridInterComms;
            m_osw = gridInterComms;

            HGUserServices userServices = new HGUserServices(this);
            // This plugin arrangement could eventually be configurable rather than hardcoded here.
            userServices.AddPlugin(new TemporaryUserProfilePlugin());
            userServices.AddPlugin(new OGS1UserDataPlugin(this));            
            
            m_userService = userServices;
            m_messageService = userServices;
            m_avatarService = userServices;           
        }
        public HGLoginAuthService(
            UserManagerBase userManager, string welcomeMess,
            IInterServiceInventoryServices interServiceInventoryService,
            NetworkServersInfo serversInfo,
            bool authenticate, LibraryRootFolder libraryRootFolder, ILoginServiceToRegionsConnector regionsConnector)
            : base(userManager, libraryRootFolder, welcomeMess)
        {
            this.m_serversInfo = serversInfo;
            if (m_serversInfo != null)
            {
                m_defaultHomeX = this.m_serversInfo.DefaultHomeLocX;
                m_defaultHomeY = this.m_serversInfo.DefaultHomeLocY;
            }
            m_authUsers = authenticate;

            m_interServiceInventoryService = interServiceInventoryService;
            m_regionsConnector = regionsConnector;
            m_interInventoryService = interServiceInventoryService;
        }
        public CommunicationsLocal(
            ConfigSettings configSettings,
            NetworkServersInfo serversInfo,
            LibraryRootFolder libraryRootFolder)
            : base(serversInfo, libraryRootFolder)
        {
                       
            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;

            //LocalLoginService loginService = CreateLoginService(libraryRootFolder, inventoryService, userService, backendService);
        }
        public UserLoginAuthService(
            UserManagerBase userManager, IInterServiceInventoryServices inventoryService,
            LibraryRootFolder libraryRootFolder,
            UserConfig config, string welcomeMess, IRegionProfileRouter regionProfileService)
            : base(userManager, welcomeMess, inventoryService, null, true, libraryRootFolder, null)
        {
            m_config = config;
            m_defaultHomeX = m_config.DefaultX;
            m_defaultHomeY = m_config.DefaultY;
            m_interInventoryService = inventoryService;
            m_regionProfileService = regionProfileService;

            NetworkServersInfo serversinfo = new NetworkServersInfo(1000, 1000);
            serversinfo.GridRecvKey = m_config.GridRecvKey;
            serversinfo.GridSendKey = m_config.GridSendKey;
            serversinfo.GridURL = m_config.GridServerURL.ToString();
            serversinfo.InventoryURL = m_config.InventoryUrl.ToString();
            serversinfo.UserURL = m_config.AuthUrl.ToString();
            SetServersInfo(serversinfo);
        }
Exemple #15
0
        public CommunicationsOGS1(
            NetworkServersInfo serversInfo, BaseHttpServer httpServer, 
            IAssetCache assetCache, LibraryRootFolder libraryRootFolder,
            ConfigSettings configSettings)
            : base(serversInfo, httpServer, assetCache, libraryRootFolder)
        {
            OGS1GridServices gridInterComms = new OGS1GridServices(serversInfo, httpServer);
            m_gridService = gridInterComms;

            // This plugin arrangement could eventually be configurable rather than hardcoded here.           
            OGS1UserServices userServices = new OGS1UserServices(this);
            //userServices.AddPlugin(new TemporaryUserProfilePlugin());
            userServices.AddPlugin(new OGS1UserDataPlugin(this, configSettings));
            
            m_userService = userServices;
            m_messageService = userServices;
            m_avatarService = (IAvatarService)m_userService;

            PluginLoader<IInventoryStoragePlugin> loader = new PluginLoader<IInventoryStoragePlugin>();
            loader.Add("/OpenSim/InventoryStorage", new PluginProviderFilter(configSettings.InventoryPlugin));
            loader.Load();

            loader.Plugin.Initialize(configSettings);
        }
Exemple #16
0
        public CommunicationsLocal(
            ConfigSettings configSettings,                                   
            NetworkServersInfo serversInfo,
            LibraryRootFolder libraryRootFolder)
            : base(serversInfo, 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);                      
        }
        protected virtual void InitializeGridServices(LibraryRootFolder libraryRootFolder)
        {
            m_commsManager
                = new CommunicationsOGS1(m_openSim.NetServersInfo, m_httpServer, m_openSim.AssetCache, libraryRootFolder,
                    m_openSim.ConfigurationSettings);

            m_httpServer.AddStreamHandler(new OpenSim.SimStatusHandler());
            m_httpServer.AddStreamHandler(new OpenSim.XSimStatusHandler(m_openSim));
            if (m_openSim.userStatsURI != String.Empty )
                m_httpServer.AddStreamHandler(new OpenSim.UXSimStatusHandler(m_openSim));
        }
        /// <summary>
        /// Initializes the backend services for standalone mode, and registers some http handlers
        /// </summary>
        /// <param name="libraryRootFolder"></param>
        protected virtual void InitializeStandaloneServices(LibraryRootFolder libraryRootFolder)
        {
            m_commsManager
                = new CommunicationsLocal(
                    m_openSim.ConfigurationSettings, m_openSim.NetServersInfo, 
                    m_httpServer, m_openSim.AssetCache, libraryRootFolder);

            CreateGridInfoService();
        }
 protected void InitializeStandardServices(LibraryRootFolder libraryRootFolder)
 {
     // Standalone mode is determined by !startupConfig.GetBoolean("gridmode", false)
     if (m_openSim.ConfigurationSettings.Standalone)
     {
         InitializeStandaloneServices(libraryRootFolder);
     }
     else
     {
         // We are in grid mode
         InitializeGridServices(libraryRootFolder);
     }
 }
        protected void InitializeCommsManager(OpenSimBase openSim)
        {
            LibraryRootFolder libraryRootFolder = new LibraryRootFolder(m_openSim.ConfigurationSettings.LibrariesXMLFile);

            InitializeStandardServices(libraryRootFolder);

            openSim.CommunicationsManager = m_commsManager;
        }
Exemple #21
0
		/// <summary>
        /// Constructor
        /// </summary>
        /// <param name="userManager"></param>
        /// <param name="libraryRootFolder"></param>
        /// <param name="welcomeMess"></param>
        public LoginService(UserManagerBase userManager, LibraryRootFolder libraryRootFolder,
                            string welcomeMess, string mapServerURI)
        {
            m_userManager = userManager;
            m_libraryRootFolder = libraryRootFolder;

            if (welcomeMess != String.Empty)
                m_welcomeMessage = welcomeMess;
            if (mapServerURI != String.Empty)
                m_MapServerURI = mapServerURI;

            // For new users' first-time logins
            LoadDefaultLoginsFromFile(DEFAULT_LOGINS_FILE);
            // For returning users' where the preferred region is down
            LoadDefaultRegionsFromFile(DEFAULT_REGIONS_FILE);
            LoadStringListFromFile(_badViewerStrings, BAD_VIEWERS_FILE, "blacklisted viewer");
		}
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="commsManager"></param>
 /// <param name="libraryRootFolder"></param>
 public UserProfileCacheService(CommunicationsManager commsManager, LibraryRootFolder libraryRootFolder)
 {
     m_commsManager = commsManager;
     LibraryRoot    = libraryRootFolder;
 }
Exemple #23
0
 public UserLoginService(
     UserManagerBase userManager,
     LibraryRootFolder libraryRootFolder, string mapServerURI,
     UserConfig config, string welcomeMess, IRegionProfileRouter regionProfileService)
     : base(userManager, libraryRootFolder, welcomeMess, mapServerURI)
 {
     m_config = config;
     m_defaultHomeX = m_config.DefaultX;
     m_defaultHomeY = m_config.DefaultY;
     m_regionProfileService = regionProfileService;
 }
 protected void InitialiseHGServices(OpenSimBase openSim, LibraryRootFolder libraryRootFolder)
 {
     // Standalone mode is determined by !startupConfig.GetBoolean("gridmode", false)
     if (m_openSim.ConfigurationSettings.Standalone)
     {
         InitialiseHGStandaloneServices(libraryRootFolder);
     }
     else
     {
         // We are in grid mode
         InitialiseHGGridServices(libraryRootFolder);
     }
     HGCommands.HGServices = HGServices;
 }
        protected virtual void InitialiseHGGridServices(LibraryRootFolder libraryRootFolder)
        {
            m_commsManager 
                = new HGCommunicationsGridMode(
                    m_openSim.NetServersInfo,
                    m_openSim.SceneManager, libraryRootFolder);

            m_httpServer.AddStreamHandler(new OpenSim.SimStatusHandler());
            m_httpServer.AddStreamHandler(new OpenSim.XSimStatusHandler(m_openSim));
            if (m_openSim.userStatsURI != String.Empty)
                m_httpServer.AddStreamHandler(new OpenSim.UXSimStatusHandler(m_openSim));
        }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="serversInfo"></param>
 public CommunicationsManager(NetworkServersInfo serversInfo,
                              LibraryRootFolder libraryRootFolder)
 {
     m_networkServersInfo = serversInfo;
     m_userProfileCacheService = new UserProfileCacheService(this, libraryRootFolder);
 }
 public LocalInventoryService(LibraryRootFolder lib)
 {
     m_Library = lib;
 }
Exemple #28
0
 public UserLoginService(
     OpenSim.Framework.Communications.UserProfileManager userManager,
     LibraryRootFolder libraryRootFolder, string mapServerURI, string profileServerURI,
     UserConfig config, string welcomeMess, IRegionProfileRouter regionProfileService)
     : base(userManager, libraryRootFolder, welcomeMess, mapServerURI, profileServerURI)
 {
     m_config = config;
     m_defaultHomeX = m_config.DefaultX;
     m_defaultHomeY = m_config.DefaultY;
     m_regionProfileService = regionProfileService;
 }
        protected void InitialiseCommsManager(OpenSimBase openSim)
        {
            LibraryRootFolder libraryRootFolder = new LibraryRootFolder(m_openSim.ConfigurationSettings.LibrariesXMLFile);

            bool hgrid = m_openSim.ConfigSource.Source.Configs["Startup"].GetBoolean("hypergrid", false);

            if (hgrid)
            {
                InitialiseHGServices(openSim, libraryRootFolder);
            }
            else
            {
                InitialiseStandardServices(libraryRootFolder);
            }

            openSim.CommunicationsManager = m_commsManager;
        }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="commsManager"></param>
 /// <param name="libraryRootFolder"></param>
 public UserProfileCacheService(CommunicationsManager commsManager, LibraryRootFolder libraryRootFolder)
 {
     m_commsManager = commsManager;
     LibraryRoot = libraryRootFolder;
 }
 protected virtual void InitialiseHGStandaloneServices(LibraryRootFolder libraryRootFolder)
 {
     m_commsManager 
         = new HGCommunicationsStandalone(
             m_openSim.ConfigurationSettings, m_openSim.NetServersInfo, m_httpServer, 
             libraryRootFolder, false);
     
     CreateGridInfoService();
 }