diff options
author | mingchen | 2007-06-09 21:04:13 +0000 |
---|---|---|
committer | mingchen | 2007-06-09 21:04:13 +0000 |
commit | fa8f143aec69e36ee90fb34e2f144733b66ca951 (patch) | |
tree | 9442f049f83b4ea1cb89f9205aa07fd375c84594 /Common/OpenGrid.Framework.Communications | |
parent | Number of small changes. (diff) | |
download | opensim-SC-fa8f143aec69e36ee90fb34e2f144733b66ca951.zip opensim-SC-fa8f143aec69e36ee90fb34e2f144733b66ca951.tar.gz opensim-SC-fa8f143aec69e36ee90fb34e2f144733b66ca951.tar.bz2 opensim-SC-fa8f143aec69e36ee90fb34e2f144733b66ca951.tar.xz |
*Reorganized RegionServerCommsManager for OGS and local support
Diffstat (limited to '')
-rw-r--r-- | Common/OpenGrid.Framework.Communications/GridServer/GridCommsManagerBase.cs | 50 | ||||
-rw-r--r-- | Common/OpenGrid.Framework.Communications/GridServer/GridCommsManagerLocal.cs (renamed from Common/OpenGrid.Framework.Communications/TestLocalCommsManager.cs) | 41 | ||||
-rw-r--r-- | Common/OpenGrid.Framework.Communications/GridServer/GridCommsManagerOGS.cs | 36 | ||||
-rw-r--r-- | Common/OpenGrid.Framework.Communications/OpenGrid.Framework.Communications.csproj | 25 | ||||
-rw-r--r-- | Common/OpenGrid.Framework.Communications/RegionServerCommsLocal.cs | 20 | ||||
-rw-r--r-- | Common/OpenGrid.Framework.Communications/RegionServerCommsManager.cs | 60 | ||||
-rw-r--r-- | Common/OpenGrid.Framework.Communications/RegionServerCommsOGS.cs | 15 | ||||
-rw-r--r-- | Common/OpenGrid.Framework.Communications/UserServer/UserCommsManagerBase.cs | 30 | ||||
-rw-r--r-- | Common/OpenGrid.Framework.Communications/UserServer/UserCommsManagerLocal.cs | 10 | ||||
-rw-r--r-- | Common/OpenGrid.Framework.Communications/UserServer/UserCommsManagerOGS.cs | 10 |
10 files changed, 211 insertions, 86 deletions
diff --git a/Common/OpenGrid.Framework.Communications/GridServer/GridCommsManagerBase.cs b/Common/OpenGrid.Framework.Communications/GridServer/GridCommsManagerBase.cs new file mode 100644 index 0000000..11b5ea7 --- /dev/null +++ b/Common/OpenGrid.Framework.Communications/GridServer/GridCommsManagerBase.cs | |||
@@ -0,0 +1,50 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | using OpenSim.Framework.Types; | ||
5 | using OpenSim.Framework; | ||
6 | |||
7 | namespace OpenGrid.Framework.Communications.GridServer | ||
8 | { | ||
9 | public class GridCommsManagerBase | ||
10 | { | ||
11 | public GridCommsManagerBase() | ||
12 | { | ||
13 | } | ||
14 | /// <summary> | ||
15 | /// | ||
16 | /// </summary> | ||
17 | /// <param name="regionInfo"></param> | ||
18 | /// <returns></returns> | ||
19 | public virtual RegionCommsHostBase RegisterRegion(RegionInfo regionInfo) | ||
20 | { | ||
21 | return null; | ||
22 | } | ||
23 | |||
24 | /// <summary> | ||
25 | /// | ||
26 | /// </summary> | ||
27 | /// <param name="regionInfo"></param> | ||
28 | /// <returns></returns> | ||
29 | public virtual List<RegionInfo> RequestNeighbours(RegionInfo regionInfo) | ||
30 | { | ||
31 | return null; | ||
32 | } | ||
33 | |||
34 | /// <summary> | ||
35 | /// | ||
36 | /// </summary> | ||
37 | /// <returns></returns> | ||
38 | public virtual bool InformNeighbourOfChildAgent(ulong regionHandle, AgentCircuitData agentData) //should change from agentCircuitData | ||
39 | { | ||
40 | return false; | ||
41 | } | ||
42 | |||
43 | public virtual bool AddNewSession(ulong regionHandle, Login loginData) | ||
44 | { | ||
45 | return false; | ||
46 | } | ||
47 | |||
48 | |||
49 | } | ||
50 | } | ||
diff --git a/Common/OpenGrid.Framework.Communications/TestLocalCommsManager.cs b/Common/OpenGrid.Framework.Communications/GridServer/GridCommsManagerLocal.cs index fad2001..774585a 100644 --- a/Common/OpenGrid.Framework.Communications/TestLocalCommsManager.cs +++ b/Common/OpenGrid.Framework.Communications/GridServer/GridCommsManagerLocal.cs | |||
@@ -1,29 +1,24 @@ | |||
1 | using System; | 1 | using System; |
2 | using System.Collections; | ||
3 | using System.Collections.Generic; | 2 | using System.Collections.Generic; |
4 | using System.Text; | 3 | using System.Text; |
5 | using libsecondlife; | 4 | |
6 | using OpenSim.Framework; | 5 | using OpenSim.Framework; |
7 | using OpenSim.Framework.Interfaces; | ||
8 | using OpenSim.Framework.Types; | 6 | using OpenSim.Framework.Types; |
9 | 7 | ||
10 | namespace OpenGrid.Framework.Communications | 8 | using libsecondlife; |
9 | |||
10 | namespace OpenGrid.Framework.Communications.GridServer | ||
11 | { | 11 | { |
12 | public class TestLocalCommsManager : RegionServerCommsManager | 12 | public class GridCommsManagerLocal : GridCommsManagerBase |
13 | { | 13 | { |
14 | protected Dictionary<ulong, RegionInfo> regions = new Dictionary<ulong,RegionInfo>(); | 14 | protected Dictionary<ulong, RegionInfo> regions = new Dictionary<ulong, RegionInfo>(); |
15 | protected Dictionary<ulong, RegionCommsHostBase> regionHosts = new Dictionary<ulong, RegionCommsHostBase>(); | 15 | protected Dictionary<ulong, RegionCommsHostBase> regionHosts = new Dictionary<ulong, RegionCommsHostBase>(); |
16 | 16 | ||
17 | public TestLocalCommsManager() | 17 | public GridCommsManagerLocal() |
18 | { | 18 | { |
19 | 19 | ||
20 | } | 20 | } |
21 | 21 | ||
22 | /// <summary> | ||
23 | /// | ||
24 | /// </summary> | ||
25 | /// <param name="regionInfo"></param> | ||
26 | /// <returns></returns> | ||
27 | public override RegionCommsHostBase RegisterRegion(RegionInfo regionInfo) | 22 | public override RegionCommsHostBase RegisterRegion(RegionInfo regionInfo) |
28 | { | 23 | { |
29 | //Console.WriteLine("CommsManager - Region " + regionInfo.RegionHandle + " , " + regionInfo.RegionLocX + " , "+ regionInfo.RegionLocY +" is registering"); | 24 | //Console.WriteLine("CommsManager - Region " + regionInfo.RegionHandle + " , " + regionInfo.RegionLocX + " , "+ regionInfo.RegionLocY +" is registering"); |
@@ -32,27 +27,23 @@ namespace OpenGrid.Framework.Communications | |||
32 | //Console.WriteLine("CommsManager - Adding Region " + regionInfo.RegionHandle ); | 27 | //Console.WriteLine("CommsManager - Adding Region " + regionInfo.RegionHandle ); |
33 | this.regions.Add(regionInfo.RegionHandle, regionInfo); | 28 | this.regions.Add(regionInfo.RegionHandle, regionInfo); |
34 | RegionCommsHostBase regionHost = new RegionCommsHostBase(); | 29 | RegionCommsHostBase regionHost = new RegionCommsHostBase(); |
35 | this.regionHosts.Add(regionInfo.RegionHandle, regionHost); | 30 | this.regionHosts.Add(regionInfo.RegionHandle, regionHost); |
36 | return regionHost; | 31 | return regionHost; |
37 | } | 32 | } |
38 | 33 | ||
39 | //already in our list of regions so for now lets return null | 34 | //already in our list of regions so for now lets return null |
40 | return null; | 35 | return null; |
41 | } | 36 | } |
42 | 37 | ||
43 | /// <summary> | 38 | |
44 | /// | ||
45 | /// </summary> | ||
46 | /// <param name="regionInfo"></param> | ||
47 | /// <returns></returns> | ||
48 | public override List<RegionInfo> RequestNeighbours(RegionInfo regionInfo) | 39 | public override List<RegionInfo> RequestNeighbours(RegionInfo regionInfo) |
49 | { | 40 | { |
50 | // Console.WriteLine("Finding Neighbours to " + regionInfo.RegionHandle); | 41 | // Console.WriteLine("Finding Neighbours to " + regionInfo.RegionHandle); |
51 | List<RegionInfo> neighbours = new List<RegionInfo>(); | 42 | List<RegionInfo> neighbours = new List<RegionInfo>(); |
52 | 43 | ||
53 | foreach (RegionInfo reg in this.regions.Values) | 44 | foreach (RegionInfo reg in this.regions.Values) |
54 | { | 45 | { |
55 | // Console.WriteLine("CommsManager- RequestNeighbours() checking region " + reg.RegionLocX + " , "+ reg.RegionLocY); | 46 | // Console.WriteLine("CommsManager- RequestNeighbours() checking region " + reg.RegionLocX + " , "+ reg.RegionLocY); |
56 | if (reg.RegionHandle != regionInfo.RegionHandle) | 47 | if (reg.RegionHandle != regionInfo.RegionHandle) |
57 | { | 48 | { |
58 | //Console.WriteLine("CommsManager- RequestNeighbours() - found a different region in list, checking location"); | 49 | //Console.WriteLine("CommsManager- RequestNeighbours() - found a different region in list, checking location"); |
@@ -68,16 +59,12 @@ namespace OpenGrid.Framework.Communications | |||
68 | return neighbours; | 59 | return neighbours; |
69 | } | 60 | } |
70 | 61 | ||
71 | /// <summary> | ||
72 | /// | ||
73 | /// </summary> | ||
74 | /// <returns></returns> | ||
75 | public override bool InformNeighbourOfChildAgent(ulong regionHandle, AgentCircuitData agentData) //should change from agentCircuitData | 62 | public override bool InformNeighbourOfChildAgent(ulong regionHandle, AgentCircuitData agentData) //should change from agentCircuitData |
76 | { | 63 | { |
77 | //Console.WriteLine("CommsManager- Trying to Inform a region to expect child agent"); | 64 | //Console.WriteLine("CommsManager- Trying to Inform a region to expect child agent"); |
78 | if (this.regionHosts.ContainsKey(regionHandle)) | 65 | if (this.regionHosts.ContainsKey(regionHandle)) |
79 | { | 66 | { |
80 | // Console.WriteLine("CommsManager- Informing a region to expect child agent"); | 67 | // Console.WriteLine("CommsManager- Informing a region to expect child agent"); |
81 | this.regionHosts[regionHandle].TriggerExpectUser(regionHandle, agentData); | 68 | this.regionHosts[regionHandle].TriggerExpectUser(regionHandle, agentData); |
82 | return true; | 69 | return true; |
83 | } | 70 | } |
@@ -90,7 +77,7 @@ namespace OpenGrid.Framework.Communications | |||
90 | /// <param name="regionHandle"></param> | 77 | /// <param name="regionHandle"></param> |
91 | /// <param name="loginData"></param> | 78 | /// <param name="loginData"></param> |
92 | /// <returns></returns> | 79 | /// <returns></returns> |
93 | public bool AddNewSession(ulong regionHandle, Login loginData) | 80 | public override bool AddNewSession(ulong regionHandle, Login loginData) |
94 | { | 81 | { |
95 | //Console.WriteLine(" comms manager been told to expect new user"); | 82 | //Console.WriteLine(" comms manager been told to expect new user"); |
96 | AgentCircuitData agent = new AgentCircuitData(); | 83 | AgentCircuitData agent = new AgentCircuitData(); |
diff --git a/Common/OpenGrid.Framework.Communications/GridServer/GridCommsManagerOGS.cs b/Common/OpenGrid.Framework.Communications/GridServer/GridCommsManagerOGS.cs new file mode 100644 index 0000000..415c1d8 --- /dev/null +++ b/Common/OpenGrid.Framework.Communications/GridServer/GridCommsManagerOGS.cs | |||
@@ -0,0 +1,36 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | |||
5 | using OpenSim.Framework; | ||
6 | using OpenSim.Framework.Types; | ||
7 | |||
8 | namespace OpenGrid.Framework.Communications.GridServer | ||
9 | { | ||
10 | public class GridCommsManagerOGS : GridCommsManagerBase | ||
11 | { | ||
12 | public GridCommsManagerOGS() | ||
13 | { | ||
14 | } | ||
15 | |||
16 | public override RegionCommsHostBase RegisterRegion(RegionInfo regionInfo) | ||
17 | { | ||
18 | return null; | ||
19 | } | ||
20 | |||
21 | public override List<RegionInfo> RequestNeighbours(RegionInfo regionInfo) | ||
22 | { | ||
23 | return null; | ||
24 | } | ||
25 | |||
26 | public override bool InformNeighbourOfChildAgent(ulong regionHandle, AgentCircuitData agentData) //should change from agentCircuitData | ||
27 | { | ||
28 | return false; | ||
29 | } | ||
30 | |||
31 | public override bool AddNewSession(ulong regionHandle, Login loginData) | ||
32 | { | ||
33 | return false; | ||
34 | } | ||
35 | } | ||
36 | } | ||
diff --git a/Common/OpenGrid.Framework.Communications/OpenGrid.Framework.Communications.csproj b/Common/OpenGrid.Framework.Communications/OpenGrid.Framework.Communications.csproj index 00b1548..689210b 100644 --- a/Common/OpenGrid.Framework.Communications/OpenGrid.Framework.Communications.csproj +++ b/Common/OpenGrid.Framework.Communications/OpenGrid.Framework.Communications.csproj | |||
@@ -80,15 +80,36 @@ | |||
80 | </ProjectReference> | 80 | </ProjectReference> |
81 | </ItemGroup> | 81 | </ItemGroup> |
82 | <ItemGroup> | 82 | <ItemGroup> |
83 | <Compile Include="RegionServerCommsManager.cs"> | 83 | <Compile Include="RegionServerCommsLocal.cs"> |
84 | <SubType>Code</SubType> | ||
85 | </Compile> | ||
86 | <Compile Include="RegionServerCommsOGS.cs"> | ||
84 | <SubType>Code</SubType> | 87 | <SubType>Code</SubType> |
85 | </Compile> | 88 | </Compile> |
86 | <Compile Include="TestLocalCommsManager.cs"> | 89 | <Compile Include="RegionServerCommsManager.cs"> |
87 | <SubType>Code</SubType> | 90 | <SubType>Code</SubType> |
88 | </Compile> | 91 | </Compile> |
89 | <Compile Include="Properties\AssemblyInfo.cs"> | 92 | <Compile Include="Properties\AssemblyInfo.cs"> |
90 | <SubType>Code</SubType> | 93 | <SubType>Code</SubType> |
91 | </Compile> | 94 | </Compile> |
95 | <Compile Include="UserServer\UserCommsManagerOGS.cs"> | ||
96 | <SubType>Code</SubType> | ||
97 | </Compile> | ||
98 | <Compile Include="UserServer\UserCommsManagerLocal.cs"> | ||
99 | <SubType>Code</SubType> | ||
100 | </Compile> | ||
101 | <Compile Include="UserServer\UserCommsManagerBase.cs"> | ||
102 | <SubType>Code</SubType> | ||
103 | </Compile> | ||
104 | <Compile Include="GridServer\GridCommsManagerLocal.cs"> | ||
105 | <SubType>Code</SubType> | ||
106 | </Compile> | ||
107 | <Compile Include="GridServer\GridCommsManagerOGS.cs"> | ||
108 | <SubType>Code</SubType> | ||
109 | </Compile> | ||
110 | <Compile Include="GridServer\GridCommsManagerBase.cs"> | ||
111 | <SubType>Code</SubType> | ||
112 | </Compile> | ||
92 | </ItemGroup> | 113 | </ItemGroup> |
93 | <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> | 114 | <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> |
94 | <PropertyGroup> | 115 | <PropertyGroup> |
diff --git a/Common/OpenGrid.Framework.Communications/RegionServerCommsLocal.cs b/Common/OpenGrid.Framework.Communications/RegionServerCommsLocal.cs new file mode 100644 index 0000000..0743cbf --- /dev/null +++ b/Common/OpenGrid.Framework.Communications/RegionServerCommsLocal.cs | |||
@@ -0,0 +1,20 @@ | |||
1 | using System; | ||
2 | using System.Collections; | ||
3 | using System.Collections.Generic; | ||
4 | using System.Text; | ||
5 | using libsecondlife; | ||
6 | using OpenSim.Framework; | ||
7 | using OpenSim.Framework.Interfaces; | ||
8 | using OpenSim.Framework.Types; | ||
9 | |||
10 | namespace OpenGrid.Framework.Communications | ||
11 | { | ||
12 | public class RegionServerCommsLocal : RegionServerCommsManager | ||
13 | { | ||
14 | public RegionServerCommsLocal() | ||
15 | { | ||
16 | userServer = new UserServer.UserCommsManagerLocal(); //Local User Server | ||
17 | gridServer = new GridServer.GridCommsManagerLocal(); //Locl Grid Server | ||
18 | } | ||
19 | } | ||
20 | } | ||
diff --git a/Common/OpenGrid.Framework.Communications/RegionServerCommsManager.cs b/Common/OpenGrid.Framework.Communications/RegionServerCommsManager.cs index fa786d3..38bce42 100644 --- a/Common/OpenGrid.Framework.Communications/RegionServerCommsManager.cs +++ b/Common/OpenGrid.Framework.Communications/RegionServerCommsManager.cs | |||
@@ -12,66 +12,12 @@ namespace OpenGrid.Framework.Communications | |||
12 | 12 | ||
13 | public class RegionServerCommsManager | 13 | public class RegionServerCommsManager |
14 | { | 14 | { |
15 | public UserServer.UserCommsManagerBase userServer; | ||
16 | public GridServer.GridCommsManagerBase gridServer; | ||
15 | 17 | ||
16 | public RegionServerCommsManager() | 18 | public RegionServerCommsManager() |
17 | { | 19 | { |
18 | 20 | ||
19 | } | ||
20 | |||
21 | /// <summary> | ||
22 | /// | ||
23 | /// </summary> | ||
24 | /// <returns></returns> | ||
25 | public virtual RegionInfo LoadRegionConfigFromGridServer(LLUUID regionID) | ||
26 | { | ||
27 | return null; | ||
28 | } | ||
29 | |||
30 | /// <summary> | ||
31 | /// | ||
32 | /// </summary> | ||
33 | /// <param name="regionInfo"></param> | ||
34 | /// <returns></returns> | ||
35 | public virtual RegionCommsHostBase RegisterRegion(RegionInfo regionInfo) | ||
36 | { | ||
37 | return null; | ||
38 | } | ||
39 | |||
40 | /// <summary> | ||
41 | /// | ||
42 | /// </summary> | ||
43 | /// <param name="regionInfo"></param> | ||
44 | /// <returns></returns> | ||
45 | public virtual List<RegionInfo> RequestNeighbours(RegionInfo regionInfo) | ||
46 | { | ||
47 | return null; | ||
48 | } | ||
49 | |||
50 | /// <summary> | ||
51 | /// | ||
52 | /// </summary> | ||
53 | /// <returns></returns> | ||
54 | public virtual bool InformNeighbourOfChildAgent( ulong regionHandle, AgentCircuitData agentData) //should change from agentCircuitData | ||
55 | { | ||
56 | return false; | ||
57 | } | ||
58 | |||
59 | /// <summary> | ||
60 | /// | ||
61 | /// </summary> | ||
62 | /// <returns></returns> | ||
63 | public virtual bool AvatarCrossingToRegion() | ||
64 | { | ||
65 | return false; | ||
66 | } | ||
67 | |||
68 | /// <summary> | ||
69 | /// | ||
70 | /// </summary> | ||
71 | /// <returns></returns> | ||
72 | public virtual IList RequestMapBlocks() | ||
73 | { | ||
74 | return null; | ||
75 | } | 21 | } |
76 | } | 22 | } |
77 | } | 23 | } |
diff --git a/Common/OpenGrid.Framework.Communications/RegionServerCommsOGS.cs b/Common/OpenGrid.Framework.Communications/RegionServerCommsOGS.cs new file mode 100644 index 0000000..b0db473 --- /dev/null +++ b/Common/OpenGrid.Framework.Communications/RegionServerCommsOGS.cs | |||
@@ -0,0 +1,15 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | |||
5 | namespace OpenGrid.Framework.Communications | ||
6 | { | ||
7 | public class RegionServerCommsOGS : RegionServerCommsManager | ||
8 | { | ||
9 | public RegionServerCommsOGS() | ||
10 | { | ||
11 | userServer = new UserServer.UserCommsManagerOGS(); //Remote User Server | ||
12 | gridServer = new GridServer.GridCommsManagerOGS(); //Remote Grid Server | ||
13 | } | ||
14 | } | ||
15 | } | ||
diff --git a/Common/OpenGrid.Framework.Communications/UserServer/UserCommsManagerBase.cs b/Common/OpenGrid.Framework.Communications/UserServer/UserCommsManagerBase.cs new file mode 100644 index 0000000..9ea4ae8 --- /dev/null +++ b/Common/OpenGrid.Framework.Communications/UserServer/UserCommsManagerBase.cs | |||
@@ -0,0 +1,30 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | |||
5 | using libsecondlife; | ||
6 | namespace OpenGrid.Framework.Communications.UserServer | ||
7 | { | ||
8 | public class UserCommsManagerBase | ||
9 | { | ||
10 | public UserCommsManagerBase() | ||
11 | { | ||
12 | } | ||
13 | |||
14 | public virtual UserProfileData GetUserProfile(string name) | ||
15 | { | ||
16 | return null; | ||
17 | } | ||
18 | public virtual UserProfileData GetUserProfile(LLUUID avatar_id) | ||
19 | { | ||
20 | return null; | ||
21 | } | ||
22 | } | ||
23 | |||
24 | public class UserProfileData | ||
25 | { | ||
26 | public UserProfileData() | ||
27 | { | ||
28 | } | ||
29 | } | ||
30 | } | ||
diff --git a/Common/OpenGrid.Framework.Communications/UserServer/UserCommsManagerLocal.cs b/Common/OpenGrid.Framework.Communications/UserServer/UserCommsManagerLocal.cs new file mode 100644 index 0000000..eb0881a --- /dev/null +++ b/Common/OpenGrid.Framework.Communications/UserServer/UserCommsManagerLocal.cs | |||
@@ -0,0 +1,10 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | |||
5 | namespace OpenGrid.Framework.Communications.UserServer | ||
6 | { | ||
7 | public class UserCommsManagerLocal : UserCommsManagerBase | ||
8 | { | ||
9 | } | ||
10 | } | ||
diff --git a/Common/OpenGrid.Framework.Communications/UserServer/UserCommsManagerOGS.cs b/Common/OpenGrid.Framework.Communications/UserServer/UserCommsManagerOGS.cs new file mode 100644 index 0000000..0921535 --- /dev/null +++ b/Common/OpenGrid.Framework.Communications/UserServer/UserCommsManagerOGS.cs | |||
@@ -0,0 +1,10 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | |||
5 | namespace OpenGrid.Framework.Communications.UserServer | ||
6 | { | ||
7 | public class UserCommsManagerOGS : UserCommsManagerBase | ||
8 | { | ||
9 | } | ||
10 | } | ||