Removing the OpenSim.SimulatorServices project. All of those region modules are now in CoreModules/ServiceConnectorsIn, where they belong.

0.6.6-post-fixes
diva 2009-06-15 00:17:17 +00:00
parent 380f59d0ff
commit 54d44e370b
9 changed files with 488 additions and 509 deletions

View File

@ -30,6 +30,12 @@
<RegionModule id="RemoteNeighbourServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Neighbour.RemoteNeighbourServicesConnector" /> <RegionModule id="RemoteNeighbourServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Neighbour.RemoteNeighbourServicesConnector" />
<RegionModule id="LocalLandServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Land.LocalLandServicesConnector" /> <RegionModule id="LocalLandServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Land.LocalLandServicesConnector" />
<RegionModule id="RemoteLandServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Land.RemoteLandServicesConnector" /> <RegionModule id="RemoteLandServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Land.RemoteLandServicesConnector" />
<!-- Service connectors IN modules -->
<RegionModule id="RegionAssetService" type="OpenSim.Region.CoreModules.ServiceConnectorsIn.Asset.RegionAssetService" />
<RegionModule id="RegionInventoryService" type="OpenSim.Region.CoreModules.ServiceConnectorsIn.Inventory.RegionInventoryService" />
<RegionModule id="LandServiceInConnectorModule" type="OpenSim.Region.CoreModules.ServiceConnectorsIn.Land.LandServiceInConnectorModule" />
<RegionModule id="NeighbourServiceInConnectorModule" type="OpenSim.Region.CoreModules.ServiceConnectorsIn.Neighbour.NeighbourServiceInConnectorModule" /> \
</Extension> </Extension>
<Extension path = "/OpenSim/WindModule"> <Extension path = "/OpenSim/WindModule">

View File

@ -1,103 +1,113 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright * * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the * * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products * names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
using System; using System;
using System.Reflection; using System.Reflection;
using System.Collections.Generic; using System.Collections.Generic;
using log4net; using log4net;
using Nini.Config; using Nini.Config;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Framework.Servers.HttpServer; using OpenSim.Framework.Servers.HttpServer;
using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Interfaces;
using OpenSim.Server.Base; using OpenSim.Server.Base;
using OpenSim.Server.Handlers.Base; using OpenSim.Server.Handlers.Base;
namespace OpenSim.SimulatorServices namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Asset
{ {
public class RegionAssetService : ISharedRegionModule public class RegionAssetService : ISharedRegionModule
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private static bool enabled = false; private static bool m_Enabled = false;
private IConfigSource m_Config; private IConfigSource m_Config;
bool m_Registered = false; bool m_Registered = false;
#region IRegionModule interface #region IRegionModule interface
public void Initialise(IConfigSource config) public void Initialise(IConfigSource config)
{ {
// This module is only on for standalones in hypergrid mode //// This module is only on for standalones in hypergrid mode
enabled = ((!config.Configs["Startup"].GetBoolean("gridmode", true)) && //enabled = ((!config.Configs["Startup"].GetBoolean("gridmode", true)) &&
config.Configs["Startup"].GetBoolean("hypergrid", true)) || // config.Configs["Startup"].GetBoolean("hypergrid", true)) ||
((config.Configs["MXP"] != null) && config.Configs["MXP"].GetBoolean("Enabled", true)); // ((config.Configs["MXP"] != null) && config.Configs["MXP"].GetBoolean("Enabled", true));
m_log.DebugFormat("[RegionAssetService]: enabled? {0}", enabled); //m_log.DebugFormat("[RegionAssetService]: enabled? {0}", enabled);
m_Config = config; m_Config = config;
} IConfig moduleConfig = config.Configs["Modules"];
if (moduleConfig != null)
public void PostInitialise() {
{ m_Enabled = moduleConfig.GetBoolean("AssetServiceInConnector", false);
} if (m_Enabled)
{
public void Close() m_log.Info("[ASSET IN CONNECTOR]: AssetServiceInConnector enabled");
{ }
}
}
public string Name }
{
get { return "RegionAssetService"; } public void PostInitialise()
} {
}
public void AddRegion(Scene scene)
{ public void Close()
if (!enabled) {
return; }
if (!m_Registered) public string Name
{ {
m_Registered = true; get { return "RegionAssetService"; }
}
m_log.Info("[RegionAssetService]: Starting...");
public void AddRegion(Scene scene)
Object[] args = new Object[] { m_Config, scene.CommsManager.HttpServer }; {
if (!m_Enabled)
ServerUtils.LoadPlugin<IServiceConnector>("OpenSim.Server.Handlers.dll:AssetServiceConnector", args); return;
}
} if (!m_Registered)
{
public void RemoveRegion(Scene scene) m_Registered = true;
{
} m_log.Info("[RegionAssetService]: Starting...");
public void RegionLoaded(Scene scene) Object[] args = new Object[] { m_Config, scene.CommsManager.HttpServer };
{
} ServerUtils.LoadPlugin<IServiceConnector>("OpenSim.Server.Handlers.dll:AssetServiceConnector", args);
}
#endregion }
} public void RemoveRegion(Scene scene)
} {
}
public void RegionLoaded(Scene scene)
{
}
#endregion
}
}

