diff options
author | Justin Clarke Casey | 2008-02-04 16:22:58 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-02-04 16:22:58 +0000 |
commit | a1c9349d4765833691e7816d7f4df7bd37b9ee36 (patch) | |
tree | 2e108496bc6761f6ed1ec671a97bf6b4ba5e6137 /OpenSim/Grid/UserServer | |
parent | * Added note in CONTRIBUTORS.txt for _someone/mikkopa - RealXtend (diff) | |
download | opensim-SC_OLD-a1c9349d4765833691e7816d7f4df7bd37b9ee36.zip opensim-SC_OLD-a1c9349d4765833691e7816d7f4df7bd37b9ee36.tar.gz opensim-SC_OLD-a1c9349d4765833691e7816d7f4df7bd37b9ee36.tar.bz2 opensim-SC_OLD-a1c9349d4765833691e7816d7f4df7bd37b9ee36.tar.xz |
Refactor only: serve stats objects directly through StatsManager singleton
Diffstat (limited to 'OpenSim/Grid/UserServer')
-rw-r--r-- | OpenSim/Grid/UserServer/Main.cs | 12 | ||||
-rw-r--r-- | OpenSim/Grid/UserServer/UserLoginService.cs | 4 | ||||
-rw-r--r-- | OpenSim/Grid/UserServer/UserManager.cs | 11 |
3 files changed, 8 insertions, 19 deletions
diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs index 2650694..20828ba 100644 --- a/OpenSim/Grid/UserServer/Main.cs +++ b/OpenSim/Grid/UserServer/Main.cs | |||
@@ -46,9 +46,7 @@ namespace OpenSim.Grid.UserServer | |||
46 | 46 | ||
47 | public UserManager m_userManager; | 47 | public UserManager m_userManager; |
48 | public UserLoginService m_loginService; | 48 | public UserLoginService m_loginService; |
49 | public MessageServersConnector m_messagesService; | 49 | public MessageServersConnector m_messagesService; |
50 | |||
51 | protected UserStatsReporter m_stats; | ||
52 | 50 | ||
53 | private LogBase m_console; | 51 | private LogBase m_console; |
54 | private LLUUID m_lastCreatedUser = LLUUID.Random(); | 52 | private LLUUID m_lastCreatedUser = LLUUID.Random(); |
@@ -89,15 +87,15 @@ namespace OpenSim.Grid.UserServer | |||
89 | { | 87 | { |
90 | Cfg = new UserConfig("USER SERVER", (Path.Combine(Util.configDir(), "UserServer_Config.xml"))); | 88 | Cfg = new UserConfig("USER SERVER", (Path.Combine(Util.configDir(), "UserServer_Config.xml"))); |
91 | 89 | ||
92 | m_stats = new UserStatsReporter(); | 90 | StatsManager.StartCollectingUserStats(); |
93 | 91 | ||
94 | MainLog.Instance.Verbose("REGION", "Establishing data connection"); | 92 | MainLog.Instance.Verbose("REGION", "Establishing data connection"); |
95 | m_userManager = new UserManager(m_stats); | 93 | m_userManager = new UserManager(); |
96 | m_userManager._config = Cfg; | 94 | m_userManager._config = Cfg; |
97 | m_userManager.AddPlugin(Cfg.DatabaseProvider); | 95 | m_userManager.AddPlugin(Cfg.DatabaseProvider); |
98 | 96 | ||
99 | m_loginService = new UserLoginService( | 97 | m_loginService = new UserLoginService( |
100 | m_userManager, new LibraryRootFolder(), m_stats, Cfg, Cfg.DefaultStartupMsg); | 98 | m_userManager, new LibraryRootFolder(), Cfg, Cfg.DefaultStartupMsg); |
101 | 99 | ||
102 | m_messagesService = new MessageServersConnector(MainLog.Instance); | 100 | m_messagesService = new MessageServersConnector(MainLog.Instance); |
103 | 101 | ||
@@ -199,7 +197,7 @@ namespace OpenSim.Grid.UserServer | |||
199 | break; | 197 | break; |
200 | 198 | ||
201 | case "stats": | 199 | case "stats": |
202 | MainLog.Instance.Notice("STATS", Environment.NewLine + m_stats.Report()); | 200 | MainLog.Instance.Notice("STATS", Environment.NewLine + StatsManager.UserStats.Report()); |
203 | break; | 201 | break; |
204 | 202 | ||
205 | case "test-inventory": | 203 | case "test-inventory": |
diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs index 0f02ad2..10f9468 100644 --- a/OpenSim/Grid/UserServer/UserLoginService.cs +++ b/OpenSim/Grid/UserServer/UserLoginService.cs | |||
@@ -55,8 +55,8 @@ namespace OpenSim.Grid.UserServer | |||
55 | 55 | ||
56 | public UserLoginService( | 56 | public UserLoginService( |
57 | UserManagerBase userManager, LibraryRootFolder libraryRootFolder, | 57 | UserManagerBase userManager, LibraryRootFolder libraryRootFolder, |
58 | UserStatsReporter statsCollector, UserConfig config, string welcomeMess) | 58 | UserConfig config, string welcomeMess) |
59 | : base(userManager, libraryRootFolder, statsCollector, welcomeMess) | 59 | : base(userManager, libraryRootFolder, welcomeMess) |
60 | { | 60 | { |
61 | m_config = config; | 61 | m_config = config; |
62 | } | 62 | } |
diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs index 778aec1..c36de7f 100644 --- a/OpenSim/Grid/UserServer/UserManager.cs +++ b/OpenSim/Grid/UserServer/UserManager.cs | |||
@@ -38,16 +38,7 @@ using OpenSim.Framework.UserManagement; | |||
38 | namespace OpenSim.Grid.UserServer | 38 | namespace OpenSim.Grid.UserServer |
39 | { | 39 | { |
40 | public class UserManager : UserManagerBase | 40 | public class UserManager : UserManagerBase |
41 | { | 41 | { |
42 | /// <summary> | ||
43 | /// Constructor. | ||
44 | /// </summary> | ||
45 | /// <param name="statsCollector">Can be null if stats collection is not required. | ||
46 | /// </param> | ||
47 | public UserManager(UserStatsReporter statsCollector) : base(statsCollector) | ||
48 | { | ||
49 | } | ||
50 | |||
51 | /// <summary> | 42 | /// <summary> |
52 | /// Deletes an active agent session | 43 | /// Deletes an active agent session |
53 | /// </summary> | 44 | /// </summary> |