diff options
author | Dan Lake | 2012-02-01 16:27:20 -0800 |
---|---|---|
committer | Dan Lake | 2012-02-01 17:01:28 -0800 |
commit | 0ce9ad4a56ecfcb021208acb4e9650612bc7e931 (patch) | |
tree | a565e63a471d62b83f5d07f8c0b721a52b213aba /OpenSim/Region/Framework/Scenes/EventManager.cs | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC_OLD-0ce9ad4a56ecfcb021208acb4e9650612bc7e931.zip opensim-SC_OLD-0ce9ad4a56ecfcb021208acb4e9650612bc7e931.tar.gz opensim-SC_OLD-0ce9ad4a56ecfcb021208acb4e9650612bc7e931.tar.bz2 opensim-SC_OLD-0ce9ad4a56ecfcb021208acb4e9650612bc7e931.tar.xz |
Add event RegionHeartbeatEnd for modules interested in coordinating activity with region heartbeats
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/EventManager.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/EventManager.cs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index 3d96f40..d31d380 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs | |||
@@ -407,6 +407,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
407 | public delegate void RegionStarted(Scene scene); | 407 | public delegate void RegionStarted(Scene scene); |
408 | public event RegionStarted OnRegionStarted; | 408 | public event RegionStarted OnRegionStarted; |
409 | 409 | ||
410 | public delegate void RegionHeartbeatEnd(Scene scene); | ||
411 | public event RegionHeartbeatEnd OnRegionHeartbeatEnd; | ||
412 | |||
410 | public delegate void LoginsEnabled(string regionName); | 413 | public delegate void LoginsEnabled(string regionName); |
411 | public event LoginsEnabled OnLoginsEnabled; | 414 | public event LoginsEnabled OnLoginsEnabled; |
412 | 415 | ||
@@ -2291,6 +2294,27 @@ namespace OpenSim.Region.Framework.Scenes | |||
2291 | } | 2294 | } |
2292 | } | 2295 | } |
2293 | 2296 | ||
2297 | public void TriggerRegionHeartbeatEnd(Scene scene) | ||
2298 | { | ||
2299 | RegionHeartbeatEnd handler = OnRegionHeartbeatEnd; | ||
2300 | |||
2301 | if (handler != null) | ||
2302 | { | ||
2303 | foreach (RegionHeartbeatEnd d in handler.GetInvocationList()) | ||
2304 | { | ||
2305 | try | ||
2306 | { | ||
2307 | d(scene); | ||
2308 | } | ||
2309 | catch (Exception e) | ||
2310 | { | ||
2311 | m_log.ErrorFormat("[EVENT MANAGER]: Delegate for OnRegionHeartbeatEnd failed - continuing {0} - {1}", | ||
2312 | e.Message, e.StackTrace); | ||
2313 | } | ||
2314 | } | ||
2315 | } | ||
2316 | } | ||
2317 | |||
2294 | public void TriggerLoginsEnabled (string regionName) | 2318 | public void TriggerLoginsEnabled (string regionName) |
2295 | { | 2319 | { |
2296 | LoginsEnabled handler = OnLoginsEnabled; | 2320 | LoginsEnabled handler = OnLoginsEnabled; |