From ade1acc9d449e08855701770f22bb824e2b1026e Mon Sep 17 00:00:00 2001 From: BlueWall Date: Sun, 1 Apr 2012 09:38:59 -0400 Subject: [PATCH] Making IntegrationService pluggable First steps to making a pluggable IntegrationService. --- .../IntegrationServiceBase.cs | 18 +++++++++++++++++- prebuild.xml | 1 + 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/OpenSim/Services/IntegrationService/IntegrationServiceBase.cs b/OpenSim/Services/IntegrationService/IntegrationServiceBase.cs index 2bf66e67e4..7d08576202 100644 --- a/OpenSim/Services/IntegrationService/IntegrationServiceBase.cs +++ b/OpenSim/Services/IntegrationService/IntegrationServiceBase.cs @@ -5,10 +5,21 @@ 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 { - public class IntegrationServiceBase : ServiceBase + [TypeExtensionPoint (Path="/OpenSim/IntegrationService", Name="IntegrationService")] + public interface IntegrationPlugin + { + void run(); + } + + + public class IntegrationServiceBase : ServiceBase { protected IPresenceService m_PresenceService; protected IGridService m_GridService; @@ -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) { diff --git a/prebuild.xml b/prebuild.xml index 9a0c94d676..eca2083325 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -1179,6 +1179,7 @@ +