Pass server up to IntegrationService to allow pluggins to register their handlers
parent
445caca18b
commit
5c92aa262a
|
@ -28,7 +28,7 @@ namespace OpenSim.Server.Handlers.Integration
|
|||
if (service == String.Empty)
|
||||
throw new Exception("No LocalServiceModule in config file");
|
||||
|
||||
Object[] args = new Object[] { config };
|
||||
Object[] args = new Object[] { config, server };
|
||||
m_IntegrationService = ServerUtils.LoadPlugin<IIntegrationService>(service, args);
|
||||
|
||||
server.AddStreamHandler(new IntegrationServerHandler(m_IntegrationService));
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
using OpenSim.Server.Base;
|
||||
using OpenSim.Services.Interfaces;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Servers.HttpServer;
|
||||
using GridRegion = OpenSim.Services.Interfaces.GridRegion;
|
||||
using OpenMetaverse;
|
||||
using Nini.Config;
|
||||
|
@ -13,8 +14,8 @@ namespace OpenSim.Services.IntegrationService
|
|||
public class IntegrationService : IntegrationServiceBase, IIntegrationService
|
||||
{
|
||||
|
||||
public IntegrationService(IConfigSource config)
|
||||
: base(config)
|
||||
public IntegrationService(IConfigSource config, IHttpServer server)
|
||||
: base(config, server)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using OpenSim.Services.Interfaces;
|
||||
using OpenSim.Services.Base;
|
||||
using OpenSim.Framework.Servers.HttpServer;
|
||||
using System.Reflection;
|
||||
using Nini.Config;
|
||||
using OpenSim.Framework;
|
||||
|
@ -23,17 +24,24 @@ namespace OpenSim.Services.IntegrationService
|
|||
{
|
||||
protected IPresenceService m_PresenceService;
|
||||
protected IGridService m_GridService;
|
||||
protected IHttpServer m_Server;
|
||||
IConfig m_IntegrationServerConfig;
|
||||
|
||||
public IntegrationServiceBase(IConfigSource config)
|
||||
public IntegrationServiceBase(IConfigSource config, IHttpServer server)
|
||||
: base(config)
|
||||
{
|
||||
Object[] args = new Object[] { config };
|
||||
|
||||
|
||||
m_Server = server;
|
||||
|
||||
AddinManager.Initialize (".");
|
||||
AddinManager.Registry.Update ();
|
||||
foreach (IntegrationPlugin cmd in AddinManager.GetExtensionObjects("/OpenSim/IntegrationService"))
|
||||
cmd.run ();
|
||||
{
|
||||
cmd.run ();
|
||||
server.AddStreamHandler((IRequestHandler)cmd);
|
||||
}
|
||||
|
||||
m_IntegrationServerConfig = config.Configs["IntegrationService"];
|
||||
if (m_IntegrationServerConfig == null)
|
||||
|
|
Loading…
Reference in New Issue