Changeset 790 for trunk/sources/HeuristicLab.Hive.Client.Communication
- Timestamp:
- 11/20/08 15:41:25 (16 years ago)
- Location:
- trunk/sources/HeuristicLab.Hive.Client.Communication
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Hive.Client.Communication/ServerProxy.cs
r781 r790 3 3 using System.Linq; 4 4 using System.Text; 5 using HeuristicLab.Hive.Server.Interfaces;6 5 7 6 namespace HeuristicLab.Hive.Client.Communication { … … 11 10 12 11 [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IClientCommunicator/Login", ReplyAction = "http://tempuri.org/IClientCommunicator/LoginResponse")] 13 HeuristicLab.Hive. Server.Response Login(HeuristicLab.Hive.Contracts.BusinessObjects.Client clientInfo);12 HeuristicLab.Hive.Contracts.Response Login(HeuristicLab.Hive.Contracts.BusinessObjects.Client clientInfo); 14 13 15 14 [System.ServiceModel.OperationContractAttribute(AsyncPattern = true, Action = "http://tempuri.org/IClientCommunicator/Login", ReplyAction = "http://tempuri.org/IClientCommunicator/LoginResponse")] 16 15 System.IAsyncResult BeginLogin(HeuristicLab.Hive.Contracts.BusinessObjects.Client clientInfo, System.AsyncCallback callback, object asyncState); 17 16 18 HeuristicLab.Hive.Server.Response EndLogin(System.IAsyncResult result); 17 HeuristicLab.Hive.Contracts.Response EndLogin(System.IAsyncResult result); 18 19 [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IClientCommunicator/SendHeartBeat", ReplyAction = "http://tempuri.org/IClientCommunicator/SendHeartBeatResponse")] 20 HeuristicLab.Hive.Contracts.ResponseHB SendHeartBeat(HeuristicLab.Hive.Contracts.BusinessObjects.HeartBeatData hbData); 21 22 [System.ServiceModel.OperationContractAttribute(AsyncPattern = true, Action = "http://tempuri.org/IClientCommunicator/SendHeartBeat", ReplyAction = "http://tempuri.org/IClientCommunicator/SendHeartBeatResponse")] 23 System.IAsyncResult BeginSendHeartBeat(HeuristicLab.Hive.Contracts.BusinessObjects.HeartBeatData hbData, System.AsyncCallback callback, object asyncState); 24 25 HeuristicLab.Hive.Contracts.ResponseHB EndSendHeartBeat(System.IAsyncResult result); 26 27 [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IClientCommunicator/PullJob", ReplyAction = "http://tempuri.org/IClientCommunicator/PullJobResponse")] 28 HeuristicLab.Hive.Contracts.ResponseJob PullJob(System.Guid clientId); 29 30 [System.ServiceModel.OperationContractAttribute(AsyncPattern = true, Action = "http://tempuri.org/IClientCommunicator/PullJob", ReplyAction = "http://tempuri.org/IClientCommunicator/PullJobResponse")] 31 System.IAsyncResult BeginPullJob(System.Guid clientId, System.AsyncCallback callback, object asyncState); 32 33 HeuristicLab.Hive.Contracts.ResponseJob EndPullJob(System.IAsyncResult result); 34 35 [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IClientCommunicator/SendJobResult", ReplyAction = "http://tempuri.org/IClientCommunicator/SendJobResultResponse")] 36 HeuristicLab.Hive.Contracts.Response SendJobResult(HeuristicLab.Hive.Contracts.BusinessObjects.JobResult Result, bool finished); 37 38 [System.ServiceModel.OperationContractAttribute(AsyncPattern = true, Action = "http://tempuri.org/IClientCommunicator/SendJobResult", ReplyAction = "http://tempuri.org/IClientCommunicator/SendJobResultResponse")] 39 System.IAsyncResult BeginSendJobResult(HeuristicLab.Hive.Contracts.BusinessObjects.JobResult Result, bool finished, System.AsyncCallback callback, object asyncState); 40 41 HeuristicLab.Hive.Contracts.Response EndSendJobResult(System.IAsyncResult result); 42 43 [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IClientCommunicator/Logout", ReplyAction = "http://tempuri.org/IClientCommunicator/LogoutResponse")] 44 HeuristicLab.Hive.Contracts.Response Logout(System.Guid clientId); 45 46 [System.ServiceModel.OperationContractAttribute(AsyncPattern = true, Action = "http://tempuri.org/IClientCommunicator/Logout", ReplyAction = "http://tempuri.org/IClientCommunicator/LogoutResponse")] 47 System.IAsyncResult BeginLogout(System.Guid clientId, System.AsyncCallback callback, object asyncState); 48 49 HeuristicLab.Hive.Contracts.Response EndLogout(System.IAsyncResult result); 19 50 } 20 51 … … 34 65 } 35 66 36 public HeuristicLab.Hive. Server.Response Result {67 public HeuristicLab.Hive.Contracts.Response Result { 37 68 get { 38 69 base.RaiseExceptionIfNecessary(); 39 return ((HeuristicLab.Hive.Server.Response)(this.results[0])); 70 return ((HeuristicLab.Hive.Contracts.Response)(this.results[0])); 71 } 72 } 73 } 74 75 [System.Diagnostics.DebuggerStepThroughAttribute()] 76 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")] 77 public partial class SendHeartBeatCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { 78 79 private object[] results; 80 81 public SendHeartBeatCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 82 base(exception, cancelled, userState) { 83 this.results = results; 84 } 85 86 public HeuristicLab.Hive.Contracts.ResponseHB Result { 87 get { 88 base.RaiseExceptionIfNecessary(); 89 return ((HeuristicLab.Hive.Contracts.ResponseHB)(this.results[0])); 90 } 91 } 92 } 93 94 [System.Diagnostics.DebuggerStepThroughAttribute()] 95 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")] 96 public partial class PullJobCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { 97 98 private object[] results; 99 100 public PullJobCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 101 base(exception, cancelled, userState) { 102 this.results = results; 103 } 104 105 public HeuristicLab.Hive.Contracts.ResponseJob Result { 106 get { 107 base.RaiseExceptionIfNecessary(); 108 return ((HeuristicLab.Hive.Contracts.ResponseJob)(this.results[0])); 109 } 110 } 111 } 112 113 [System.Diagnostics.DebuggerStepThroughAttribute()] 114 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")] 115 public partial class SendJobResultCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { 116 117 private object[] results; 118 119 public SendJobResultCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 120 base(exception, cancelled, userState) { 121 this.results = results; 122 } 123 124 public HeuristicLab.Hive.Contracts.Response Result { 125 get { 126 base.RaiseExceptionIfNecessary(); 127 return ((HeuristicLab.Hive.Contracts.Response)(this.results[0])); 128 } 129 } 130 } 131 132 [System.Diagnostics.DebuggerStepThroughAttribute()] 133 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")] 134 public partial class LogoutCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { 135 136 private object[] results; 137 138 public LogoutCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 139 base(exception, cancelled, userState) { 140 this.results = results; 141 } 142 143 public HeuristicLab.Hive.Contracts.Response Result { 144 get { 145 base.RaiseExceptionIfNecessary(); 146 return ((HeuristicLab.Hive.Contracts.Response)(this.results[0])); 40 147 } 41 148 } … … 51 158 52 159 private System.Threading.SendOrPostCallback onLoginCompletedDelegate; 160 161 private BeginOperationDelegate onBeginSendHeartBeatDelegate; 162 163 private EndOperationDelegate onEndSendHeartBeatDelegate; 164 165 private System.Threading.SendOrPostCallback onSendHeartBeatCompletedDelegate; 166 167 private BeginOperationDelegate onBeginPullJobDelegate; 168 169 private EndOperationDelegate onEndPullJobDelegate; 170 171 private System.Threading.SendOrPostCallback onPullJobCompletedDelegate; 172 173 private BeginOperationDelegate onBeginSendJobResultDelegate; 174 175 private EndOperationDelegate onEndSendJobResultDelegate; 176 177 private System.Threading.SendOrPostCallback onSendJobResultCompletedDelegate; 178 179 private BeginOperationDelegate onBeginLogoutDelegate; 180 181 private EndOperationDelegate onEndLogoutDelegate; 182 183 private System.Threading.SendOrPostCallback onLogoutCompletedDelegate; 53 184 54 185 public ClientCommunicatorClient() { … … 73 204 public event System.EventHandler<LoginCompletedEventArgs> LoginCompleted; 74 205 75 public HeuristicLab.Hive.Server.Response Login(HeuristicLab.Hive.Contracts.BusinessObjects.Client clientInfo) { 206 public event System.EventHandler<SendHeartBeatCompletedEventArgs> SendHeartBeatCompleted; 207 208 public event System.EventHandler<PullJobCompletedEventArgs> PullJobCompleted; 209 210 public event System.EventHandler<SendJobResultCompletedEventArgs> SendJobResultCompleted; 211 212 public event System.EventHandler<LogoutCompletedEventArgs> LogoutCompleted; 213 214 public HeuristicLab.Hive.Contracts.Response Login(HeuristicLab.Hive.Contracts.BusinessObjects.Client clientInfo) { 76 215 return base.Channel.Login(clientInfo); 77 216 } … … 83 222 84 223 [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] 85 public HeuristicLab.Hive. Server.Response EndLogin(System.IAsyncResult result) {224 public HeuristicLab.Hive.Contracts.Response EndLogin(System.IAsyncResult result) { 86 225 return base.Channel.EndLogin(result); 87 226 } … … 93 232 94 233 private object[] OnEndLogin(System.IAsyncResult result) { 95 HeuristicLab.Hive. Server.Response retVal = this.EndLogin(result);234 HeuristicLab.Hive.Contracts.Response retVal = this.EndLogin(result); 96 235 return new object[] { 97 236 retVal}; … … 122 261 clientInfo}, this.onEndLoginDelegate, this.onLoginCompletedDelegate, userState); 123 262 } 263 264 public HeuristicLab.Hive.Contracts.ResponseHB SendHeartBeat(HeuristicLab.Hive.Contracts.BusinessObjects.HeartBeatData hbData) { 265 return base.Channel.SendHeartBeat(hbData); 266 } 267 268 [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] 269 public System.IAsyncResult BeginSendHeartBeat(HeuristicLab.Hive.Contracts.BusinessObjects.HeartBeatData hbData, System.AsyncCallback callback, object asyncState) { 270 return base.Channel.BeginSendHeartBeat(hbData, callback, asyncState); 271 } 272 273 [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] 274 public HeuristicLab.Hive.Contracts.ResponseHB EndSendHeartBeat(System.IAsyncResult result) { 275 return base.Channel.EndSendHeartBeat(result); 276 } 277 278 private System.IAsyncResult OnBeginSendHeartBeat(object[] inValues, System.AsyncCallback callback, object asyncState) { 279 HeuristicLab.Hive.Contracts.BusinessObjects.HeartBeatData hbData = ((HeuristicLab.Hive.Contracts.BusinessObjects.HeartBeatData)(inValues[0])); 280 return this.BeginSendHeartBeat(hbData, callback, asyncState); 281 } 282 283 private object[] OnEndSendHeartBeat(System.IAsyncResult result) { 284 HeuristicLab.Hive.Contracts.ResponseHB retVal = this.EndSendHeartBeat(result); 285 return new object[] { 286 retVal}; 287 } 288 289 private void OnSendHeartBeatCompleted(object state) { 290 if ((this.SendHeartBeatCompleted != null)) { 291 InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state)); 292 this.SendHeartBeatCompleted(this, new SendHeartBeatCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState)); 293 } 294 } 295 296 public void SendHeartBeatAsync(HeuristicLab.Hive.Contracts.BusinessObjects.HeartBeatData hbData) { 297 this.SendHeartBeatAsync(hbData, null); 298 } 299 300 public void SendHeartBeatAsync(HeuristicLab.Hive.Contracts.BusinessObjects.HeartBeatData hbData, object userState) { 301 if ((this.onBeginSendHeartBeatDelegate == null)) { 302 this.onBeginSendHeartBeatDelegate = new BeginOperationDelegate(this.OnBeginSendHeartBeat); 303 } 304 if ((this.onEndSendHeartBeatDelegate == null)) { 305 this.onEndSendHeartBeatDelegate = new EndOperationDelegate(this.OnEndSendHeartBeat); 306 } 307 if ((this.onSendHeartBeatCompletedDelegate == null)) { 308 this.onSendHeartBeatCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnSendHeartBeatCompleted); 309 } 310 base.InvokeAsync(this.onBeginSendHeartBeatDelegate, new object[] { 311 hbData}, this.onEndSendHeartBeatDelegate, this.onSendHeartBeatCompletedDelegate, userState); 312 } 313 314 public HeuristicLab.Hive.Contracts.ResponseJob PullJob(System.Guid clientId) { 315 return base.Channel.PullJob(clientId); 316 } 317 318 [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] 319 public System.IAsyncResult BeginPullJob(System.Guid clientId, System.AsyncCallback callback, object asyncState) { 320 return base.Channel.BeginPullJob(clientId, callback, asyncState); 321 } 322 323 [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] 324 public HeuristicLab.Hive.Contracts.ResponseJob EndPullJob(System.IAsyncResult result) { 325 return base.Channel.EndPullJob(result); 326 } 327 328 private System.IAsyncResult OnBeginPullJob(object[] inValues, System.AsyncCallback callback, object asyncState) { 329 System.Guid clientId = ((System.Guid)(inValues[0])); 330 return this.BeginPullJob(clientId, callback, asyncState); 331 } 332 333 private object[] OnEndPullJob(System.IAsyncResult result) { 334 HeuristicLab.Hive.Contracts.ResponseJob retVal = this.EndPullJob(result); 335 return new object[] { 336 retVal}; 337 } 338 339 private void OnPullJobCompleted(object state) { 340 if ((this.PullJobCompleted != null)) { 341 InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state)); 342 this.PullJobCompleted(this, new PullJobCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState)); 343 } 344 } 345 346 public void PullJobAsync(System.Guid clientId) { 347 this.PullJobAsync(clientId, null); 348 } 349 350 public void PullJobAsync(System.Guid clientId, object userState) { 351 if ((this.onBeginPullJobDelegate == null)) { 352 this.onBeginPullJobDelegate = new BeginOperationDelegate(this.OnBeginPullJob); 353 } 354 if ((this.onEndPullJobDelegate == null)) { 355 this.onEndPullJobDelegate = new EndOperationDelegate(this.OnEndPullJob); 356 } 357 if ((this.onPullJobCompletedDelegate == null)) { 358 this.onPullJobCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnPullJobCompleted); 359 } 360 base.InvokeAsync(this.onBeginPullJobDelegate, new object[] { 361 clientId}, this.onEndPullJobDelegate, this.onPullJobCompletedDelegate, userState); 362 } 363 364 public HeuristicLab.Hive.Contracts.Response SendJobResult(HeuristicLab.Hive.Contracts.BusinessObjects.JobResult Result, bool finished) { 365 return base.Channel.SendJobResult(Result, finished); 366 } 367 368 [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] 369 public System.IAsyncResult BeginSendJobResult(HeuristicLab.Hive.Contracts.BusinessObjects.JobResult Result, bool finished, System.AsyncCallback callback, object asyncState) { 370 return base.Channel.BeginSendJobResult(Result, finished, callback, asyncState); 371 } 372 373 [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] 374 public HeuristicLab.Hive.Contracts.Response EndSendJobResult(System.IAsyncResult result) { 375 return base.Channel.EndSendJobResult(result); 376 } 377 378 private System.IAsyncResult OnBeginSendJobResult(object[] inValues, System.AsyncCallback callback, object asyncState) { 379 HeuristicLab.Hive.Contracts.BusinessObjects.JobResult Result = ((HeuristicLab.Hive.Contracts.BusinessObjects.JobResult)(inValues[0])); 380 bool finished = ((bool)(inValues[1])); 381 return this.BeginSendJobResult(Result, finished, callback, asyncState); 382 } 383 384 private object[] OnEndSendJobResult(System.IAsyncResult result) { 385 HeuristicLab.Hive.Contracts.Response retVal = this.EndSendJobResult(result); 386 return new object[] { 387 retVal}; 388 } 389 390 private void OnSendJobResultCompleted(object state) { 391 if ((this.SendJobResultCompleted != null)) { 392 InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state)); 393 this.SendJobResultCompleted(this, new SendJobResultCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState)); 394 } 395 } 396 397 public void SendJobResultAsync(HeuristicLab.Hive.Contracts.BusinessObjects.JobResult Result, bool finished) { 398 this.SendJobResultAsync(Result, finished, null); 399 } 400 401 public void SendJobResultAsync(HeuristicLab.Hive.Contracts.BusinessObjects.JobResult Result, bool finished, object userState) { 402 if ((this.onBeginSendJobResultDelegate == null)) { 403 this.onBeginSendJobResultDelegate = new BeginOperationDelegate(this.OnBeginSendJobResult); 404 } 405 if ((this.onEndSendJobResultDelegate == null)) { 406 this.onEndSendJobResultDelegate = new EndOperationDelegate(this.OnEndSendJobResult); 407 } 408 if ((this.onSendJobResultCompletedDelegate == null)) { 409 this.onSendJobResultCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnSendJobResultCompleted); 410 } 411 base.InvokeAsync(this.onBeginSendJobResultDelegate, new object[] { 412 Result, 413 finished}, this.onEndSendJobResultDelegate, this.onSendJobResultCompletedDelegate, userState); 414 } 415 416 public HeuristicLab.Hive.Contracts.Response Logout(System.Guid clientId) { 417 return base.Channel.Logout(clientId); 418 } 419 420 [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] 421 public System.IAsyncResult BeginLogout(System.Guid clientId, System.AsyncCallback callback, object asyncState) { 422 return base.Channel.BeginLogout(clientId, callback, asyncState); 423 } 424 425 [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] 426 public HeuristicLab.Hive.Contracts.Response EndLogout(System.IAsyncResult result) { 427 return base.Channel.EndLogout(result); 428 } 429 430 private System.IAsyncResult OnBeginLogout(object[] inValues, System.AsyncCallback callback, object asyncState) { 431 System.Guid clientId = ((System.Guid)(inValues[0])); 432 return this.BeginLogout(clientId, callback, asyncState); 433 } 434 435 private object[] OnEndLogout(System.IAsyncResult result) { 436 HeuristicLab.Hive.Contracts.Response retVal = this.EndLogout(result); 437 return new object[] { 438 retVal}; 439 } 440 441 private void OnLogoutCompleted(object state) { 442 if ((this.LogoutCompleted != null)) { 443 InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state)); 444 this.LogoutCompleted(this, new LogoutCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState)); 445 } 446 } 447 448 public void LogoutAsync(System.Guid clientId) { 449 this.LogoutAsync(clientId, null); 450 } 451 452 public void LogoutAsync(System.Guid clientId, object userState) { 453 if ((this.onBeginLogoutDelegate == null)) { 454 this.onBeginLogoutDelegate = new BeginOperationDelegate(this.OnBeginLogout); 455 } 456 if ((this.onEndLogoutDelegate == null)) { 457 this.onEndLogoutDelegate = new EndOperationDelegate(this.OnEndLogout); 458 } 459 if ((this.onLogoutCompletedDelegate == null)) { 460 this.onLogoutCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnLogoutCompleted); 461 } 462 base.InvokeAsync(this.onBeginLogoutDelegate, new object[] { 463 clientId}, this.onEndLogoutDelegate, this.onLogoutCompletedDelegate, userState); 464 } 124 465 } 125 466 } 467 -
trunk/sources/HeuristicLab.Hive.Client.Communication/ServiceLocator.cs
r781 r790 13 13 proxy = new ClientCommunicatorClient( 14 14 new NetTcpBinding(), 15 new EndpointAddress("net.tcp://10.20.53. 7:9000/HiveServer/ClientCommunicator")15 new EndpointAddress("net.tcp://10.20.53.2:9000/HiveServer/ClientCommunicator") 16 16 ); 17 17 }
Note: See TracChangeset
for help on using the changeset viewer.