diff options
author | Melanie | 2009-09-29 09:56:17 +0100 |
---|---|---|
committer | Melanie | 2009-09-29 09:56:17 +0100 |
commit | 691f1e8aa08db84b689793ea9cd2c72bcfdd9b17 (patch) | |
tree | bccc5f146d169c14615384d60d94f1ae3f79f354 /OpenSim | |
parent | Fixed a bug that was causing exceptions to the thrown in ROBUST MainServer. (diff) | |
download | opensim-SC_OLD-691f1e8aa08db84b689793ea9cd2c72bcfdd9b17.zip opensim-SC_OLD-691f1e8aa08db84b689793ea9cd2c72bcfdd9b17.tar.gz opensim-SC_OLD-691f1e8aa08db84b689793ea9cd2c72bcfdd9b17.tar.bz2 opensim-SC_OLD-691f1e8aa08db84b689793ea9cd2c72bcfdd9b17.tar.xz |
Fix loading modules with alternate configurations and ports into ROBUST.
Make all current modules support the configuration name option
Diffstat (limited to 'OpenSim')
14 files changed, 75 insertions, 55 deletions
diff --git a/OpenSim/Server/Base/HttpServerBase.cs b/OpenSim/Server/Base/HttpServerBase.cs index 6a1f37c..ed0210f 100644 --- a/OpenSim/Server/Base/HttpServerBase.cs +++ b/OpenSim/Server/Base/HttpServerBase.cs | |||
@@ -41,7 +41,7 @@ namespace OpenSim.Server.Base | |||
41 | { | 41 | { |
42 | // Logger | 42 | // Logger |
43 | // | 43 | // |
44 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 44 | private static readonly ILog m_Log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
45 | 45 | ||
46 | // The http server instance | 46 | // The http server instance |
47 | // | 47 | // |
@@ -55,8 +55,14 @@ namespace OpenSim.Server.Base | |||
55 | get { return m_HttpServer; } | 55 | get { return m_HttpServer; } |
56 | } | 56 | } |
57 | 57 | ||
58 | public uint DefaultPort | ||
59 | { | ||
60 | get { return m_Port; } | ||
61 | } | ||
62 | |||
58 | public IHttpServer GetHttpServer(uint port) | 63 | public IHttpServer GetHttpServer(uint port) |
59 | { | 64 | { |
65 | m_Log.InfoFormat("[SERVER]: Requested port {0}", port); | ||
60 | if (port == m_Port) | 66 | if (port == m_Port) |
61 | return HttpServer; | 67 | return HttpServer; |
62 | 68 | ||
@@ -64,6 +70,8 @@ namespace OpenSim.Server.Base | |||
64 | return m_Servers[port]; | 70 | return m_Servers[port]; |
65 | 71 | ||
66 | m_Servers[port] = new BaseHttpServer(port); | 72 | m_Servers[port] = new BaseHttpServer(port); |
73 | m_Servers[port].Start(); | ||
74 | |||
67 | return m_Servers[port]; | 75 | return m_Servers[port]; |
68 | } | 76 | } |
69 | 77 | ||
diff --git a/OpenSim/Server/Base/ServerUtils.cs b/OpenSim/Server/Base/ServerUtils.cs index 656fcf5..2340645 100644 --- a/OpenSim/Server/Base/ServerUtils.cs +++ b/OpenSim/Server/Base/ServerUtils.cs | |||
@@ -141,7 +141,9 @@ namespace OpenSim.Server.Base | |||
141 | } | 141 | } |
142 | catch (Exception e) | 142 | catch (Exception e) |
143 | { | 143 | { |
144 | m_log.ErrorFormat("Error loading plugin from {0}, exception {1}", dllName, e.InnerException); | 144 | if (!(e is System.MissingMethodException)) |
145 | m_log.ErrorFormat("Error loading plugin from {0}, exception {1}", dllName, e.InnerException); | ||
146 | return null; | ||
145 | } | 147 | } |
146 | 148 | ||
147 | return plug; | 149 | return plug; |
diff --git a/OpenSim/Server/Handlers/Asset/AssetServerConnector.cs b/OpenSim/Server/Handlers/Asset/AssetServerConnector.cs index 7c74e05..f7eb292 100644 --- a/OpenSim/Server/Handlers/Asset/AssetServerConnector.cs +++ b/OpenSim/Server/Handlers/Asset/AssetServerConnector.cs | |||
@@ -37,13 +37,17 @@ namespace OpenSim.Server.Handlers.Asset | |||
37 | public class AssetServiceConnector : ServiceConnector | 37 | public class AssetServiceConnector : ServiceConnector |
38 | { | 38 | { |
39 | private IAssetService m_AssetService; | 39 | private IAssetService m_AssetService; |
40 | private string m_ConfigName = "AssetService"; | ||
40 | 41 | ||
41 | public AssetServiceConnector(IConfigSource config, IHttpServer server) : | 42 | public AssetServiceConnector(IConfigSource config, IHttpServer server, string configName) : |
42 | base(config, server) | 43 | base(config, server, configName) |
43 | { | 44 | { |
44 | IConfig serverConfig = config.Configs["AssetService"]; | 45 | if (configName != String.Empty) |
46 | m_ConfigName = configName; | ||
47 | |||
48 | IConfig serverConfig = config.Configs[m_ConfigName]; | ||
45 | if (serverConfig == null) | 49 | if (serverConfig == null) |
46 | throw new Exception("No section 'Server' in config file"); | 50 | throw new Exception(String.Format("No section '{0}' in config file", m_ConfigName)); |
47 | 51 | ||
48 | string assetService = serverConfig.GetString("LocalServiceModule", | 52 | string assetService = serverConfig.GetString("LocalServiceModule", |
49 | String.Empty); | 53 | String.Empty); |
@@ -55,7 +59,6 @@ namespace OpenSim.Server.Handlers.Asset | |||
55 | m_AssetService = | 59 | m_AssetService = |
56 | ServerUtils.LoadPlugin<IAssetService>(assetService, args); | 60 | ServerUtils.LoadPlugin<IAssetService>(assetService, args); |
57 | 61 | ||
58 | //System.Console.WriteLine("XXXXXXXXXXXXXXXXXXX m_AssetSetvice == null? " + ((m_AssetService == null) ? "yes" : "no")); | ||
59 | server.AddStreamHandler(new AssetServerGetHandler(m_AssetService)); | 62 | server.AddStreamHandler(new AssetServerGetHandler(m_AssetService)); |
60 | server.AddStreamHandler(new AssetServerPostHandler(m_AssetService)); | 63 | server.AddStreamHandler(new AssetServerPostHandler(m_AssetService)); |
61 | server.AddStreamHandler(new AssetServerDeleteHandler(m_AssetService)); | 64 | server.AddStreamHandler(new AssetServerDeleteHandler(m_AssetService)); |
diff --git a/OpenSim/Server/Handlers/Authentication/AuthenticationServerConnector.cs b/OpenSim/Server/Handlers/Authentication/AuthenticationServerConnector.cs index 589dc3b..2abef0a 100644 --- a/OpenSim/Server/Handlers/Authentication/AuthenticationServerConnector.cs +++ b/OpenSim/Server/Handlers/Authentication/AuthenticationServerConnector.cs | |||
@@ -37,13 +37,17 @@ namespace OpenSim.Server.Handlers.Authentication | |||
37 | public class AuthenticationServiceConnector : ServiceConnector | 37 | public class AuthenticationServiceConnector : ServiceConnector |
38 | { | 38 | { |
39 | private IAuthenticationService m_AuthenticationService; | 39 | private IAuthenticationService m_AuthenticationService; |
40 | private string m_ConfigName = "AuthenticationService"; | ||
40 | 41 | ||
41 | public AuthenticationServiceConnector(IConfigSource config, IHttpServer server) : | 42 | public AuthenticationServiceConnector(IConfigSource config, IHttpServer server, string configName) : |
42 | base(config, server) | 43 | base(config, server, configName) |
43 | { | 44 | { |
44 | IConfig serverConfig = config.Configs["AuthenticationService"]; | 45 | if (configName != String.Empty) |
46 | m_ConfigName = configName; | ||
47 | |||
48 | IConfig serverConfig = config.Configs[m_ConfigName]; | ||
45 | if (serverConfig == null) | 49 | if (serverConfig == null) |
46 | throw new Exception("No section 'Server' in config file"); | 50 | throw new Exception(String.Format("No section '{0}' in config file", m_ConfigName)); |
47 | 51 | ||
48 | string authenticationService = serverConfig.GetString("AuthenticationServiceModule", | 52 | string authenticationService = serverConfig.GetString("AuthenticationServiceModule", |
49 | String.Empty); | 53 | String.Empty); |
diff --git a/OpenSim/Server/Handlers/Authorization/AuthorizationServerConnector.cs b/OpenSim/Server/Handlers/Authorization/AuthorizationServerConnector.cs index 0d9f239..20fd0f7 100644 --- a/OpenSim/Server/Handlers/Authorization/AuthorizationServerConnector.cs +++ b/OpenSim/Server/Handlers/Authorization/AuthorizationServerConnector.cs | |||
@@ -37,13 +37,16 @@ namespace OpenSim.Server.Handlers.Authorization | |||
37 | public class AuthorizationServerConnector : ServiceConnector | 37 | public class AuthorizationServerConnector : ServiceConnector |
38 | { | 38 | { |
39 | private IAuthorizationService m_AuthorizationService; | 39 | private IAuthorizationService m_AuthorizationService; |
40 | private string m_ConfigName = "AuthorizationService"; | ||
40 | 41 | ||
41 | public AuthorizationServerConnector(IConfigSource config, IHttpServer server) : | 42 | public AuthorizationServerConnector(IConfigSource config, IHttpServer server, string configName) : |
42 | base(config, server) | 43 | base(config, server, configName) |
43 | { | 44 | { |
44 | IConfig serverConfig = config.Configs["AuthorizationService"]; | 45 | if (configName != String.Empty) |
46 | m_ConfigName = configName; | ||
47 | IConfig serverConfig = config.Configs[m_ConfigName]; | ||
45 | if (serverConfig == null) | 48 | if (serverConfig == null) |
46 | throw new Exception("No section 'Server' in config file"); | 49 | throw new Exception(String.Format("No section '{0}' in config file", m_ConfigName)); |
47 | 50 | ||
48 | string authorizationService = serverConfig.GetString("LocalServiceModule", | 51 | string authorizationService = serverConfig.GetString("LocalServiceModule", |
49 | String.Empty); | 52 | String.Empty); |
diff --git a/OpenSim/Server/Handlers/Base/ServerConnector.cs b/OpenSim/Server/Handlers/Base/ServerConnector.cs index 62fe773..71876da 100644 --- a/OpenSim/Server/Handlers/Base/ServerConnector.cs +++ b/OpenSim/Server/Handlers/Base/ServerConnector.cs | |||
@@ -39,7 +39,7 @@ namespace OpenSim.Server.Handlers.Base | |||
39 | 39 | ||
40 | public class ServiceConnector : IServiceConnector | 40 | public class ServiceConnector : IServiceConnector |
41 | { | 41 | { |
42 | public ServiceConnector(IConfigSource config, IHttpServer server) | 42 | public ServiceConnector(IConfigSource config, IHttpServer server, string configName) |
43 | { | 43 | { |
44 | } | 44 | } |
45 | } | 45 | } |
diff --git a/OpenSim/Server/Handlers/Freeswitch/FreeswitchServerConnector.cs b/OpenSim/Server/Handlers/Freeswitch/FreeswitchServerConnector.cs index a4ab0d3..07bafc8 100644 --- a/OpenSim/Server/Handlers/Freeswitch/FreeswitchServerConnector.cs +++ b/OpenSim/Server/Handlers/Freeswitch/FreeswitchServerConnector.cs | |||
@@ -37,19 +37,23 @@ namespace OpenSim.Server.Handlers.Freeswitch | |||
37 | public class FreeswitchServerConnector : ServiceConnector | 37 | public class FreeswitchServerConnector : ServiceConnector |
38 | { | 38 | { |
39 | private IFreeswitchService m_FreeswitchService; | 39 | private IFreeswitchService m_FreeswitchService; |
40 | private string m_ConfigName = "FreeswitchService"; | ||
40 | 41 | ||
41 | public FreeswitchServerConnector(IConfigSource config, IHttpServer server) : | 42 | public FreeswitchServerConnector(IConfigSource config, IHttpServer server, string configName) : |
42 | base(config, server) | 43 | base(config, server, configName) |
43 | { | 44 | { |
44 | IConfig serverConfig = config.Configs["FreeswitchService"]; | 45 | if (configName != String.Empty) |
46 | m_ConfigName = configName; | ||
47 | |||
48 | IConfig serverConfig = config.Configs[m_ConfigName]; | ||
45 | if (serverConfig == null) | 49 | if (serverConfig == null) |
46 | throw new Exception("No section 'Server' in config file"); | 50 | throw new Exception(String.Format("No section '{0}' in config file", m_ConfigName)); |
47 | 51 | ||
48 | string freeswitchService = serverConfig.GetString("LocalServiceModule", | 52 | string freeswitchService = serverConfig.GetString("LocalServiceModule", |
49 | String.Empty); | 53 | String.Empty); |
50 | 54 | ||
51 | if (freeswitchService == String.Empty) | 55 | if (freeswitchService == String.Empty) |
52 | throw new Exception("No FreeswitchService in config file"); | 56 | throw new Exception("No LocalServiceModule in config file"); |
53 | 57 | ||
54 | Object[] args = new Object[] { config }; | 58 | Object[] args = new Object[] { config }; |
55 | m_FreeswitchService = | 59 | m_FreeswitchService = |
diff --git a/OpenSim/Server/Handlers/Grid/GridServerConnector.cs b/OpenSim/Server/Handlers/Grid/GridServerConnector.cs index ebdf489..14daf12 100644 --- a/OpenSim/Server/Handlers/Grid/GridServerConnector.cs +++ b/OpenSim/Server/Handlers/Grid/GridServerConnector.cs | |||
@@ -37,19 +37,20 @@ namespace OpenSim.Server.Handlers.Grid | |||
37 | public class GridServiceConnector : ServiceConnector | 37 | public class GridServiceConnector : ServiceConnector |
38 | { | 38 | { |
39 | private IGridService m_GridService; | 39 | private IGridService m_GridService; |
40 | private string m_ConfigName = "GridService"; | ||
40 | 41 | ||
41 | public GridServiceConnector(IConfigSource config, IHttpServer server) : | 42 | public GridServiceConnector(IConfigSource config, IHttpServer server, string configName) : |
42 | base(config, server) | 43 | base(config, server, configName) |
43 | { | 44 | { |
44 | IConfig serverConfig = config.Configs["GridService"]; | 45 | IConfig serverConfig = config.Configs[m_ConfigName]; |
45 | if (serverConfig == null) | 46 | if (serverConfig == null) |
46 | throw new Exception("No section 'Server' in config file"); | 47 | throw new Exception(String.Format("No section {0} in config file", m_ConfigName)); |
47 | 48 | ||
48 | string gridService = serverConfig.GetString("LocalServiceModule", | 49 | string gridService = serverConfig.GetString("LocalServiceModule", |
49 | String.Empty); | 50 | String.Empty); |
50 | 51 | ||
51 | if (gridService == String.Empty) | 52 | if (gridService == String.Empty) |
52 | throw new Exception("No GridService in config file"); | 53 | throw new Exception("No LocalServiceModule in config file"); |
53 | 54 | ||
54 | Object[] args = new Object[] { config }; | 55 | Object[] args = new Object[] { config }; |
55 | m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args); | 56 | m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args); |
diff --git a/OpenSim/Server/Handlers/Grid/HypergridServerConnector.cs b/OpenSim/Server/Handlers/Grid/HypergridServerConnector.cs index ad63485..e226759 100644 --- a/OpenSim/Server/Handlers/Grid/HypergridServerConnector.cs +++ b/OpenSim/Server/Handlers/Grid/HypergridServerConnector.cs | |||
@@ -51,7 +51,7 @@ namespace OpenSim.Server.Handlers.Grid | |||
51 | private List<SimpleRegionInfo> m_RegionsOnSim = new List<SimpleRegionInfo>(); | 51 | private List<SimpleRegionInfo> m_RegionsOnSim = new List<SimpleRegionInfo>(); |
52 | 52 | ||
53 | public HypergridServiceInConnector(IConfigSource config, IHttpServer server) : | 53 | public HypergridServiceInConnector(IConfigSource config, IHttpServer server) : |
54 | base(config, server) | 54 | base(config, server, String.Empty) |
55 | { | 55 | { |
56 | server.AddXmlRPCHandler("linkk_region", LinkRegionRequest, false); | 56 | server.AddXmlRPCHandler("linkk_region", LinkRegionRequest, false); |
57 | } | 57 | } |
diff --git a/OpenSim/Server/Handlers/Inventory/InventoryServerInConnector.cs b/OpenSim/Server/Handlers/Inventory/InventoryServerInConnector.cs index 998b322..ca45263 100644 --- a/OpenSim/Server/Handlers/Inventory/InventoryServerInConnector.cs +++ b/OpenSim/Server/Handlers/Inventory/InventoryServerInConnector.cs | |||
@@ -54,19 +54,20 @@ namespace OpenSim.Server.Handlers.Inventory | |||
54 | //private AuthedSessionCache m_session_cache = new AuthedSessionCache(INVENTORY_DEFAULT_SESSION_TIME); | 54 | //private AuthedSessionCache m_session_cache = new AuthedSessionCache(INVENTORY_DEFAULT_SESSION_TIME); |
55 | 55 | ||
56 | private string m_userserver_url; | 56 | private string m_userserver_url; |
57 | private string m_ConfigName = "InventoryService"; | ||
57 | 58 | ||
58 | public InventoryServiceInConnector(IConfigSource config, IHttpServer server) : | 59 | public InventoryServiceInConnector(IConfigSource config, IHttpServer server, string configName) : |
59 | base(config, server) | 60 | base(config, server, configName) |
60 | { | 61 | { |
61 | IConfig serverConfig = config.Configs["InventoryService"]; | 62 | IConfig serverConfig = config.Configs[m_ConfigName]; |
62 | if (serverConfig == null) | 63 | if (serverConfig == null) |
63 | throw new Exception("No section 'InventoryService' in config file"); | 64 | throw new Exception(String.Format("No section '{0}' in config file", m_ConfigName)); |
64 | 65 | ||
65 | string inventoryService = serverConfig.GetString("LocalServiceModule", | 66 | string inventoryService = serverConfig.GetString("LocalServiceModule", |
66 | String.Empty); | 67 | String.Empty); |
67 | 68 | ||
68 | if (inventoryService == String.Empty) | 69 | if (inventoryService == String.Empty) |
69 | throw new Exception("No InventoryService in config file"); | 70 | throw new Exception("No LocalServiceModule in config file"); |
70 | 71 | ||
71 | Object[] args = new Object[] { config }; | 72 | Object[] args = new Object[] { config }; |
72 | m_InventoryService = | 73 | m_InventoryService = |
diff --git a/OpenSim/Server/Handlers/Land/LandServiceInConnector.cs b/OpenSim/Server/Handlers/Land/LandServiceInConnector.cs index 10e3b47..d368bd3 100644 --- a/OpenSim/Server/Handlers/Land/LandServiceInConnector.cs +++ b/OpenSim/Server/Handlers/Land/LandServiceInConnector.cs | |||
@@ -46,7 +46,7 @@ namespace OpenSim.Server.Handlers.Land | |||
46 | // TODO : private IAuthenticationService m_AuthenticationService; | 46 | // TODO : private IAuthenticationService m_AuthenticationService; |
47 | 47 | ||
48 | public LandServiceInConnector(IConfigSource source, IHttpServer server, ILandService service, IScene scene) : | 48 | public LandServiceInConnector(IConfigSource source, IHttpServer server, ILandService service, IScene scene) : |
49 | base(source, server) | 49 | base(source, server, String.Empty) |
50 | { | 50 | { |
51 | m_LandService = service; | 51 | m_LandService = service; |
52 | if (m_LandService == null) | 52 | if (m_LandService == null) |
diff --git a/OpenSim/Server/Handlers/Neighbour/NeighbourServiceInConnector.cs b/OpenSim/Server/Handlers/Neighbour/NeighbourServiceInConnector.cs index b3a91cf..ac2e75f 100644 --- a/OpenSim/Server/Handlers/Neighbour/NeighbourServiceInConnector.cs +++ b/OpenSim/Server/Handlers/Neighbour/NeighbourServiceInConnector.cs | |||
@@ -46,7 +46,7 @@ namespace OpenSim.Server.Handlers.Neighbour | |||
46 | private IAuthenticationService m_AuthenticationService = null; | 46 | private IAuthenticationService m_AuthenticationService = null; |
47 | 47 | ||
48 | public NeighbourServiceInConnector(IConfigSource source, IHttpServer server, INeighbourService nService, IScene scene) : | 48 | public NeighbourServiceInConnector(IConfigSource source, IHttpServer server, INeighbourService nService, IScene scene) : |
49 | base(source, server) | 49 | base(source, server, String.Empty) |
50 | { | 50 | { |
51 | 51 | ||
52 | m_NeighbourService = nService; | 52 | m_NeighbourService = nService; |
diff --git a/OpenSim/Server/Handlers/Simulation/SimulationServiceInConnector.cs b/OpenSim/Server/Handlers/Simulation/SimulationServiceInConnector.cs index 0bb4713..fe93fa5 100644 --- a/OpenSim/Server/Handlers/Simulation/SimulationServiceInConnector.cs +++ b/OpenSim/Server/Handlers/Simulation/SimulationServiceInConnector.cs | |||
@@ -41,7 +41,7 @@ namespace OpenSim.Server.Handlers.Simulation | |||
41 | private IAuthenticationService m_AuthenticationService; | 41 | private IAuthenticationService m_AuthenticationService; |
42 | 42 | ||
43 | public SimulationServiceInConnector(IConfigSource config, IHttpServer server, IScene scene) : | 43 | public SimulationServiceInConnector(IConfigSource config, IHttpServer server, IScene scene) : |
44 | base(config, server) | 44 | base(config, server, String.Empty) |
45 | { | 45 | { |
46 | IConfig serverConfig = config.Configs["SimulationService"]; | 46 | IConfig serverConfig = config.Configs["SimulationService"]; |
47 | if (serverConfig == null) | 47 | if (serverConfig == null) |
diff --git a/OpenSim/Server/ServerMain.cs b/OpenSim/Server/ServerMain.cs index 01f2649..a7b33c9 100644 --- a/OpenSim/Server/ServerMain.cs +++ b/OpenSim/Server/ServerMain.cs | |||
@@ -96,29 +96,23 @@ namespace OpenSim.Server | |||
96 | if (port != 0) | 96 | if (port != 0) |
97 | server = m_Server.GetHttpServer(port); | 97 | server = m_Server.GetHttpServer(port); |
98 | 98 | ||
99 | m_log.InfoFormat("[SERVER]: Loading {0}", friendlyName); | 99 | if (port != m_Server.DefaultPort) |
100 | m_log.InfoFormat("[SERVER]: Loading {0} on port {1}", friendlyName, port); | ||
101 | else | ||
102 | m_log.InfoFormat("[SERVER]: Loading {0}", friendlyName); | ||
100 | 103 | ||
101 | IServiceConnector connector = null; | 104 | IServiceConnector connector = null; |
102 | try | 105 | |
103 | { | 106 | Object[] modargs = new Object[] { m_Server.Config, server, |
104 | Object[] modargs = null; | 107 | configName }; |
105 | if (configName != string.Empty) | 108 | connector = ServerUtils.LoadPlugin<IServiceConnector>(conn, |
106 | { | 109 | modargs); |
107 | modargs = new Object[] { m_Server.Config, server, | 110 | if (connector == null) |
108 | configName }; | ||
109 | connector = ServerUtils.LoadPlugin<IServiceConnector>(conn, | ||
110 | modargs); | ||
111 | } | ||
112 | if (connector == null) | ||
113 | { | ||
114 | modargs = new Object[] { m_Server.Config, server }; | ||
115 | connector = | ||
116 | ServerUtils.LoadPlugin<IServiceConnector>(conn, | ||
117 | modargs); | ||
118 | } | ||
119 | } | ||
120 | catch (Exception) | ||
121 | { | 111 | { |
112 | modargs = new Object[] { m_Server.Config, server }; | ||
113 | connector = | ||
114 | ServerUtils.LoadPlugin<IServiceConnector>(conn, | ||
115 | modargs); | ||
122 | } | 116 | } |
123 | 117 | ||
124 | if (connector != null) | 118 | if (connector != null) |