View File

@ -1,102 +1,113 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright * * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the * * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products * names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
using System; using System;
using System.Reflection; using System.Reflection;
using System.Collections.Generic; using System.Collections.Generic;
using log4net; using log4net;
using Nini.Config; using Nini.Config;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Framework.Servers.HttpServer; using OpenSim.Framework.Servers.HttpServer;
using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Interfaces;
using OpenSim.Server.Base; using OpenSim.Server.Base;
using OpenSim.Server.Handlers.Base; using OpenSim.Server.Handlers.Base;
namespace OpenSim.SimulatorServices namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Inventory
{ {
public class RegionInventoryService : ISharedRegionModule public class RegionInventoryService : ISharedRegionModule
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private static bool enabled = false; private static bool m_Enabled = false;
private IConfigSource m_Config; private IConfigSource m_Config;
bool m_Registered = false; bool m_Registered = false;
#region IRegionModule interface #region IRegionModule interface
public void Initialise(IConfigSource config) public void Initialise(IConfigSource config)
{ {
// This module is only on for standalones in hypergrid mode //// This module is only on for standalones in hypergrid mode
enabled = (!config.Configs["Startup"].GetBoolean("gridmode", true)) && //enabled = (!config.Configs["Startup"].GetBoolean("gridmode", true)) &&
config.Configs["Startup"].GetBoolean("hypergrid", true); // config.Configs["Startup"].GetBoolean("hypergrid", true);
m_log.DebugFormat("[RegionInventoryService]: enabled? {0}", enabled); //m_log.DebugFormat("[RegionInventoryService]: enabled? {0}", enabled);
m_Config = config; m_Config = config;
} IConfig moduleConfig = config.Configs["Modules"];
if (moduleConfig != null)
public void PostInitialise() {
{ m_Enabled = moduleConfig.GetBoolean("InventoryServiceInConnector", false);
} if (m_Enabled)
{
public void Close() m_log.Info("[INVENTORY IN CONNECTOR]: Inventory Service In Connector enabled");
{ }
}
}
public string Name
{ }
get { return "RegionInventoryService"; }
} public void PostInitialise()
{
public void AddRegion(Scene scene) }
{
if (!enabled) public void Close()
return; {
}
if (!m_Registered)
{ public string Name
m_Registered = true; {
get { return "RegionInventoryService"; }
m_log.Info("[RegionInventoryService]: Starting..."); }
Object[] args = new Object[] { m_Config, scene.CommsManager.HttpServer }; public void AddRegion(Scene scene)
{
ServerUtils.LoadPlugin<IServiceConnector>("OpenSim.Server.Handlers.dll:InventoryServiceInConnector", args); if (!m_Enabled)
} return;
}
if (!m_Registered)
public void RemoveRegion(Scene scene) {
{ m_Registered = true;
}
m_log.Info("[RegionInventoryService]: Starting...");
public void RegionLoaded(Scene scene)
{ Object[] args = new Object[] { m_Config, scene.CommsManager.HttpServer };
}
ServerUtils.LoadPlugin<IServiceConnector>("OpenSim.Server.Handlers.dll:InventoryServiceInConnector", args);
#endregion }
}
}
} public void RemoveRegion(Scene scene)
{
}
public void RegionLoaded(Scene scene)
{
}
#endregion
}
}

View File

