aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/MessageServerConfig.cs
diff options
context:
space:
mode:
authorlbsa712009-04-17 05:52:46 +0000
committerlbsa712009-04-17 05:52:46 +0000
commitbbe1e196963fe8609a1070793b8439c293261d24 (patch)
tree32102a5e67d7e007d5efe473aef3d331f3697726 /OpenSim/Framework/MessageServerConfig.cs
parent* Added some debug info if MXP is enabled. (diff)
downloadopensim-SC-bbe1e196963fe8609a1070793b8439c293261d24.zip
opensim-SC-bbe1e196963fe8609a1070793b8439c293261d24.tar.gz
opensim-SC-bbe1e196963fe8609a1070793b8439c293261d24.tar.bz2
opensim-SC-bbe1e196963fe8609a1070793b8439c293261d24.tar.xz
* Some more work on refactoring configs;
* Moved the constants out into a separate DefaultConfig * Pulled configMember up * Some minor CCC
Diffstat (limited to 'OpenSim/Framework/MessageServerConfig.cs')
-rw-r--r--OpenSim/Framework/MessageServerConfig.cs43
1 files changed, 20 insertions, 23 deletions
diff --git a/OpenSim/Framework/MessageServerConfig.cs b/OpenSim/Framework/MessageServerConfig.cs
index 1af9b13..1e4b818 100644
--- a/OpenSim/Framework/MessageServerConfig.cs
+++ b/OpenSim/Framework/MessageServerConfig.cs
@@ -34,17 +34,14 @@ namespace OpenSim.Framework
34 /// </summary> 34 /// </summary>
35 public class MessageServerConfig:ConfigBase 35 public class MessageServerConfig:ConfigBase
36 { 36 {
37 public static uint DefaultHttpPort = 8006;
38 public static bool DefaultHttpSSL = false;
39 private ConfigurationMember configMember;
40 public string DatabaseProvider = String.Empty; 37 public string DatabaseProvider = String.Empty;
41 public string DatabaseConnect = String.Empty; 38 public string DatabaseConnect = String.Empty;
42 public string GridCommsProvider = String.Empty; 39 public string GridCommsProvider = String.Empty;
43 public string GridRecvKey = String.Empty; 40 public string GridRecvKey = String.Empty;
44 public string GridSendKey = String.Empty; 41 public string GridSendKey = String.Empty;
45 public string GridServerURL = String.Empty; 42 public string GridServerURL = String.Empty;
46 public uint HttpPort = DefaultHttpPort; 43 public uint HttpPort = DefaultSettings.DefaultMessageServerHttpPort;
47 public bool HttpSSL = DefaultHttpSSL; 44 public bool HttpSSL = DefaultSettings.DefaultMessageServerHttpSSL;
48 public string MessageServerIP = String.Empty; 45 public string MessageServerIP = String.Empty;
49 public string UserRecvKey = String.Empty; 46 public string UserRecvKey = String.Empty;
50 public string UserSendKey = String.Empty; 47 public string UserSendKey = String.Empty;
@@ -52,44 +49,44 @@ namespace OpenSim.Framework
52 49
53 public MessageServerConfig(string description, string filename) 50 public MessageServerConfig(string description, string filename)
54 { 51 {
55 configMember = 52 m_configMember =
56 new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration, true); 53 new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration, true);
57 configMember.performConfigurationRetrieve(); 54 m_configMember.performConfigurationRetrieve();
58 } 55 }
59 56
60 public void loadConfigurationOptions() 57 public void loadConfigurationOptions()
61 { 58 {
62 configMember.addConfigurationOption("default_user_server", 59 m_configMember.addConfigurationOption("default_user_server",
63 ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, 60 ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
64 "Default User Server URI", 61 "Default User Server URI",
65 "http://127.0.0.1:" + UserConfig.DefaultHttpPort.ToString() + "/", false); 62 "http://127.0.0.1:" + DefaultSettings.DefaultUserServerHttpPort.ToString() + "/", false);
66 configMember.addConfigurationOption("user_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, 63 m_configMember.addConfigurationOption("user_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
67 "Key to send to user server", "null", false); 64 "Key to send to user server", "null", false);
68 configMember.addConfigurationOption("user_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, 65 m_configMember.addConfigurationOption("user_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
69 "Key to expect from user server", "null", false); 66 "Key to expect from user server", "null", false);
70 configMember.addConfigurationOption("default_grid_server", 67 m_configMember.addConfigurationOption("default_grid_server",
71 ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, 68 ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
72 "Default Grid Server URI", 69 "Default Grid Server URI",
73 "http://127.0.0.1:" + GridConfig.DefaultHttpPort.ToString() + "/", false); 70 "http://127.0.0.1:" + DefaultSettings.DefaultGridServerHttpPort.ToString() + "/", false);
74 configMember.addConfigurationOption("grid_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, 71 m_configMember.addConfigurationOption("grid_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
75 "Key to send to grid server", "null", false); 72 "Key to send to grid server", "null", false);
76 configMember.addConfigurationOption("grid_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, 73 m_configMember.addConfigurationOption("grid_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
77 "Key to expect from grid server", "null", false); 74 "Key to expect from grid server", "null", false);
78 75
79 configMember.addConfigurationOption("database_connect", ConfigurationOption.ConfigurationTypes.TYPE_STRING, 76 m_configMember.addConfigurationOption("database_connect", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
80 "Connection String for Database", "", false); 77 "Connection String for Database", "", false);
81 78
82 configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, 79 m_configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
83 "DLL for database provider", "OpenSim.Data.MySQL.dll", false); 80 "DLL for database provider", "OpenSim.Data.MySQL.dll", false);
84 81
85 configMember.addConfigurationOption("region_comms_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, 82 m_configMember.addConfigurationOption("region_comms_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
86 "DLL for comms provider", "OpenSim.Region.Communications.OGS1.dll", false); 83 "DLL for comms provider", "OpenSim.Region.Communications.OGS1.dll", false);
87 84
88 configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, 85 m_configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
89 "Http Listener port", DefaultHttpPort.ToString(), false); 86 "Http Listener port", DefaultSettings.DefaultMessageServerHttpPort.ToString(), false);
90 configMember.addConfigurationOption("http_ssl", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN, 87 m_configMember.addConfigurationOption("http_ssl", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN,
91 "Use SSL? true/false", DefaultHttpSSL.ToString(), false); 88 "Use SSL? true/false", DefaultSettings.DefaultMessageServerHttpSSL.ToString(), false);
92 configMember.addConfigurationOption("published_ip", ConfigurationOption.ConfigurationTypes.TYPE_STRING, 89 m_configMember.addConfigurationOption("published_ip", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
93 "My Published IP Address", "127.0.0.1", false); 90 "My Published IP Address", "127.0.0.1", false);
94 } 91 }
95 92