aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorBlueWall2012-10-19 07:38:36 -0400
committerBlueWall2012-10-19 07:38:36 -0400
commit99bb6c930479fedee4e55a662fa715702f6110b7 (patch)
treed532dc4d9cec78db47b15fb9ba301ca0d6ec1d47
parentAdd logging to help track sequence of events (diff)
downloadopensim-SC_OLD-99bb6c930479fedee4e55a662fa715702f6110b7.zip
opensim-SC_OLD-99bb6c930479fedee4e55a662fa715702f6110b7.tar.gz
opensim-SC_OLD-99bb6c930479fedee4e55a662fa715702f6110b7.tar.bz2
opensim-SC_OLD-99bb6c930479fedee4e55a662fa715702f6110b7.tar.xz
Move PluginManager
Move PluginManager out to OpenSimFramework for general use
-rw-r--r--OpenSim/Framework/PluginManager.cs (renamed from OpenSim/Server/Base/PluginManager.cs)12
-rw-r--r--OpenSim/Server/Base/CommandManager.cs10
-rw-r--r--OpenSim/Server/Base/ServerUtils.cs5
-rw-r--r--OpenSim/Server/Handlers/Base/ServerConnector.cs8
-rw-r--r--prebuild.xml2
5 files changed, 25 insertions, 12 deletions
diff --git a/OpenSim/Server/Base/PluginManager.cs b/OpenSim/Framework/PluginManager.cs
index d2cf668..188d90a 100644
--- a/OpenSim/Server/Base/PluginManager.cs
+++ b/OpenSim/Framework/PluginManager.cs
@@ -38,13 +38,17 @@ using Mono.Addins.Setup;
38using Mono.Addins.Description; 38using Mono.Addins.Description;
39using OpenSim.Framework; 39using OpenSim.Framework;
40 40
41namespace OpenSim.Server.Base 41
42namespace OpenSim.Framework
42{ 43{
44 /// <summary>
45 /// Manager for registries and plugins
46 /// </summary>
43 public class PluginManager : SetupService 47 public class PluginManager : SetupService
44 { 48 {
45 protected AddinRegistry PluginRegistry; 49 public AddinRegistry PluginRegistry;
46 50
47 internal PluginManager(AddinRegistry registry): base (registry) 51 public PluginManager(AddinRegistry registry): base (registry)
48 { 52 {
49 PluginRegistry = registry; 53 PluginRegistry = registry;
50 54
@@ -554,4 +558,4 @@ namespace OpenSim.Server.Base
554 } 558 }
555 #endregion Util 559 #endregion Util
556 } 560 }
557} \ No newline at end of file 561}
diff --git a/OpenSim/Server/Base/CommandManager.cs b/OpenSim/Server/Base/CommandManager.cs
index 45652b3..88aac00 100644
--- a/OpenSim/Server/Base/CommandManager.cs
+++ b/OpenSim/Server/Base/CommandManager.cs
@@ -33,15 +33,21 @@ using System.Collections;
33using System.Collections.Generic; 33using System.Collections.Generic;
34using System.Collections.ObjectModel; 34using System.Collections.ObjectModel;
35using Mono.Addins; 35using Mono.Addins;
36using Mono.Addins.Setup; 36// using Mono.Addins.Setup;
37using Mono.Addins.Description; 37using Mono.Addins.Description;
38using OpenSim.Framework; 38using OpenSim.Framework;
39 39
40namespace OpenSim.Server.Base 40namespace OpenSim.Server.Base
41{ 41{
42 /// <summary>
43 /// Command manager -
44 /// Wrapper for OpenSim.Framework.PluginManager to allow
45 /// us to add commands to the console to perform operations
46 /// on our repos and plugins
47 /// </summary>
42 public class CommandManager 48 public class CommandManager
43 { 49 {
44 protected AddinRegistry PluginRegistry; 50 public AddinRegistry PluginRegistry;
45 protected PluginManager PluginManager; 51 protected PluginManager PluginManager;
46 52
47 public CommandManager(AddinRegistry registry) 53 public CommandManager(AddinRegistry registry)
diff --git a/OpenSim/Server/Base/ServerUtils.cs b/OpenSim/Server/Base/ServerUtils.cs
index 8ecf3d3..31b0446 100644
--- a/OpenSim/Server/Base/ServerUtils.cs
+++ b/OpenSim/Server/Base/ServerUtils.cs
@@ -111,17 +111,18 @@ namespace OpenSim.Server.Base
111 case ExtensionChange.Add: 111 case ExtensionChange.Add:
112 if (a.AddinFile.Contains(Registry.DefaultAddinsFolder)) 112 if (a.AddinFile.Contains(Registry.DefaultAddinsFolder))
113 { 113 {
114 m_log.InfoFormat("[SERVER]: Adding {0}", a.Name); 114 m_log.InfoFormat("[SERVER]: Adding {0} from registry", a.Name);
115 connector.PluginPath = String.Format("{0}/{1}", Registry.DefaultAddinsFolder, a.Name.Replace(',', '.')); 115 connector.PluginPath = String.Format("{0}/{1}", Registry.DefaultAddinsFolder, a.Name.Replace(',', '.'));
116 } 116 }
117 else 117 else
118 { 118 {
119 m_log.InfoFormat("[SERVER]: Removing {0}", a.Name); 119 m_log.InfoFormat("[SERVER]: Adding {0} from ./bin", a.Name);
120 connector.PluginPath = a.AddinFile; 120 connector.PluginPath = a.AddinFile;
121 } 121 }
122 LoadPlugin(connector); 122 LoadPlugin(connector);
123 break; 123 break;
124 case ExtensionChange.Remove: 124 case ExtensionChange.Remove:
125 m_log.InfoFormat("[SERVER]: Removing {0}", a.Name);
125 UnloadPlugin(connector); 126 UnloadPlugin(connector);
126 break; 127 break;
127 } 128 }
diff --git a/OpenSim/Server/Handlers/Base/ServerConnector.cs b/OpenSim/Server/Handlers/Base/ServerConnector.cs
index 067fd2a..72014db 100644
--- a/OpenSim/Server/Handlers/Base/ServerConnector.cs
+++ b/OpenSim/Server/Handlers/Base/ServerConnector.cs
@@ -41,8 +41,7 @@ namespace OpenSim.Server.Handlers.Base
41 { 41 {
42 public virtual string ConfigURL 42 public virtual string ConfigURL
43 { 43 {
44 get; 44 get { return String.Empty; }
45 protected set;
46 } 45 }
47 46
48 public virtual string ConfigName 47 public virtual string ConfigName
@@ -95,7 +94,10 @@ namespace OpenSim.Server.Handlers.Base
95 return config; 94 return config;
96 } 95 }
97 96
98 // We get our remote initial configuration for bootstrapping 97 // We get our remote initial configuration for bootstrapping in case
98 // we have no configuration in our main file or in an existing
99 // modular config file. This is the last resort to bootstrap the
100 // configuration, likely a new plugin loading for the first time.
99 private IConfigSource GetConfigSource() 101 private IConfigSource GetConfigSource()
100 { 102 {
101 IConfigSource source = null; 103 IConfigSource source = null;
diff --git a/prebuild.xml b/prebuild.xml
index 82c4dc9..6c58e38 100644
--- a/prebuild.xml
+++ b/prebuild.xml
@@ -105,6 +105,7 @@
105 <Reference name="Nini" path="../../bin/"/> 105 <Reference name="Nini" path="../../bin/"/>
106 <Reference name="log4net" path="../../bin/"/> 106 <Reference name="log4net" path="../../bin/"/>
107 <Reference name="Mono.Addins" path="../../bin/"/> 107 <Reference name="Mono.Addins" path="../../bin/"/>
108 <Reference name="Mono.Addins.Setup" path="../../bin/"/>
108 <Reference name="SmartThreadPool"/> 109 <Reference name="SmartThreadPool"/>
109 <Files> 110 <Files>
110 <Match pattern="*.cs" recurse="false"/> 111 <Match pattern="*.cs" recurse="false"/>
@@ -737,7 +738,6 @@
737 <Reference name="OpenMetaverse.StructuredData" path="../../../bin/"/> 738 <Reference name="OpenMetaverse.StructuredData" path="../../../bin/"/>
738 <Reference name="OpenMetaverse" path="../../../bin/"/> 739 <Reference name="OpenMetaverse" path="../../../bin/"/>
739 <Reference name="Mono.Addins" path="../../../bin/"/> 740 <Reference name="Mono.Addins" path="../../../bin/"/>
740 <Reference name="Mono.Addins.Setup" path="../../../bin/"/>
741 <Reference name="OpenSim.Framework"/> 741 <Reference name="OpenSim.Framework"/>
742 <Reference name="OpenSim.Framework.Console"/> 742 <Reference name="OpenSim.Framework.Console"/>
743 <Reference name="OpenSim.Framework.Servers"/> 743 <Reference name="OpenSim.Framework.Servers"/>