diff options
Diffstat (limited to 'OpenSim/ApplicationPlugins')
-rw-r--r-- | OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs | 144 | ||||
-rw-r--r-- | OpenSim/ApplicationPlugins/CreateCommsManager/Resources/CreateCommsManagerPlugin.addin.xml | 11 |
2 files changed, 0 insertions, 155 deletions
diff --git a/OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs b/OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs deleted file mode 100644 index 3cd02f4..0000000 --- a/OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs +++ /dev/null | |||
@@ -1,144 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Reflection; | ||
31 | using log4net; | ||
32 | using OpenSim.Data; | ||
33 | using OpenSim.Framework; | ||
34 | using OpenSim.Framework.Communications; | ||
35 | using OpenSim.Framework.Communications.Cache; | ||
36 | using OpenSim.Framework.Communications.Osp; | ||
37 | using OpenSim.Framework.Servers; | ||
38 | using OpenSim.Framework.Servers.HttpServer; | ||
39 | |||
40 | namespace OpenSim.ApplicationPlugins.CreateCommsManager | ||
41 | { | ||
42 | public class CreateCommsManagerPlugin : IApplicationPlugin | ||
43 | { | ||
44 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
45 | |||
46 | #region IApplicationPlugin Members | ||
47 | |||
48 | // TODO: required by IPlugin, but likely not at all right | ||
49 | private string m_name = "CreateCommsManagerPlugin"; | ||
50 | private string m_version = "0.0"; | ||
51 | |||
52 | public string Version | ||
53 | { | ||
54 | get { return m_version; } | ||
55 | } | ||
56 | |||
57 | public string Name | ||
58 | { | ||
59 | get { return m_name; } | ||
60 | } | ||
61 | |||
62 | protected OpenSimBase m_openSim; | ||
63 | |||
64 | protected BaseHttpServer m_httpServer; | ||
65 | |||
66 | protected CommunicationsManager m_commsManager; | ||
67 | |||
68 | protected IRegionCreator m_regionCreator; | ||
69 | |||
70 | public void Initialise() | ||
71 | { | ||
72 | m_log.Info("[LOADREGIONS]: " + Name + " cannot be default-initialized!"); | ||
73 | throw new PluginNotInitialisedException(Name); | ||
74 | } | ||
75 | |||
76 | public void Initialise(OpenSimBase openSim) | ||
77 | { | ||
78 | m_openSim = openSim; | ||
79 | m_httpServer = openSim.HttpServer; | ||
80 | |||
81 | InitialiseCommsManager(openSim); | ||
82 | } | ||
83 | |||
84 | public void PostInitialise() | ||
85 | { | ||
86 | if (m_openSim.ApplicationRegistry.TryGet<IRegionCreator>(out m_regionCreator)) | ||
87 | { | ||
88 | m_regionCreator.OnNewRegionCreated += RegionCreated; | ||
89 | } | ||
90 | } | ||
91 | |||
92 | public void Dispose() | ||
93 | { | ||
94 | } | ||
95 | |||
96 | #endregion | ||
97 | |||
98 | private void RegionCreated(IScene scene) | ||
99 | { | ||
100 | } | ||
101 | |||
102 | protected void InitialiseCommsManager(OpenSimBase openSim) | ||
103 | { | ||
104 | LibraryRootFolder libraryRootFolder = new LibraryRootFolder(m_openSim.ConfigurationSettings.LibrariesXMLFile); | ||
105 | |||
106 | InitialiseStandardServices(libraryRootFolder); | ||
107 | |||
108 | openSim.CommunicationsManager = m_commsManager; | ||
109 | } | ||
110 | |||
111 | protected void InitialiseStandardServices(LibraryRootFolder libraryRootFolder) | ||
112 | { | ||
113 | // Standalone mode is determined by !startupConfig.GetBoolean("gridmode", false) | ||
114 | if (m_openSim.ConfigurationSettings.Standalone) | ||
115 | { | ||
116 | InitialiseStandaloneServices(libraryRootFolder); | ||
117 | } | ||
118 | else | ||
119 | { | ||
120 | // We are in grid mode | ||
121 | InitialiseGridServices(libraryRootFolder); | ||
122 | } | ||
123 | } | ||
124 | |||
125 | /// <summary> | ||
126 | /// Initialises the backend services for standalone mode, and registers some http handlers | ||
127 | /// </summary> | ||
128 | /// <param name="libraryRootFolder"></param> | ||
129 | protected virtual void InitialiseStandaloneServices(LibraryRootFolder libraryRootFolder) | ||
130 | { | ||
131 | |||
132 | CreateGridInfoService(); | ||
133 | } | ||
134 | |||
135 | protected virtual void InitialiseGridServices(LibraryRootFolder libraryRootFolder) | ||
136 | { | ||
137 | |||
138 | } | ||
139 | |||
140 | private void CreateGridInfoService() | ||
141 | { | ||
142 | } | ||
143 | } | ||
144 | } | ||
diff --git a/OpenSim/ApplicationPlugins/CreateCommsManager/Resources/CreateCommsManagerPlugin.addin.xml b/OpenSim/ApplicationPlugins/CreateCommsManager/Resources/CreateCommsManagerPlugin.addin.xml deleted file mode 100644 index ec042f3..0000000 --- a/OpenSim/ApplicationPlugins/CreateCommsManager/Resources/CreateCommsManagerPlugin.addin.xml +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | <Addin id="OpenSim.ApplicationPlugins.CreateCommsManager" version="0.1"> | ||
2 | <Runtime> | ||
3 | <Import assembly="OpenSim.ApplicationPlugins.CreateCommsManager.dll"/> | ||
4 | </Runtime> | ||
5 | <Dependencies> | ||
6 | <Addin id="OpenSim" version="0.5" /> | ||
7 | </Dependencies> | ||
8 | <Extension path = "/OpenSim/Startup"> | ||
9 | <Plugin id="CreateCommsManager" type="OpenSim.ApplicationPlugins.CreateCommsManager.CreateCommsManagerPlugin" /> | ||
10 | </Extension> | ||
11 | </Addin> | ||