aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie2010-01-11 05:13:47 +0000
committerMelanie2010-01-11 05:13:47 +0000
commitca75ad674315d924397576219f3bd3c5e1a75146 (patch)
tree2ec6fc565f8ba628660bcc26ef44fa9e9f2f12f9
parentRefactor. Instantiate sim status handlers in opensim base, not in a plugin (diff)
downloadopensim-SC_OLD-ca75ad674315d924397576219f3bd3c5e1a75146.zip
opensim-SC_OLD-ca75ad674315d924397576219f3bd3c5e1a75146.tar.gz
opensim-SC_OLD-ca75ad674315d924397576219f3bd3c5e1a75146.tar.bz2
opensim-SC_OLD-ca75ad674315d924397576219f3bd3c5e1a75146.tar.xz
Remove CreateCommsManagerPlugin
Diffstat (limited to '')
-rw-r--r--OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs144
-rw-r--r--OpenSim/ApplicationPlugins/CreateCommsManager/Resources/CreateCommsManagerPlugin.addin.xml11
-rw-r--r--prebuild.xml43
3 files changed, 0 insertions, 198 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
28using System;
29using System.Collections.Generic;
30using System.Reflection;
31using log4net;
32using OpenSim.Data;
33using OpenSim.Framework;
34using OpenSim.Framework.Communications;
35using OpenSim.Framework.Communications.Cache;
36using OpenSim.Framework.Communications.Osp;
37using OpenSim.Framework.Servers;
38using OpenSim.Framework.Servers.HttpServer;
39
40namespace 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>
diff --git a/prebuild.xml b/prebuild.xml
index 33af554..fbb782a 100644
--- a/prebuild.xml
+++ b/prebuild.xml
@@ -1693,49 +1693,6 @@
1693 </Files> 1693 </Files>
1694 </Project> 1694 </Project>
1695 1695
1696 <Project frameworkVersion="v3_5" name="OpenSim.ApplicationPlugins.CreateCommsManager" path="OpenSim/ApplicationPlugins/CreateCommsManager" type="Library">
1697 <Configuration name="Debug">
1698 <Options>
1699 <OutputPath>../../../bin/</OutputPath>
1700 </Options>
1701 </Configuration>
1702 <Configuration name="Release">
1703 <Options>
1704 <OutputPath>../../../bin/</OutputPath>
1705 </Options>
1706 </Configuration>
1707
1708 <ReferencePath>../../../bin/</ReferencePath>
1709 <Reference name="Mono.Addins.dll" />
1710 <Reference name="System"/>
1711 <Reference name="System.Xml"/>
1712 <Reference name="OpenMetaverseTypes.dll" />
1713 <Reference name="OpenMetaverse.StructuredData.dll"/>
1714 <Reference name="Nini.dll" />
1715 <Reference name="OpenSim"/>
1716 <Reference name="OpenSim.Data"/>
1717 <Reference name="OpenSim.Region.ClientStack"/>
1718 <Reference name="OpenSim.Region.CoreModules"/>
1719 <Reference name="OpenSim.Region.Framework"/>
1720 <Reference name="OpenSim.Framework"/>
1721 <Reference name="OpenSim.Framework.Console"/>
1722 <Reference name="OpenSim.Framework.RegionLoader.Filesystem"/>
1723 <Reference name="OpenSim.Framework.RegionLoader.Web"/>
1724 <Reference name="OpenSim.Framework.Servers"/>
1725 <Reference name="OpenSim.Framework.Servers.HttpServer"/>
1726 <Reference name="log4net.dll"/>
1727 <Reference name="OpenSim.Region.Communications.OGS1"/>
1728 <Reference name="XMLRPC.dll"/>
1729 <Reference name="OpenSim.Region.Communications.Local"/>
1730 <Reference name="OpenSim.Region.Communications.Hypergrid"/>
1731 <Reference name="OpenSim.Framework.Communications"/>
1732
1733 <Files>
1734 <Match pattern="*.cs" recurse="true"/>
1735 <Match pattern="*.addin.xml" path="Resources" buildAction="EmbeddedResource" recurse="true"/>
1736 </Files>
1737 </Project>
1738
1739 <Project frameworkVersion="v3_5" name="OpenSim.ApplicationPlugins.RemoteController" path="OpenSim/ApplicationPlugins/RemoteController" type="Library"> 1696 <Project frameworkVersion="v3_5" name="OpenSim.ApplicationPlugins.RemoteController" path="OpenSim/ApplicationPlugins/RemoteController" type="Library">
1740 <Configuration name="Debug"> 1697 <Configuration name="Debug">
1741 <Options> 1698 <Options>