@ -39,7 +39,7 @@ using OpenSim.Server.Handlers.Base;
using OpenSim.Services.Interfaces; using OpenSim.Services.Interfaces;
namespace OpenSim.SimulatorServices namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Land
{ {
public class LandServiceInConnectorModule : ISharedRegionModule, ILandService public class LandServiceInConnectorModule : ISharedRegionModule, ILandService
{ {

View File

@ -1,137 +1,137 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright * * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the * * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products * names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
using System; using System;
using System.Reflection; using System.Reflection;
using System.Collections.Generic; using System.Collections.Generic;
using log4net; using log4net;
using Nini.Config; using Nini.Config;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Framework.Servers.HttpServer; using OpenSim.Framework.Servers.HttpServer;
using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Interfaces;
using OpenSim.Server.Base; using OpenSim.Server.Base;
using OpenSim.Server.Handlers.Base; using OpenSim.Server.Handlers.Base;
using OpenSim.Services.Interfaces; using OpenSim.Services.Interfaces;
namespace OpenSim.SimulatorServices namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Neighbour
{ {
public class NeighbourServiceInConnectorModule : ISharedRegionModule, INeighbourService public class NeighbourServiceInConnectorModule : ISharedRegionModule, INeighbourService
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private static bool m_Enabled = false; private static bool m_Enabled = false;
private static bool m_Registered = false; private static bool m_Registered = false;
private IConfigSource m_Config; private IConfigSource m_Config;
private List<Scene> m_Scenes = new List<Scene>(); private List<Scene> m_Scenes = new List<Scene>();
#region IRegionModule interface #region IRegionModule interface
public void Initialise(IConfigSource config) public void Initialise(IConfigSource config)
{ {
m_Config = config; m_Config = config;
IConfig moduleConfig = config.Configs["Modules"]; IConfig moduleConfig = config.Configs["Modules"];
if (moduleConfig != null) if (moduleConfig != null)
{ {
m_Enabled = moduleConfig.GetBoolean("NeighbourServiceInConnector", false); m_Enabled = moduleConfig.GetBoolean("NeighbourServiceInConnector", false);
if (m_Enabled) if (m_Enabled)
{ {
m_log.Info("[NEIGHBOUR IN CONNECTOR]: NeighbourServiceInConnector enabled"); m_log.Info("[NEIGHBOUR IN CONNECTOR]: NeighbourServiceInConnector enabled");
} }
} }
} }
public void PostInitialise() public void PostInitialise()
{ {
if (!m_Enabled) if (!m_Enabled)
return; return;
m_log.Info("[NEIGHBOUR IN CONNECTOR]: Starting..."); m_log.Info("[NEIGHBOUR IN CONNECTOR]: Starting...");
} }
public void Close() public void Close()
{ {
} }
public string Name public string Name
{ {
get { return "NeighbourServiceInConnectorModule"; } get { return "NeighbourServiceInConnectorModule"; }
} }
public void AddRegion(Scene scene) public void AddRegion(Scene scene)
{ {
if (!m_Enabled) if (!m_Enabled)
return; return;
if (!m_Registered) if (!m_Registered)
{ {
m_Registered = true; m_Registered = true;
Object[] args = new Object[] { m_Config, scene.CommsManager.HttpServer, this, scene }; Object[] args = new Object[] { m_Config, scene.CommsManager.HttpServer, this, scene };
ServerUtils.LoadPlugin<IServiceConnector>("OpenSim.Server.Handlers.dll:NeighbourServiceInConnector", args); ServerUtils.LoadPlugin<IServiceConnector>("OpenSim.Server.Handlers.dll:NeighbourServiceInConnector", args);
} }
m_Scenes.Add(scene); m_Scenes.Add(scene);
} }
public void RemoveRegion(Scene scene) public void RemoveRegion(Scene scene)
{ {
if (m_Enabled && m_Scenes.Contains(scene)) if (m_Enabled && m_Scenes.Contains(scene))
m_Scenes.Remove(scene); m_Scenes.Remove(scene);
} }
public void RegionLoaded(Scene scene) public void RegionLoaded(Scene scene)
{ {
} }
#endregion #endregion
#region INeighbourService #region INeighbourService
public bool HelloNeighbour(ulong regionHandle, RegionInfo thisRegion) public bool HelloNeighbour(ulong regionHandle, RegionInfo thisRegion)
{ {
m_log.DebugFormat("[NEIGHBOUR IN CONNECTOR]: HelloNeighbour from {0}, to {1}. Count = {2}", m_log.DebugFormat("[NEIGHBOUR IN CONNECTOR]: HelloNeighbour from {0}, to {1}. Count = {2}",
thisRegion.RegionName, regionHandle, m_Scenes.Count); thisRegion.RegionName, regionHandle, m_Scenes.Count);
foreach (Scene s in m_Scenes) foreach (Scene s in m_Scenes)
{ {
if (s.RegionInfo.RegionHandle == regionHandle) if (s.RegionInfo.RegionHandle == regionHandle)
{ {
m_log.Debug("[NEIGHBOUR IN CONNECTOR]: Found region to SendHelloNeighbour"); m_log.Debug("[NEIGHBOUR IN CONNECTOR]: Found region to SendHelloNeighbour");
return s.IncomingHelloNeighbour(thisRegion); return s.IncomingHelloNeighbour(thisRegion);
} }
} }
m_log.DebugFormat("[NEIGHBOUR IN CONNECTOR]: region handle {0} not found", regionHandle); m_log.DebugFormat("[NEIGHBOUR IN CONNECTOR]: region handle {0} not found", regionHandle);
return false; return false;
} }
#endregion INeighbourService #endregion INeighbourService
} }
} }

View File

@ -1,112 +1,113 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright * * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the * * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products * names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
using System; using System;
using System.Reflection; using System.Reflection;
using System.Collections.Generic; using System.Collections.Generic;
using log4net; using log4net;
using Nini.Config; using Nini.Config;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Framework.Servers.HttpServer; using OpenSim.Framework.Servers.HttpServer;
using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Interfaces;
using OpenSim.Server.Base; using OpenSim.Server.Base;
using OpenSim.Server.Handlers.Base; using OpenSim.Server.Handlers.Base;
namespace OpenSim.SimulatorServices namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Simulation
{ {
public class SimulationService : ISharedRegionModule // Under construction
{ public class SimulationServiceInConnectorModule : ISharedRegionModule
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); {
private static bool m_Enabled = false; private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private static bool m_Enabled = false;
private IConfigSource m_Config;
bool m_Registered = false; private IConfigSource m_Config;
bool m_Registered = false;
#region IRegionModule interface
#region IRegionModule interface
public void Initialise(IConfigSource config)
{ public void Initialise(IConfigSource config)
m_Config = config; {
m_Config = config;
IConfig moduleConfig = config.Configs["Modules"];
if (moduleConfig != null) IConfig moduleConfig = config.Configs["Modules"];
{ if (moduleConfig != null)
string name = moduleConfig.GetString("SimulationService", ""); {
if (name == Name) string name = moduleConfig.GetString("SimulationService", "");
{ if (name == Name)
m_Enabled = true; {
m_log.Info("[SIM SERVICE]: SimulationService enabled"); m_Enabled = true;
m_log.Info("[SIM SERVICE]: SimulationService enabled");
}
} }
}
}
}
public void PostInitialise()
{ public void PostInitialise()
} {
}
public void Close()
{ public void Close()
} {
}
public string Name
{ public string Name
get { return "SimulationService"; } {
} get { return "SimulationService"; }
}
public void AddRegion(Scene scene)
{ public void AddRegion(Scene scene)
if (!m_Enabled) {
return; if (!m_Enabled)
return;
if (!m_Registered)
{ if (!m_Registered)
m_Registered = true; {
m_Registered = true;
m_log.Info("[SIM SERVICE]: Starting...");
m_log.Info("[SIM SERVICE]: Starting...");
Object[] args = new Object[] { m_Config, scene.CommsManager.HttpServer, scene };
Object[] args = new Object[] { m_Config, scene.CommsManager.HttpServer, scene };
ServerUtils.LoadPlugin<IServiceConnector>("OpenSim.Server.Handlers.dll:SimulationServiceInConnector", args);
} ServerUtils.LoadPlugin<IServiceConnector>("OpenSim.Server.Handlers.dll:SimulationServiceInConnector", args);
} }
}
public void RemoveRegion(Scene scene)
{ public void RemoveRegion(Scene scene)
} {
}
public void RegionLoaded(Scene scene)
{ public void RegionLoaded(Scene scene)
} {
}
#endregion
#endregion
}
} }
}

View File

@ -1,17 +0,0 @@
<Addin id="OpenSim.SimulatorServices" version="0.2">
<Runtime>
<Import assembly="OpenSim.SimulatorServices.dll"/>
</Runtime>
<Dependencies>
<Addin id="OpenSim" version="0.5" />
</Dependencies>
<Extension path = "/OpenSim/RegionModules">
<RegionModule id="RegionAssetService" type="OpenSim.SimulatorServices.RegionAssetService" />
<RegionModule id="RegionInventoryService" type="OpenSim.SimulatorServices.RegionInventoryService" />
<RegionModule id="NeighbourServiceInConnectorModule" type="OpenSim.SimulatorServices.NeighbourServiceInConnectorModule" />
<RegionModule id="LandServiceInConnectorModule" type="OpenSim.SimulatorServices.LandServiceInConnectorModule" />
</Extension>
</Addin>

View File

@ -11,9 +11,11 @@
AssetServices = "HGAssetBroker" AssetServices = "HGAssetBroker"
InventoryServices = "HGInventoryBroker" InventoryServices = "HGInventoryBroker"
NeighbourServices = "LocalNeighbourServicesConnector" NeighbourServices = "LocalNeighbourServicesConnector"
InventoryServiceInConnector = true
AssetServiceInConnector = true
[AssetService] [AssetService]
; For the RegionAssetService ; For the AssetServiceInConnector
LocalServiceModule = "OpenSim.Services.AssetService.dll:AssetService" LocalServiceModule = "OpenSim.Services.AssetService.dll:AssetService"
; For HGAssetBroker ; For HGAssetBroker
@ -21,7 +23,7 @@
HypergridAssetService = "OpenSim.Services.AssetService.dll:HGAssetService" HypergridAssetService = "OpenSim.Services.AssetService.dll:HGAssetService"
[InventoryService] [InventoryService]
; For the RegionInventoryService ; For the InventoryServiceInConnector
LocalServiceModule = "OpenSim.Services.InventoryService.dll:InventoryService" LocalServiceModule = "OpenSim.Services.InventoryService.dll:InventoryService"
; For HGInventoryBroker ; For HGInventoryBroker

View File

@ -1547,6 +1547,7 @@
<Reference name="OpenSim.Data" /> <Reference name="OpenSim.Data" />
<Reference name="OpenSim.Region.Framework" /> <Reference name="OpenSim.Region.Framework" />
<Reference name="OpenSim.Server.Base" /> <Reference name="OpenSim.Server.Base" />
<Reference name="OpenSim.Server.Handlers" />
<Reference name="OpenSim.Services.Connectors" /> <Reference name="OpenSim.Services.Connectors" />
<Reference name="OpenSim.Services.Base" /> <Reference name="OpenSim.Services.Base" />
<Reference name="OpenSim.Services.Interfaces" /> <Reference name="OpenSim.Services.Interfaces" />
@ -1657,41 +1658,6 @@
</Files> </Files>
</Project> </Project>
<Project name="OpenSim.SimulatorServices" path="OpenSim/SimulatorServices" type="Library">
<Configuration name="Debug">
<Options>
<OutputPath>../../bin/</OutputPath>
</Options>
</Configuration>
<Configuration name="Release">
<Options>
<OutputPath>../../bin/</OutputPath>
</Options>
</Configuration>
<ReferencePath>../../bin/</ReferencePath>
<Reference name="System"/>
<Reference name="OpenSim.Framework"/>
<Reference name="OpenSim.Framework.Communications"/>
<Reference name="OpenSim.Framework.Servers.HttpServer" />
<Reference name="OpenSim.Region.Framework" />
<Reference name="OpenSim.Services.Interfaces"/>
<Reference name="OpenSim.Server.Base"/>
<Reference name="OpenSim.Server.Handlers"/>
<Reference name="Mono.Addins.dll" />
<Reference name="XMLRPC.dll"/>
<Reference name="Nini.dll" />
<Reference name="log4net.dll"/>
<Files>
<Match pattern="*.cs" recurse="true">
<Exclude name="Tests" pattern="Tests" />
</Match>
<Match pattern="*.addin.xml" path="Resources" buildAction="EmbeddedResource" recurse="true"/>
</Files>
</Project>
<Project name="OpenSim.Region.Communications.Hypergrid" path="OpenSim/Region/Communications/Hypergrid" type="Library"> <Project name="OpenSim.Region.Communications.Hypergrid" path="OpenSim/Region/Communications/Hypergrid" type="Library">
<Configuration name="Debug"> <Configuration name="Debug">
<Options> <Options>