* Adding some virtual hooks and making some privaets protected for great justice.

0.6.1-post-fixes
lbsa71 2008-11-25 11:46:15 +00:00
parent 0f5112ffff
commit dbe64197ae
4 changed files with 21 additions and 9 deletions

View File

@ -119,7 +119,7 @@ namespace OpenSim.Framework.Communications
}
// see IUserService
public UserProfileData GetUserProfile(UUID uuid)
public virtual UserProfileData GetUserProfile(UUID uuid)
{
foreach (IUserDataPlugin plugin in _plugins)
{

View File

@ -50,7 +50,7 @@ namespace OpenSim.Grid.UserServer
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private UserConfig Cfg;
protected UserConfig Cfg;
public UserManager m_userManager;
public UserLoginService m_loginService;
@ -72,13 +72,13 @@ namespace OpenSim.Grid.UserServer
userserver.Work();
}
private OpenUser_Main()
protected OpenUser_Main()
{
m_console = new ConsoleBase("User", this);
MainConsole.Instance = m_console;
}
private void Work()
public void Work()
{
m_console.Notice("Enter help for a list of commands\n");
@ -95,15 +95,16 @@ namespace OpenSim.Grid.UserServer
m_stats = StatsManager.StartCollectingUserStats();
m_log.Info("[REGION]: Establishing data connection");
m_userManager = new UserManager();
StartupUserManager();
m_userManager.AddPlugin(Cfg.DatabaseProvider, Cfg.DatabaseConnect);
m_gridInfoService = new GridInfoService();
m_interServiceInventoryService = new OGS1InterServiceInventoryService(Cfg.InventoryUrl);
m_loginService = new UserLoginService(
m_userManager, m_interServiceInventoryService, new LibraryRootFolder(), Cfg, Cfg.DefaultStartupMsg);
StartupLoginService();
m_messagesService = new MessageServersConnector();
@ -122,6 +123,17 @@ namespace OpenSim.Grid.UserServer
m_httpServer.Start();
}
protected virtual void StartupUserManager()
{
m_userManager = new UserManager();
}
protected virtual void StartupLoginService()
{
m_loginService = new UserLoginService(
m_userManager, m_interServiceInventoryService, new LibraryRootFolder(), Cfg, Cfg.DefaultStartupMsg);
}
protected void AddHttpHandlers()
{
m_httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod);

View File

@ -46,7 +46,7 @@ namespace OpenSim.Grid.UserServer
public class UserLoginService : LoginService
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
protected static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
protected IInterServiceInventoryServices m_inventoryService;

View File

@ -42,7 +42,7 @@ namespace OpenSim.Grid.UserServer
public class UserManager : UserManagerBase
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
protected static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public event logOffUser OnLogOffUser;
private logOffUser handlerLogOffUser;