Changeset 1084
- Timestamp:
- 01/07/09 16:35:53 (16 years ago)
- Location:
- trunk/sources
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Hive.Contracts/Interfaces/IServerConsoleFacade.cs
r909 r1084 31 31 /// Facade for the server management console 32 32 /// </summary> 33 [ServiceContract] 34 public interface IServerConsoleFacade : IClientManager, IJobManager, IUserRoleManager { 33 [ServiceContract(SessionMode=SessionMode.Required)] 34 public interface IServerConsoleFacade : IClientManager, 35 IJobManager, 36 IUserRoleManager { 37 [OperationContract] 38 bool Login(String username, String password); 35 39 } 36 40 } -
trunk/sources/HeuristicLab.Hive.Server.Console/ServiceLocator.cs
r844 r1084 9 9 namespace HeuristicLab.Hive.Server.Console { 10 10 internal class ServiceLocator { 11 private static IClientManager clientManager = null; 12 private static IJobManager jobManager = null; 13 private static IUserRoleManager userManager = null; 11 private static IServerConsoleFacade serverConsoleFacade = null; 14 12 15 13 internal static string Address { get; set; } … … 17 15 18 16 internal static IClientManager GetClientManager() { 19 if (clientManager == null && 20 Address != String.Empty && 21 Port != String.Empty) { 22 ChannelFactory<IClientManager> factory = 23 new ChannelFactory<IClientManager>( 24 new NetTcpBinding(), 25 new EndpointAddress("net.tcp://" + Address + ":" + Port + "/HiveServerConsole/ClientManager")); 26 27 clientManager = factory.CreateChannel(); 28 } 29 30 return clientManager; 17 return GetServerConsoleFacade() as IClientManager; 31 18 } 32 19 33 20 internal static IJobManager GetJobManager() { 34 if (jobManager == null && 35 Address != String.Empty && 36 Port != String.Empty) { 37 ChannelFactory<IJobManager> factory = 38 new ChannelFactory<IJobManager>( 39 new NetTcpBinding(), 40 new EndpointAddress("net.tcp://" + Address + ":" + Port + "/HiveServerConsole/JobManager")); 41 42 jobManager = factory.CreateChannel(); 43 } 44 45 return jobManager; 21 return GetServerConsoleFacade() as IJobManager; 46 22 } 47 23 48 24 internal static IUserRoleManager GetUserRoleManager() { 49 if (userManager == null && 25 return GetServerConsoleFacade() as IUserRoleManager; 26 } 27 28 internal static IServerConsoleFacade GetServerConsoleFacade() { 29 if (serverConsoleFacade == null && 50 30 Address != String.Empty && 51 31 Port != String.Empty) { 52 ChannelFactory<I UserRoleManager> factory =53 new ChannelFactory<I UserRoleManager>(32 ChannelFactory<IServerConsoleFacade> factory = 33 new ChannelFactory<IServerConsoleFacade>( 54 34 new NetTcpBinding(), 55 new EndpointAddress("net.tcp://" + Address + ":" + Port + "/HiveServerConsole/ UserRoleManager"));35 new EndpointAddress("net.tcp://" + Address + ":" + Port + "/HiveServerConsole/ServerConsoleFacade")); 56 36 57 userManager= factory.CreateChannel();37 serverConsoleFacade = factory.CreateChannel(); 58 38 } 59 39 60 return userManager;40 return serverConsoleFacade; 61 41 } 62 42 } -
trunk/sources/HeuristicLab.Hive.Server.Core/ServerConsoleFacade.cs
r1012 r1084 33 33 private IJobManager jobManager = new JobManager(); 34 34 private IUserRoleManager userRoleManager = new UserRoleManager(); 35 35 36 private String loginName = null; 37 38 #region IServerConsoleFacade Members 39 40 public bool Login(string username, string password) { 41 loginName = username; 42 43 return true; 44 } 45 46 #endregion 47 36 48 #region IClientManager Members 37 49 … … 116 128 117 129 #endregion 118 119 130 } 120 131 } -
trunk/sources/HeuristicLab.Hive.Server/HiveServerApplication.cs
r994 r1084 95 95 96 96 serviceHost.AddServiceEndpoint( 97 typeof(IClientManager), 98 binding, 99 "ClientManager"); 100 101 serviceHost.AddServiceEndpoint( 102 typeof(IJobManager), 103 binding, 104 "JobManager"); 105 106 serviceHost.AddServiceEndpoint( 107 typeof(IUserRoleManager), 108 binding, 109 "UserRoleManager"); 97 typeof(IServerConsoleFacade), 98 binding, 99 "ServerConsoleFacade"); 110 100 111 101 AddMexEndpoint(serviceHost);
Note: See TracChangeset
for help on using the changeset viewer.