diff options
author | BlueWall | 2012-10-19 07:38:36 -0400 |
---|---|---|
committer | BlueWall | 2012-10-19 07:38:36 -0400 |
commit | 99bb6c930479fedee4e55a662fa715702f6110b7 (patch) | |
tree | d532dc4d9cec78db47b15fb9ba301ca0d6ec1d47 /OpenSim/Server | |
parent | Add logging to help track sequence of events (diff) | |
download | opensim-SC-99bb6c930479fedee4e55a662fa715702f6110b7.zip opensim-SC-99bb6c930479fedee4e55a662fa715702f6110b7.tar.gz opensim-SC-99bb6c930479fedee4e55a662fa715702f6110b7.tar.bz2 opensim-SC-99bb6c930479fedee4e55a662fa715702f6110b7.tar.xz |
Move PluginManager
Move PluginManager out to OpenSimFramework for general use
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/PluginManager.cs (renamed from OpenSim/Server/Base/PluginManager.cs) | 12 | ||||
-rw-r--r-- | OpenSim/Server/Base/CommandManager.cs | 10 | ||||
-rw-r--r-- | OpenSim/Server/Base/ServerUtils.cs | 5 | ||||
-rw-r--r-- | OpenSim/Server/Handlers/Base/ServerConnector.cs | 8 |
4 files changed, 24 insertions, 11 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; | |||
38 | using Mono.Addins.Description; | 38 | using Mono.Addins.Description; |
39 | using OpenSim.Framework; | 39 | using OpenSim.Framework; |
40 | 40 | ||
41 | namespace OpenSim.Server.Base | 41 | |
42 | namespace 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; | |||
33 | using System.Collections.Generic; | 33 | using System.Collections.Generic; |
34 | using System.Collections.ObjectModel; | 34 | using System.Collections.ObjectModel; |
35 | using Mono.Addins; | 35 | using Mono.Addins; |
36 | using Mono.Addins.Setup; | 36 | // using Mono.Addins.Setup; |
37 | using Mono.Addins.Description; | 37 | using Mono.Addins.Description; |
38 | using OpenSim.Framework; | 38 | using OpenSim.Framework; |
39 | 39 | ||
40 | namespace OpenSim.Server.Base | 40 | namespace 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; |