Renamed IUGAIMCore to IGridServiceCore, still not really happy with this name as it could be confused with the Grid Server namespace or with the IGridService in the region servers.
parent
0f62b2bacb
commit
c856da2ee6
|
@ -1,40 +1,40 @@
|
|||
/*
|
||||
* Copyright (c) Contributors, http://opensimulator.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the OpenSimulator Project nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* 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
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using OpenSim.Framework.Servers;
|
||||
|
||||
namespace OpenSim.Grid.Framework
|
||||
{
|
||||
public interface IUGAIMCore
|
||||
{
|
||||
T Get<T>();
|
||||
void RegisterInterface<T>(T iface);
|
||||
bool TryGet<T>(out T iface);
|
||||
BaseHttpServer GetHttpServer();
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Copyright (c) Contributors, http://opensimulator.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the OpenSimulator Project nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* 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
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using OpenSim.Framework.Servers;
|
||||
|
||||
namespace OpenSim.Grid.Framework
|
||||
{
|
||||
public interface IGridServiceCore
|
||||
{
|
||||
T Get<T>();
|
||||
void RegisterInterface<T>(T iface);
|
||||
bool TryGet<T>(out T iface);
|
||||
BaseHttpServer GetHttpServer();
|
||||
}
|
||||
}
|
|
@ -6,7 +6,7 @@ namespace OpenSim.Grid.Framework
|
|||
public interface IGridServiceModule
|
||||
{
|
||||
void Close();
|
||||
void Initialise(IUGAIMCore core);
|
||||
void Initialise(IGridServiceCore core);
|
||||
void PostInitialise();
|
||||
void RegisterHandlers(BaseHttpServer httpServer);
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ namespace OpenSim.Grid.GridServer.Modules
|
|||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
protected GridDBService m_gridDBService;
|
||||
protected IUGAIMCore m_gridCore;
|
||||
protected IGridServiceCore m_gridCore;
|
||||
|
||||
protected GridConfig m_config;
|
||||
|
||||
|
@ -61,7 +61,7 @@ namespace OpenSim.Grid.GridServer.Modules
|
|||
{
|
||||
}
|
||||
|
||||
public void Initialise(string opensimVersion, GridDBService gridDBService, IUGAIMCore gridCore, GridConfig config)
|
||||
public void Initialise(string opensimVersion, GridDBService gridDBService, IGridServiceCore gridCore, GridConfig config)
|
||||
{
|
||||
m_opensimVersion = opensimVersion;
|
||||
m_gridDBService = gridDBService;
|
||||
|
|
|
@ -46,7 +46,7 @@ namespace OpenSim.Grid.GridServer.Modules
|
|||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private GridDBService m_gridDBService;
|
||||
private IUGAIMCore m_gridCore;
|
||||
private IGridServiceCore m_gridCore;
|
||||
|
||||
protected GridConfig m_config;
|
||||
|
||||
|
@ -67,7 +67,7 @@ namespace OpenSim.Grid.GridServer.Modules
|
|||
{
|
||||
}
|
||||
|
||||
public void Initialise(string opensimVersion, GridDBService gridDBService, IUGAIMCore gridCore, GridConfig config)
|
||||
public void Initialise(string opensimVersion, GridDBService gridDBService, IGridServiceCore gridCore, GridConfig config)
|
||||
{
|
||||
m_opensimVersion = opensimVersion;
|
||||
m_gridDBService = gridDBService;
|
||||
|
|
|
@ -47,7 +47,7 @@ namespace OpenSim.Grid.GridServer.Modules
|
|||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private GridDBService m_gridDBService;
|
||||
private IUGAIMCore m_gridCore;
|
||||
private IGridServiceCore m_gridCore;
|
||||
|
||||
protected GridConfig m_config;
|
||||
|
||||
|
@ -69,7 +69,7 @@ namespace OpenSim.Grid.GridServer.Modules
|
|||
{
|
||||
}
|
||||
|
||||
public void Initialise(string opensimVersion, GridDBService gridDBService, IUGAIMCore gridCore, GridConfig config)
|
||||
public void Initialise(string opensimVersion, GridDBService gridDBService, IGridServiceCore gridCore, GridConfig config)
|
||||
{
|
||||
m_opensimVersion = opensimVersion;
|
||||
m_gridDBService = gridDBService;
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace OpenSim.Grid.GridServer
|
|||
{
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public class GridServerBase : BaseOpenSimServer, IUGAIMCore
|
||||
public class GridServerBase : BaseOpenSimServer, IGridServiceCore
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
|
|
|
@ -50,12 +50,12 @@ namespace OpenSim.Grid.MessagingServer.Modules
|
|||
|
||||
private IMessageUserServerService m_userServerModule;
|
||||
|
||||
private IUGAIMCore m_messageCore;
|
||||
private IGridServiceCore m_messageCore;
|
||||
|
||||
// a dictionary of all current regions this server knows about
|
||||
private Dictionary<ulong, RegionProfileData> m_regionInfoCache = new Dictionary<ulong, RegionProfileData>();
|
||||
|
||||
public MessageRegionModule(MessageServerConfig config, IUGAIMCore messageCore)
|
||||
public MessageRegionModule(MessageServerConfig config, IGridServiceCore messageCore)
|
||||
{
|
||||
m_cfg = config;
|
||||
m_messageCore = messageCore;
|
||||
|
|
|
@ -49,7 +49,7 @@ namespace OpenSim.Grid.MessagingServer.Modules
|
|||
private MessageServerConfig m_cfg;
|
||||
private UserDataBaseService m_userDataBaseService;
|
||||
|
||||
private IUGAIMCore m_messageCore;
|
||||
private IGridServiceCore m_messageCore;
|
||||
|
||||
private IMessageUserServerService m_userServerModule;
|
||||
private IMessageRegionLookup m_regionModule;
|
||||
|
@ -57,7 +57,7 @@ namespace OpenSim.Grid.MessagingServer.Modules
|
|||
// a dictionary of all current presences this server knows about
|
||||
private Dictionary<UUID, UserPresenceData> m_presences = new Dictionary<UUID,UserPresenceData>();
|
||||
|
||||
public MessageService(MessageServerConfig cfg, IUGAIMCore messageCore, UserDataBaseService userDataBaseService)
|
||||
public MessageService(MessageServerConfig cfg, IGridServiceCore messageCore, UserDataBaseService userDataBaseService)
|
||||
{
|
||||
m_cfg = cfg;
|
||||
m_messageCore = messageCore;
|
||||
|
|
|
@ -48,11 +48,11 @@ namespace OpenSim.Grid.MessagingServer.Modules
|
|||
|
||||
private MessageServerConfig m_cfg;
|
||||
|
||||
private IUGAIMCore m_messageCore;
|
||||
private IGridServiceCore m_messageCore;
|
||||
|
||||
private Timer reconnectTimer = new Timer(300000); // 5 mins
|
||||
|
||||
public MessageUserServerModule(MessageServerConfig config, IUGAIMCore messageCore)
|
||||
public MessageUserServerModule(MessageServerConfig config, IGridServiceCore messageCore)
|
||||
{
|
||||
m_cfg = config;
|
||||
m_messageCore = messageCore;
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace OpenSim.Grid.MessagingServer
|
|||
{
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public class OpenMessage_Main : BaseOpenSimServer , IUGAIMCore
|
||||
public class OpenMessage_Main : BaseOpenSimServer , IGridServiceCore
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ namespace OpenSim.Grid.UserServer.Modules
|
|||
{
|
||||
public class GridInfoServiceModule
|
||||
{
|
||||
protected IUGAIMCore m_core;
|
||||
protected IGridServiceCore m_core;
|
||||
protected GridInfoService m_gridInfoService;
|
||||
protected BaseHttpServer m_httpServer;
|
||||
|
||||
|
@ -51,7 +51,7 @@ namespace OpenSim.Grid.UserServer.Modules
|
|||
{
|
||||
}
|
||||
|
||||
public void Initialise(IUGAIMCore core)
|
||||
public void Initialise(IGridServiceCore core)
|
||||
{
|
||||
m_core = core;
|
||||
m_gridInfoService = new GridInfoService();
|
||||
|
|
|
@ -79,7 +79,7 @@ namespace OpenSim.Grid.UserServer.Modules
|
|||
|
||||
Thread m_NotifyThread;
|
||||
|
||||
private IUGAIMCore m_core;
|
||||
private IGridServiceCore m_core;
|
||||
|
||||
public event AgentLocationDelegate OnAgentLocation;
|
||||
public event AgentLeavingDelegate OnAgentLeaving;
|
||||
|
@ -91,7 +91,7 @@ namespace OpenSim.Grid.UserServer.Modules
|
|||
MessageServers = new Dictionary<string, MessageServerInfo>();
|
||||
}
|
||||
|
||||
public void Initialise(IUGAIMCore core)
|
||||
public void Initialise(IGridServiceCore core)
|
||||
{
|
||||
m_core = core;
|
||||
m_core.RegisterInterface<MessageServersConnector>(this);
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace OpenSim.Grid.UserServer.Modules
|
|||
{
|
||||
public class UserDataBaseService : UserManagerBase
|
||||
{
|
||||
protected IUGAIMCore m_core;
|
||||
protected IGridServiceCore m_core;
|
||||
|
||||
public UserDataBaseService()
|
||||
: base(null)
|
||||
|
@ -53,7 +53,7 @@ namespace OpenSim.Grid.UserServer.Modules
|
|||
{
|
||||
}
|
||||
|
||||
public void Initialise(IUGAIMCore core)
|
||||
public void Initialise(IGridServiceCore core)
|
||||
{
|
||||
m_core = core;
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ namespace OpenSim.Grid.UserServer.Modules
|
|||
m_userDataBaseService = userDataBaseService;
|
||||
}
|
||||
|
||||
public void Initialise(IUGAIMCore core)
|
||||
public void Initialise(IGridServiceCore core)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ namespace OpenSim.Grid.UserServer.Modules
|
|||
m_userDataBaseService = userDataBaseService;
|
||||
}
|
||||
|
||||
public void Initialise(IUGAIMCore core)
|
||||
public void Initialise(IGridServiceCore core)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ namespace OpenSim.Grid.UserServer.Modules
|
|||
m_userDataBaseService = userDataBaseService;
|
||||
}
|
||||
|
||||
public void Initialise(IUGAIMCore core)
|
||||
public void Initialise(IGridServiceCore core)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace OpenSim.Grid.UserServer
|
|||
/// <summary>
|
||||
/// Grid user server main class
|
||||
/// </summary>
|
||||
public class OpenUser_Main : BaseOpenSimServer, IUGAIMCore
|
||||
public class OpenUser_Main : BaseOpenSimServer, IGridServiceCore
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
|
@ -128,6 +128,7 @@ namespace OpenSim.Grid.UserServer
|
|||
RegisterInterface<ConsoleBase>(m_console);
|
||||
RegisterInterface<UserConfig>(Cfg);
|
||||
|
||||
//Should be in modules?
|
||||
IInterServiceInventoryServices inventoryService = new OGS1InterServiceInventoryService(Cfg.InventoryUrl);
|
||||
// IRegionProfileService regionProfileService = new RegionProfileServiceProxy();
|
||||
|
||||
|
|
|
@ -57,13 +57,13 @@ namespace OpenSim.Grid.UserServer
|
|||
|
||||
protected UUID m_lastCreatedUser = UUID.Random();
|
||||
|
||||
protected IUGAIMCore m_core;
|
||||
protected IGridServiceCore m_core;
|
||||
|
||||
public UserServerCommandModule()
|
||||
{
|
||||
}
|
||||
|
||||
public void Initialise(IUGAIMCore core)
|
||||
public void Initialise(IGridServiceCore core)
|
||||
{
|
||||
m_core = core;
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ namespace OpenSim.Grid.UserServer
|
|||
m_loginService = loginService;
|
||||
}
|
||||
|
||||
public void Initialise(IUGAIMCore core)
|
||||
public void Initialise(IGridServiceCore core)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue