Making IntegrationService pluggable

First steps to making a pluggable IntegrationService.
integration
BlueWall 2012-04-01 09:38:59 -04:00
parent e8eb9b7e84
commit ade1acc9d4
2 changed files with 18 additions and 1 deletions

View File

@ -5,9 +5,20 @@ using System.Reflection;
using Nini.Config;
using OpenSim.Framework;
using GridRegion = OpenSim.Services.Interfaces.GridRegion;
using Mono.Addins;
[assembly:AddinRoot ("IntegrationService", "1.0")]
namespace OpenSim.Services.IntegrationService
{
[TypeExtensionPoint (Path="/OpenSim/IntegrationService", Name="IntegrationService")]
public interface IntegrationPlugin
{
void run();
}
public class IntegrationServiceBase : ServiceBase
{
protected IPresenceService m_PresenceService;
@ -19,6 +30,11 @@ namespace OpenSim.Services.IntegrationService
{
Object[] args = new Object[] { config };
AddinManager.Initialize (".");
AddinManager.Registry.Update ();
foreach (IntegrationPlugin cmd in AddinManager.GetExtensionObjects("/OpenSim/IntegrationService"))
cmd.run ();
m_IntegrationServerConfig = config.Configs["IntegrationService"];
if (m_IntegrationServerConfig == null)
{

View File

@ -1179,6 +1179,7 @@
<Reference name="OpenSim.Server.Base"/>
<Reference name="Nini" path="../../../bin/"/>
<Reference name="log4net" path="../../../bin/"/>
<Reference name="Mono.Addins" path="../../../bin/"/>
<Files>
<Match pattern="*.cs" recurse="true"/>