Changeset 1379
- Timestamp:
- 03/20/09 13:56:55 (16 years ago)
- Location:
- trunk/sources
- Files:
-
- 3 added
- 1 deleted
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Hive.Client.Communication/HeuristicLab.Hive.Client.Communication.csproj
r1377 r1379 122 122 <None Include="Properties\DataSources\HeuristicLab.Hive.Contracts.ResponseHB.datasource" /> 123 123 <None Include="Properties\DataSources\HeuristicLab.Hive.Contracts.ResponseJob.datasource" /> 124 <None Include="Properties\DataSources\HeuristicLab.Hive.Contracts.ResponsePlugin.datasource" /> 124 125 <None Include="Properties\DataSources\HeuristicLab.Hive.Contracts.ResponseResultReceived.datasource" /> 125 <None Include="Service References\ServerService\Arrays1.xsd" /> 126 <None Include="Service References\ServerService\Arrays.xsd" /> 127 <None Include="Service References\ServerService\HeuristicLab.DataAccess.xsd" /> 126 128 <None Include="Service References\ServerService\HeuristicLab.Hive.Contracts.BusinessObjects1.xsd" /> 127 129 <None Include="Service References\ServerService\HeuristicLab.Hive.Contracts1.xsd" /> -
trunk/sources/HeuristicLab.Hive.Client.Communication/Service References/ServerService/HeuristicLab.Hive.Contracts.BusinessObjects1.xsd
r1366 r1379 2 2 <xs:schema xmlns:tns="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Contracts.BusinessObjects" xmlns:ser="http://schemas.microsoft.com/2003/10/Serialization/" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Contracts.BusinessObjects" xmlns:xs="http://www.w3.org/2001/XMLSchema"> 3 3 <xs:import namespace="http://schemas.microsoft.com/2003/10/Serialization/" /> 4 <xs:import namespace="http://schemas.datacontract.org/2004/07/HeuristicLab.DataAccess" /> 4 5 <xs:import namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays" /> 5 6 <xs:complexType name="ClientInfo"> … … 22 23 <xs:complexType name="Resource"> 23 24 <xs:complexContent mixed="false"> 24 <xs:extension base="tns:HiveBaseObject">25 <xs:extension xmlns:q1="http://schemas.datacontract.org/2004/07/HeuristicLab.DataAccess" base="q1:PersistableObject"> 25 26 <xs:sequence> 26 27 <xs:element minOccurs="0" name="Name" nillable="true" type="xs:string" /> … … 30 31 </xs:complexType> 31 32 <xs:element name="Resource" nillable="true" type="tns:Resource" /> 32 <xs:complexType name="HiveBaseObject">33 <xs:sequence>34 <xs:element minOccurs="0" name="Id" type="xs:long" />35 </xs:sequence>36 </xs:complexType>37 <xs:element name="HiveBaseObject" nillable="true" type="tns:HiveBaseObject" />38 33 <xs:complexType name="ClientConfig"> 39 34 <xs:complexContent mixed="false"> 40 <xs:extension base="tns:HiveBaseObject">35 <xs:extension xmlns:q2="http://schemas.datacontract.org/2004/07/HeuristicLab.DataAccess" base="q2:PersistableObject"> 41 36 <xs:sequence> 42 37 <xs:element minOccurs="0" name="HeartBeatIntervall" type="xs:int" /> … … 60 55 <xs:sequence> 61 56 <xs:element minOccurs="0" name="ClientId" type="ser:guid" /> 62 <xs:element minOccurs="0" name=" freeCores" type="xs:int" />63 <xs:element minOccurs="0" name=" freeMemory" type="xs:int" />64 <xs:element xmlns:q 1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" minOccurs="0" name="jobProgress" nillable="true" type="q1:ArrayOfKeyValueOflongdouble" />57 <xs:element minOccurs="0" name="FreeCores" type="xs:int" /> 58 <xs:element minOccurs="0" name="FreeMemory" type="xs:int" /> 59 <xs:element xmlns:q3="http://schemas.microsoft.com/2003/10/Serialization/Arrays" minOccurs="0" name="JobProgress" nillable="true" type="q3:ArrayOfKeyValueOflongdouble" /> 65 60 </xs:sequence> 66 61 </xs:complexType> … … 68 63 <xs:complexType name="Job"> 69 64 <xs:complexContent mixed="false"> 70 <xs:extension base="tns:HiveBaseObject">65 <xs:extension xmlns:q4="http://schemas.datacontract.org/2004/07/HeuristicLab.DataAccess" base="q4:PersistableObject"> 71 66 <xs:sequence> 72 67 <xs:element minOccurs="0" name="Client" nillable="true" type="tns:ClientInfo" /> … … 78 73 <xs:element minOccurs="0" name="SerializedJob" nillable="true" type="xs:base64Binary" /> 79 74 <xs:element minOccurs="0" name="State" type="tns:State" /> 80 <xs:element minOccurs="0" name="User " nillable="true" type="tns:User" />75 <xs:element minOccurs="0" name="UserId" type="ser:guid" /> 81 76 </xs:sequence> 82 77 </xs:extension> … … 84 79 </xs:complexType> 85 80 <xs:element name="Job" nillable="true" type="tns:Job" /> 86 <xs:complexType name="User">87 <xs:complexContent mixed="false">88 <xs:extension base="tns:PermissionOwner">89 <xs:sequence>90 <xs:element minOccurs="0" name="Password" nillable="true" type="xs:string" />91 </xs:sequence>92 </xs:extension>93 </xs:complexContent>94 </xs:complexType>95 <xs:element name="User" nillable="true" type="tns:User" />96 <xs:complexType name="PermissionOwner">97 <xs:complexContent mixed="false">98 <xs:extension base="tns:HiveBaseObject">99 <xs:sequence>100 <xs:element minOccurs="0" name="Name" nillable="true" type="xs:string" />101 </xs:sequence>102 </xs:extension>103 </xs:complexContent>104 </xs:complexType>105 <xs:element name="PermissionOwner" nillable="true" type="tns:PermissionOwner" />106 81 </xs:schema> -
trunk/sources/HeuristicLab.Hive.Client.Communication/Service References/ServerService/HeuristicLab.Hive.Contracts1.xsd
r1366 r1379 66 66 </xs:complexType> 67 67 <xs:element name="ResponseResultReceived" nillable="true" type="tns:ResponseResultReceived" /> 68 <xs:complexType name="ResponsePlugin"> 69 <xs:complexContent mixed="false"> 70 <xs:extension base="tns:Response"> 71 <xs:sequence> 72 <xs:element minOccurs="0" name="Plugins" nillable="true" type="xs:base64Binary" /> 73 </xs:sequence> 74 </xs:extension> 75 </xs:complexContent> 76 </xs:complexType> 77 <xs:element name="ResponsePlugin" nillable="true" type="tns:ResponsePlugin" /> 68 78 </xs:schema> -
trunk/sources/HeuristicLab.Hive.Client.Communication/Service References/ServerService/Reference.cs
r1366 r1379 20 20 [System.ServiceModel.ServiceKnownTypeAttribute(typeof(HeuristicLab.Hive.Contracts.ResponseJob))] 21 21 [System.ServiceModel.ServiceKnownTypeAttribute(typeof(HeuristicLab.Hive.Contracts.ResponseResultReceived))] 22 [System.ServiceModel.ServiceKnownTypeAttribute(typeof(HeuristicLab.Hive.Contracts.ResponsePlugin))] 22 23 HeuristicLab.Hive.Contracts.Response Login(HeuristicLab.Hive.Contracts.BusinessObjects.ClientInfo clientInfo); 23 24 … … 43 44 HeuristicLab.Hive.Contracts.ResponseJob EndSendJob(System.IAsyncResult result); 44 45 45 [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IClientCommunicator/ProcessJobResult", ReplyAction="http://tempuri.org/IClientCommunicator/ProcessJobResultResponse")] 46 HeuristicLab.Hive.Contracts.ResponseResultReceived ProcessJobResult(System.Guid clientId, long jobId, byte[] result, double percentage, System.Exception exception, bool finished); 47 48 [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://tempuri.org/IClientCommunicator/ProcessJobResult", ReplyAction="http://tempuri.org/IClientCommunicator/ProcessJobResultResponse")] 49 System.IAsyncResult BeginProcessJobResult(System.Guid clientId, long jobId, byte[] result, double percentage, System.Exception exception, bool finished, System.AsyncCallback callback, object asyncState); 50 51 HeuristicLab.Hive.Contracts.ResponseResultReceived EndProcessJobResult(System.IAsyncResult result); 46 [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IClientCommunicator/StoreFinishedJobResult", ReplyAction="http://tempuri.org/IClientCommunicator/StoreFinishedJobResultResponse")] 47 HeuristicLab.Hive.Contracts.ResponseResultReceived StoreFinishedJobResult(System.Guid clientId, long jobId, byte[] result, double percentage, System.Exception exception); 48 49 [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://tempuri.org/IClientCommunicator/StoreFinishedJobResult", ReplyAction="http://tempuri.org/IClientCommunicator/StoreFinishedJobResultResponse")] 50 System.IAsyncResult BeginStoreFinishedJobResult(System.Guid clientId, long jobId, byte[] result, double percentage, System.Exception exception, System.AsyncCallback callback, object asyncState); 51 52 HeuristicLab.Hive.Contracts.ResponseResultReceived EndStoreFinishedJobResult(System.IAsyncResult result); 53 54 [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IClientCommunicator/ProcessSnapshot", ReplyAction="http://tempuri.org/IClientCommunicator/ProcessSnapshotResponse")] 55 HeuristicLab.Hive.Contracts.ResponseResultReceived ProcessSnapshot(System.Guid clientId, long jobId, byte[] result, double percentage, System.Exception exception); 56 57 [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://tempuri.org/IClientCommunicator/ProcessSnapshot", ReplyAction="http://tempuri.org/IClientCommunicator/ProcessSnapshotResponse")] 58 System.IAsyncResult BeginProcessSnapshot(System.Guid clientId, long jobId, byte[] result, double percentage, System.Exception exception, System.AsyncCallback callback, object asyncState); 59 60 HeuristicLab.Hive.Contracts.ResponseResultReceived EndProcessSnapshot(System.IAsyncResult result); 52 61 53 62 [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IClientCommunicator/Logout", ReplyAction="http://tempuri.org/IClientCommunicator/LogoutResponse")] … … 55 64 [System.ServiceModel.ServiceKnownTypeAttribute(typeof(HeuristicLab.Hive.Contracts.ResponseJob))] 56 65 [System.ServiceModel.ServiceKnownTypeAttribute(typeof(HeuristicLab.Hive.Contracts.ResponseResultReceived))] 66 [System.ServiceModel.ServiceKnownTypeAttribute(typeof(HeuristicLab.Hive.Contracts.ResponsePlugin))] 57 67 HeuristicLab.Hive.Contracts.Response Logout(System.Guid clientId); 58 68 … … 61 71 62 72 HeuristicLab.Hive.Contracts.Response EndLogout(System.IAsyncResult result); 73 74 [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IClientCommunicator/IsJobStillNeeded", ReplyAction="http://tempuri.org/IClientCommunicator/IsJobStillNeededResponse")] 75 [System.ServiceModel.ServiceKnownTypeAttribute(typeof(HeuristicLab.Hive.Contracts.ResponseHB))] 76 [System.ServiceModel.ServiceKnownTypeAttribute(typeof(HeuristicLab.Hive.Contracts.ResponseJob))] 77 [System.ServiceModel.ServiceKnownTypeAttribute(typeof(HeuristicLab.Hive.Contracts.ResponseResultReceived))] 78 [System.ServiceModel.ServiceKnownTypeAttribute(typeof(HeuristicLab.Hive.Contracts.ResponsePlugin))] 79 HeuristicLab.Hive.Contracts.Response IsJobStillNeeded(long jobId); 80 81 [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://tempuri.org/IClientCommunicator/IsJobStillNeeded", ReplyAction="http://tempuri.org/IClientCommunicator/IsJobStillNeededResponse")] 82 System.IAsyncResult BeginIsJobStillNeeded(long jobId, System.AsyncCallback callback, object asyncState); 83 84 HeuristicLab.Hive.Contracts.Response EndIsJobStillNeeded(System.IAsyncResult result); 85 86 [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IClientCommunicator/SendPlugins", ReplyAction="http://tempuri.org/IClientCommunicator/SendPluginsResponse")] 87 HeuristicLab.Hive.Contracts.ResponsePlugin SendPlugins(string[] pluginList); 88 89 [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://tempuri.org/IClientCommunicator/SendPlugins", ReplyAction="http://tempuri.org/IClientCommunicator/SendPluginsResponse")] 90 System.IAsyncResult BeginSendPlugins(string[] pluginList, System.AsyncCallback callback, object asyncState); 91 92 HeuristicLab.Hive.Contracts.ResponsePlugin EndSendPlugins(System.IAsyncResult result); 63 93 } 64 94 … … 126 156 [System.Diagnostics.DebuggerStepThroughAttribute()] 127 157 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")] 128 public partial class ProcessJobResultCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {158 public partial class StoreFinishedJobResultCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { 129 159 130 160 private object[] results; 131 161 132 public ProcessJobResultCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :162 public StoreFinishedJobResultCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 133 163 base(exception, cancelled, userState) { 134 164 this.results = results; … … 145 175 [System.Diagnostics.DebuggerStepThroughAttribute()] 146 176 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")] 177 public partial class ProcessSnapshotCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { 178 179 private object[] results; 180 181 public ProcessSnapshotCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 182 base(exception, cancelled, userState) { 183 this.results = results; 184 } 185 186 public HeuristicLab.Hive.Contracts.ResponseResultReceived Result { 187 get { 188 base.RaiseExceptionIfNecessary(); 189 return ((HeuristicLab.Hive.Contracts.ResponseResultReceived)(this.results[0])); 190 } 191 } 192 } 193 194 [System.Diagnostics.DebuggerStepThroughAttribute()] 195 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")] 147 196 public partial class LogoutCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { 148 197 … … 164 213 [System.Diagnostics.DebuggerStepThroughAttribute()] 165 214 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")] 215 public partial class IsJobStillNeededCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { 216 217 private object[] results; 218 219 public IsJobStillNeededCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 220 base(exception, cancelled, userState) { 221 this.results = results; 222 } 223 224 public HeuristicLab.Hive.Contracts.Response Result { 225 get { 226 base.RaiseExceptionIfNecessary(); 227 return ((HeuristicLab.Hive.Contracts.Response)(this.results[0])); 228 } 229 } 230 } 231 232 [System.Diagnostics.DebuggerStepThroughAttribute()] 233 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")] 234 public partial class SendPluginsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { 235 236 private object[] results; 237 238 public SendPluginsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 239 base(exception, cancelled, userState) { 240 this.results = results; 241 } 242 243 public HeuristicLab.Hive.Contracts.ResponsePlugin Result { 244 get { 245 base.RaiseExceptionIfNecessary(); 246 return ((HeuristicLab.Hive.Contracts.ResponsePlugin)(this.results[0])); 247 } 248 } 249 } 250 251 [System.Diagnostics.DebuggerStepThroughAttribute()] 252 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")] 166 253 public partial class ClientCommunicatorClient : System.ServiceModel.ClientBase<HeuristicLab.Hive.Client.Communication.ServerService.IClientCommunicator>, HeuristicLab.Hive.Client.Communication.ServerService.IClientCommunicator { 167 254 … … 184 271 private System.Threading.SendOrPostCallback onSendJobCompletedDelegate; 185 272 186 private BeginOperationDelegate onBeginProcessJobResultDelegate; 187 188 private EndOperationDelegate onEndProcessJobResultDelegate; 189 190 private System.Threading.SendOrPostCallback onProcessJobResultCompletedDelegate; 273 private BeginOperationDelegate onBeginStoreFinishedJobResultDelegate; 274 275 private EndOperationDelegate onEndStoreFinishedJobResultDelegate; 276 277 private System.Threading.SendOrPostCallback onStoreFinishedJobResultCompletedDelegate; 278 279 private BeginOperationDelegate onBeginProcessSnapshotDelegate; 280 281 private EndOperationDelegate onEndProcessSnapshotDelegate; 282 283 private System.Threading.SendOrPostCallback onProcessSnapshotCompletedDelegate; 191 284 192 285 private BeginOperationDelegate onBeginLogoutDelegate; … … 195 288 196 289 private System.Threading.SendOrPostCallback onLogoutCompletedDelegate; 290 291 private BeginOperationDelegate onBeginIsJobStillNeededDelegate; 292 293 private EndOperationDelegate onEndIsJobStillNeededDelegate; 294 295 private System.Threading.SendOrPostCallback onIsJobStillNeededCompletedDelegate; 296 297 private BeginOperationDelegate onBeginSendPluginsDelegate; 298 299 private EndOperationDelegate onEndSendPluginsDelegate; 300 301 private System.Threading.SendOrPostCallback onSendPluginsCompletedDelegate; 197 302 198 303 public ClientCommunicatorClient() { … … 221 326 public event System.EventHandler<SendJobCompletedEventArgs> SendJobCompleted; 222 327 223 public event System.EventHandler<ProcessJobResultCompletedEventArgs> ProcessJobResultCompleted; 328 public event System.EventHandler<StoreFinishedJobResultCompletedEventArgs> StoreFinishedJobResultCompleted; 329 330 public event System.EventHandler<ProcessSnapshotCompletedEventArgs> ProcessSnapshotCompleted; 224 331 225 332 public event System.EventHandler<LogoutCompletedEventArgs> LogoutCompleted; 333 334 public event System.EventHandler<IsJobStillNeededCompletedEventArgs> IsJobStillNeededCompleted; 335 336 public event System.EventHandler<SendPluginsCompletedEventArgs> SendPluginsCompleted; 226 337 227 338 public HeuristicLab.Hive.Contracts.Response Login(HeuristicLab.Hive.Contracts.BusinessObjects.ClientInfo clientInfo) { … … 375 486 } 376 487 377 public HeuristicLab.Hive.Contracts.ResponseResultReceived ProcessJobResult(System.Guid clientId, long jobId, byte[] result, double percentage, System.Exception exception, bool finished) {378 return base.Channel. ProcessJobResult(clientId, jobId, result, percentage, exception, finished);379 } 380 381 [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] 382 public System.IAsyncResult Begin ProcessJobResult(System.Guid clientId, long jobId, byte[] result, double percentage, System.Exception exception, bool finished, System.AsyncCallback callback, object asyncState) {383 return base.Channel.Begin ProcessJobResult(clientId, jobId, result, percentage, exception, finished, callback, asyncState);384 } 385 386 [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] 387 public HeuristicLab.Hive.Contracts.ResponseResultReceived End ProcessJobResult(System.IAsyncResult result) {388 return base.Channel.End ProcessJobResult(result);389 } 390 391 private System.IAsyncResult OnBegin ProcessJobResult(object[] inValues, System.AsyncCallback callback, object asyncState) {488 public HeuristicLab.Hive.Contracts.ResponseResultReceived StoreFinishedJobResult(System.Guid clientId, long jobId, byte[] result, double percentage, System.Exception exception) { 489 return base.Channel.StoreFinishedJobResult(clientId, jobId, result, percentage, exception); 490 } 491 492 [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] 493 public System.IAsyncResult BeginStoreFinishedJobResult(System.Guid clientId, long jobId, byte[] result, double percentage, System.Exception exception, System.AsyncCallback callback, object asyncState) { 494 return base.Channel.BeginStoreFinishedJobResult(clientId, jobId, result, percentage, exception, callback, asyncState); 495 } 496 497 [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] 498 public HeuristicLab.Hive.Contracts.ResponseResultReceived EndStoreFinishedJobResult(System.IAsyncResult result) { 499 return base.Channel.EndStoreFinishedJobResult(result); 500 } 501 502 private System.IAsyncResult OnBeginStoreFinishedJobResult(object[] inValues, System.AsyncCallback callback, object asyncState) { 392 503 System.Guid clientId = ((System.Guid)(inValues[0])); 393 504 long jobId = ((long)(inValues[1])); … … 395 506 double percentage = ((double)(inValues[3])); 396 507 System.Exception exception = ((System.Exception)(inValues[4])); 397 bool finished = ((bool)(inValues[5])); 398 return this.BeginProcessJobResult(clientId, jobId, result, percentage, exception, finished, callback, asyncState); 399 } 400 401 private object[] OnEndProcessJobResult(System.IAsyncResult result) { 402 HeuristicLab.Hive.Contracts.ResponseResultReceived retVal = this.EndProcessJobResult(result); 508 return this.BeginStoreFinishedJobResult(clientId, jobId, result, percentage, exception, callback, asyncState); 509 } 510 511 private object[] OnEndStoreFinishedJobResult(System.IAsyncResult result) { 512 HeuristicLab.Hive.Contracts.ResponseResultReceived retVal = this.EndStoreFinishedJobResult(result); 403 513 return new object[] { 404 514 retVal}; 405 515 } 406 516 407 private void On ProcessJobResultCompleted(object state) {408 if ((this. ProcessJobResultCompleted != null)) {517 private void OnStoreFinishedJobResultCompleted(object state) { 518 if ((this.StoreFinishedJobResultCompleted != null)) { 409 519 InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state)); 410 this. ProcessJobResultCompleted(this, new ProcessJobResultCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));411 } 412 } 413 414 public void ProcessJobResultAsync(System.Guid clientId, long jobId, byte[] result, double percentage, System.Exception exception, bool finished) {415 this. ProcessJobResultAsync(clientId, jobId, result, percentage, exception, finished, null);416 } 417 418 public void ProcessJobResultAsync(System.Guid clientId, long jobId, byte[] result, double percentage, System.Exception exception, bool finished, object userState) {419 if ((this.onBegin ProcessJobResultDelegate == null)) {420 this.onBegin ProcessJobResultDelegate = new BeginOperationDelegate(this.OnBeginProcessJobResult);421 } 422 if ((this.onEnd ProcessJobResultDelegate == null)) {423 this.onEnd ProcessJobResultDelegate = new EndOperationDelegate(this.OnEndProcessJobResult);424 } 425 if ((this.on ProcessJobResultCompletedDelegate == null)) {426 this.on ProcessJobResultCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnProcessJobResultCompleted);427 } 428 base.InvokeAsync(this.onBegin ProcessJobResultDelegate, new object[] {520 this.StoreFinishedJobResultCompleted(this, new StoreFinishedJobResultCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState)); 521 } 522 } 523 524 public void StoreFinishedJobResultAsync(System.Guid clientId, long jobId, byte[] result, double percentage, System.Exception exception) { 525 this.StoreFinishedJobResultAsync(clientId, jobId, result, percentage, exception, null); 526 } 527 528 public void StoreFinishedJobResultAsync(System.Guid clientId, long jobId, byte[] result, double percentage, System.Exception exception, object userState) { 529 if ((this.onBeginStoreFinishedJobResultDelegate == null)) { 530 this.onBeginStoreFinishedJobResultDelegate = new BeginOperationDelegate(this.OnBeginStoreFinishedJobResult); 531 } 532 if ((this.onEndStoreFinishedJobResultDelegate == null)) { 533 this.onEndStoreFinishedJobResultDelegate = new EndOperationDelegate(this.OnEndStoreFinishedJobResult); 534 } 535 if ((this.onStoreFinishedJobResultCompletedDelegate == null)) { 536 this.onStoreFinishedJobResultCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnStoreFinishedJobResultCompleted); 537 } 538 base.InvokeAsync(this.onBeginStoreFinishedJobResultDelegate, new object[] { 429 539 clientId, 430 540 jobId, 431 541 result, 432 542 percentage, 433 exception, 434 finished}, this.onEndProcessJobResultDelegate, this.onProcessJobResultCompletedDelegate, userState); 543 exception}, this.onEndStoreFinishedJobResultDelegate, this.onStoreFinishedJobResultCompletedDelegate, userState); 544 } 545 546 public HeuristicLab.Hive.Contracts.ResponseResultReceived ProcessSnapshot(System.Guid clientId, long jobId, byte[] result, double percentage, System.Exception exception) { 547 return base.Channel.ProcessSnapshot(clientId, jobId, result, percentage, exception); 548 } 549 550 [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] 551 public System.IAsyncResult BeginProcessSnapshot(System.Guid clientId, long jobId, byte[] result, double percentage, System.Exception exception, System.AsyncCallback callback, object asyncState) { 552 return base.Channel.BeginProcessSnapshot(clientId, jobId, result, percentage, exception, callback, asyncState); 553 } 554 555 [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] 556 public HeuristicLab.Hive.Contracts.ResponseResultReceived EndProcessSnapshot(System.IAsyncResult result) { 557 return base.Channel.EndProcessSnapshot(result); 558 } 559 560 private System.IAsyncResult OnBeginProcessSnapshot(object[] inValues, System.AsyncCallback callback, object asyncState) { 561 System.Guid clientId = ((System.Guid)(inValues[0])); 562 long jobId = ((long)(inValues[1])); 563 byte[] result = ((byte[])(inValues[2])); 564 double percentage = ((double)(inValues[3])); 565 System.Exception exception = ((System.Exception)(inValues[4])); 566 return this.BeginProcessSnapshot(clientId, jobId, result, percentage, exception, callback, asyncState); 567 } 568 569 private object[] OnEndProcessSnapshot(System.IAsyncResult result) { 570 HeuristicLab.Hive.Contracts.ResponseResultReceived retVal = this.EndProcessSnapshot(result); 571 return new object[] { 572 retVal}; 573 } 574 575 private void OnProcessSnapshotCompleted(object state) { 576 if ((this.ProcessSnapshotCompleted != null)) { 577 InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state)); 578 this.ProcessSnapshotCompleted(this, new ProcessSnapshotCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState)); 579 } 580 } 581 582 public void ProcessSnapshotAsync(System.Guid clientId, long jobId, byte[] result, double percentage, System.Exception exception) { 583 this.ProcessSnapshotAsync(clientId, jobId, result, percentage, exception, null); 584 } 585 586 public void ProcessSnapshotAsync(System.Guid clientId, long jobId, byte[] result, double percentage, System.Exception exception, object userState) { 587 if ((this.onBeginProcessSnapshotDelegate == null)) { 588 this.onBeginProcessSnapshotDelegate = new BeginOperationDelegate(this.OnBeginProcessSnapshot); 589 } 590 if ((this.onEndProcessSnapshotDelegate == null)) { 591 this.onEndProcessSnapshotDelegate = new EndOperationDelegate(this.OnEndProcessSnapshot); 592 } 593 if ((this.onProcessSnapshotCompletedDelegate == null)) { 594 this.onProcessSnapshotCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnProcessSnapshotCompleted); 595 } 596 base.InvokeAsync(this.onBeginProcessSnapshotDelegate, new object[] { 597 clientId, 598 jobId, 599 result, 600 percentage, 601 exception}, this.onEndProcessSnapshotDelegate, this.onProcessSnapshotCompletedDelegate, userState); 435 602 } 436 603 … … 484 651 clientId}, this.onEndLogoutDelegate, this.onLogoutCompletedDelegate, userState); 485 652 } 653 654 public HeuristicLab.Hive.Contracts.Response IsJobStillNeeded(long jobId) { 655 return base.Channel.IsJobStillNeeded(jobId); 656 } 657 658 [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] 659 public System.IAsyncResult BeginIsJobStillNeeded(long jobId, System.AsyncCallback callback, object asyncState) { 660 return base.Channel.BeginIsJobStillNeeded(jobId, callback, asyncState); 661 } 662 663 [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] 664 public HeuristicLab.Hive.Contracts.Response EndIsJobStillNeeded(System.IAsyncResult result) { 665 return base.Channel.EndIsJobStillNeeded(result); 666 } 667 668 private System.IAsyncResult OnBeginIsJobStillNeeded(object[] inValues, System.AsyncCallback callback, object asyncState) { 669 long jobId = ((long)(inValues[0])); 670 return this.BeginIsJobStillNeeded(jobId, callback, asyncState); 671 } 672 673 private object[] OnEndIsJobStillNeeded(System.IAsyncResult result) { 674 HeuristicLab.Hive.Contracts.Response retVal = this.EndIsJobStillNeeded(result); 675 return new object[] { 676 retVal}; 677 } 678 679 private void OnIsJobStillNeededCompleted(object state) { 680 if ((this.IsJobStillNeededCompleted != null)) { 681 InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state)); 682 this.IsJobStillNeededCompleted(this, new IsJobStillNeededCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState)); 683 } 684 } 685 686 public void IsJobStillNeededAsync(long jobId) { 687 this.IsJobStillNeededAsync(jobId, null); 688 } 689 690 public void IsJobStillNeededAsync(long jobId, object userState) { 691 if ((this.onBeginIsJobStillNeededDelegate == null)) { 692 this.onBeginIsJobStillNeededDelegate = new BeginOperationDelegate(this.OnBeginIsJobStillNeeded); 693 } 694 if ((this.onEndIsJobStillNeededDelegate == null)) { 695 this.onEndIsJobStillNeededDelegate = new EndOperationDelegate(this.OnEndIsJobStillNeeded); 696 } 697 if ((this.onIsJobStillNeededCompletedDelegate == null)) { 698 this.onIsJobStillNeededCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnIsJobStillNeededCompleted); 699 } 700 base.InvokeAsync(this.onBeginIsJobStillNeededDelegate, new object[] { 701 jobId}, this.onEndIsJobStillNeededDelegate, this.onIsJobStillNeededCompletedDelegate, userState); 702 } 703 704 public HeuristicLab.Hive.Contracts.ResponsePlugin SendPlugins(string[] pluginList) { 705 return base.Channel.SendPlugins(pluginList); 706 } 707 708 [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] 709 public System.IAsyncResult BeginSendPlugins(string[] pluginList, System.AsyncCallback callback, object asyncState) { 710 return base.Channel.BeginSendPlugins(pluginList, callback, asyncState); 711 } 712 713 [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] 714 public HeuristicLab.Hive.Contracts.ResponsePlugin EndSendPlugins(System.IAsyncResult result) { 715 return base.Channel.EndSendPlugins(result); 716 } 717 718 private System.IAsyncResult OnBeginSendPlugins(object[] inValues, System.AsyncCallback callback, object asyncState) { 719 string[] pluginList = ((string[])(inValues[0])); 720 return this.BeginSendPlugins(pluginList, callback, asyncState); 721 } 722 723 private object[] OnEndSendPlugins(System.IAsyncResult result) { 724 HeuristicLab.Hive.Contracts.ResponsePlugin retVal = this.EndSendPlugins(result); 725 return new object[] { 726 retVal}; 727 } 728 729 private void OnSendPluginsCompleted(object state) { 730 if ((this.SendPluginsCompleted != null)) { 731 InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state)); 732 this.SendPluginsCompleted(this, new SendPluginsCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState)); 733 } 734 } 735 736 public void SendPluginsAsync(string[] pluginList) { 737 this.SendPluginsAsync(pluginList, null); 738 } 739 740 public void SendPluginsAsync(string[] pluginList, object userState) { 741 if ((this.onBeginSendPluginsDelegate == null)) { 742 this.onBeginSendPluginsDelegate = new BeginOperationDelegate(this.OnBeginSendPlugins); 743 } 744 if ((this.onEndSendPluginsDelegate == null)) { 745 this.onEndSendPluginsDelegate = new EndOperationDelegate(this.OnEndSendPlugins); 746 } 747 if ((this.onSendPluginsCompletedDelegate == null)) { 748 this.onSendPluginsCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnSendPluginsCompleted); 749 } 750 base.InvokeAsync(this.onBeginSendPluginsDelegate, new object[] { 751 pluginList}, this.onEndSendPluginsDelegate, this.onSendPluginsCompletedDelegate, userState); 752 } 486 753 } 487 754 } -
trunk/sources/HeuristicLab.Hive.Client.Communication/Service References/ServerService/Reference.svcmap
r1366 r1379 18 18 </ClientOptions> 19 19 <MetadataSources> 20 <MetadataSource Address="net.tcp://10.20.53. 2:9000/HiveServer/mex" Protocol="mex" SourceId="1" />20 <MetadataSource Address="net.tcp://10.20.53.3:9000/HiveServer/mex" Protocol="mex" SourceId="1" /> 21 21 </MetadataSources> 22 22 <Metadata> 23 <MetadataFile FileName="service1.wsdl" MetadataType="Wsdl" ID="82cfa882-0330-4203-b34c-ea82d152db7d" SourceId="1" SourceUrl="net.tcp://10.20.53.2:9000/HiveServer/mex" /> 24 <MetadataFile FileName="service2.xsd" MetadataType="Schema" ID="11d3bb75-8299-4928-b8dc-d716378ed760" SourceId="1" SourceUrl="net.tcp://10.20.53.2:9000/HiveServer/mex" /> 25 <MetadataFile FileName="service3.xsd" MetadataType="Schema" ID="e023ab8b-7af8-4c99-987d-6639735b1600" SourceId="1" SourceUrl="net.tcp://10.20.53.2:9000/HiveServer/mex" /> 26 <MetadataFile FileName="HeuristicLab.Hive.Contracts.BusinessObjects1.xsd" MetadataType="Schema" ID="a2b9f991-9c94-4b82-8de5-3797a066d2a4" SourceId="1" SourceUrl="net.tcp://10.20.53.2:9000/HiveServer/mex" /> 27 <MetadataFile FileName="HeuristicLab.Hive.Contracts1.xsd" MetadataType="Schema" ID="7d7ae733-1ac7-47bc-8215-a17cba2f7f23" SourceId="1" SourceUrl="net.tcp://10.20.53.2:9000/HiveServer/mex" /> 28 <MetadataFile FileName="Arrays1.xsd" MetadataType="Schema" ID="77920668-a89e-49ed-acc6-98584ea7aefb" SourceId="1" SourceUrl="net.tcp://10.20.53.2:9000/HiveServer/mex" /> 29 <MetadataFile FileName="System1.xsd" MetadataType="Schema" ID="681a5cc3-c407-4ae9-8e77-0b0e8efa299d" SourceId="1" SourceUrl="net.tcp://10.20.53.2:9000/HiveServer/mex" /> 23 <MetadataFile FileName="service1.wsdl" MetadataType="Wsdl" ID="9a3a50f8-3779-4e16-9fef-d8a373f7ff94" SourceId="1" SourceUrl="net.tcp://10.20.53.3:9000/HiveServer/mex" /> 24 <MetadataFile FileName="service2.xsd" MetadataType="Schema" ID="735695ce-6295-4bf1-9d88-11005317d84a" SourceId="1" SourceUrl="net.tcp://10.20.53.3:9000/HiveServer/mex" /> 25 <MetadataFile FileName="service3.xsd" MetadataType="Schema" ID="bd04471f-a95e-4abf-af17-6292f4dc3482" SourceId="1" SourceUrl="net.tcp://10.20.53.3:9000/HiveServer/mex" /> 26 <MetadataFile FileName="HeuristicLab.Hive.Contracts.BusinessObjects1.xsd" MetadataType="Schema" ID="092b1a9a-88d0-4e2b-ac02-0e6580be4547" SourceId="1" SourceUrl="net.tcp://10.20.53.3:9000/HiveServer/mex" /> 27 <MetadataFile FileName="HeuristicLab.DataAccess.xsd" MetadataType="Schema" ID="7a6b32ca-8a1f-4b6a-88e8-8b1aea9167c0" SourceId="1" SourceUrl="net.tcp://10.20.53.3:9000/HiveServer/mex" /> 28 <MetadataFile FileName="HeuristicLab.Hive.Contracts1.xsd" MetadataType="Schema" ID="a0ecfa49-b2b3-4fa0-822f-720f9111893a" SourceId="1" SourceUrl="net.tcp://10.20.53.3:9000/HiveServer/mex" /> 29 <MetadataFile FileName="Arrays.xsd" MetadataType="Schema" ID="c38ef568-759d-4e63-902a-2915442cb7ce" SourceId="1" SourceUrl="net.tcp://10.20.53.3:9000/HiveServer/mex" /> 30 <MetadataFile FileName="System1.xsd" MetadataType="Schema" ID="0eba9d8e-f039-45d9-928b-146e162b1103" SourceId="1" SourceUrl="net.tcp://10.20.53.3:9000/HiveServer/mex" /> 30 31 </Metadata> 31 32 <Extensions> -
trunk/sources/HeuristicLab.Hive.Client.Communication/Service References/ServerService/configuration.svcinfo
r1366 r1379 3 3 <behaviors /> 4 4 <bindings> 5 <binding digest="System.ServiceModel.Configuration.NetTcpBindingElement, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:<?xml version="1.0" encoding="utf-16"?><Data hostNameComparisonMode="StrongWildcard" listenBacklog="10" maxBufferSize="65536" maxConnections="10" name="NetTcpBinding_IClientCommunicator" transactionFlow="false" transactionProtocol="OleTransactions" transferMode="Buffered"><readerQuotas maxArrayLength="16384" maxBytesPerRead="4096" maxDepth="32" maxNameTableCharCount="16384" maxStringContentLength="8192" /><reliableSession enabled=" false" inactivityTimeout="00:10:00" ordered="true" /><security mode="Transport"><message clientCredentialType="Windows" /><transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" /></security></Data>" bindingType="netTcpBinding" name="NetTcpBinding_IClientCommunicator" />5 <binding digest="System.ServiceModel.Configuration.NetTcpBindingElement, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:<?xml version="1.0" encoding="utf-16"?><Data hostNameComparisonMode="StrongWildcard" listenBacklog="10" maxBufferSize="65536" maxConnections="10" name="NetTcpBinding_IClientCommunicator" transactionFlow="false" transactionProtocol="OleTransactions" transferMode="Buffered"><readerQuotas maxArrayLength="16384" maxBytesPerRead="4096" maxDepth="32" maxNameTableCharCount="16384" maxStringContentLength="8192" /><reliableSession enabled="true" inactivityTimeout="00:10:00" ordered="true" /><security mode="None"><message clientCredentialType="Windows" /><transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" /></security></Data>" bindingType="netTcpBinding" name="NetTcpBinding_IClientCommunicator" /> 6 6 </bindings> 7 7 <endpoints> 8 <endpoint normalizedDigest="<?xml version="1.0" encoding="utf-16"?><Data address="net.tcp://10.20.53. 2:9000/HiveServer/ClientCommunicator" binding="netTcpBinding" bindingConfiguration="NetTcpBinding_IClientCommunicator" contract="ServerService.IClientCommunicator" name="NetTcpBinding_IClientCommunicator"><identity><userPrincipalName value="mse08023@fhs-hagenberg.ac.at" /></identity></Data>" digest="<?xml version="1.0" encoding="utf-16"?><Data address="net.tcp://10.20.53.2:9000/HiveServer/ClientCommunicator" binding="netTcpBinding" bindingConfiguration="NetTcpBinding_IClientCommunicator" contract="ServerService.IClientCommunicator" name="NetTcpBinding_IClientCommunicator"><identity><userPrincipalName value="mse08023@fhs-hagenberg.ac.at" /></identity></Data>" contractName="ServerService.IClientCommunicator" name="NetTcpBinding_IClientCommunicator" />8 <endpoint normalizedDigest="<?xml version="1.0" encoding="utf-16"?><Data address="net.tcp://10.20.53.3:9000/HiveServer/ClientCommunicator" binding="netTcpBinding" bindingConfiguration="NetTcpBinding_IClientCommunicator" contract="ServerService.IClientCommunicator" name="NetTcpBinding_IClientCommunicator" />" digest="<?xml version="1.0" encoding="utf-16"?><Data address="net.tcp://10.20.53.3:9000/HiveServer/ClientCommunicator" binding="netTcpBinding" bindingConfiguration="NetTcpBinding_IClientCommunicator" contract="ServerService.IClientCommunicator" name="NetTcpBinding_IClientCommunicator" />" contractName="ServerService.IClientCommunicator" name="NetTcpBinding_IClientCommunicator" /> 9 9 </endpoints> 10 10 </configurationSnapshot> -
trunk/sources/HeuristicLab.Hive.Client.Communication/Service References/ServerService/configuration91.svcinfo
r1366 r1379 1 1 <?xml version="1.0" encoding="utf-8"?> 2 <SavedWcfConfigurationInformation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="9.1" CheckSum=" Rqe47epOB9kn3CQ5FcfRHLaniGg=">2 <SavedWcfConfigurationInformation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="9.1" CheckSum="Nwi0N5LZnU7QQwSvbAcjLVRBz9w="> 3 3 <bindingConfigurations> 4 4 <bindingConfiguration bindingType="netTcpBinding" name="NetTcpBinding_IClientCommunicator"> … … 77 77 </property> 78 78 <property path="/reliableSession/enabled" isComplexType="false" isExplicitlyDefined="true" clrType="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 79 <serializedValue> False</serializedValue>79 <serializedValue>True</serializedValue> 80 80 </property> 81 81 <property path="/security" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.NetTcpSecurityElement, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> … … 83 83 </property> 84 84 <property path="/security/mode" isComplexType="false" isExplicitlyDefined="true" clrType="System.ServiceModel.SecurityMode, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 85 <serializedValue> Transport</serializedValue>85 <serializedValue>None</serializedValue> 86 86 </property> 87 87 <property path="/security/transport" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.TcpTransportSecurityElement, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> … … 107 107 </bindingConfigurations> 108 108 <endpoints> 109 <endpoint name="NetTcpBinding_IClientCommunicator" contract="ServerService.IClientCommunicator" bindingType="netTcpBinding" address="net.tcp://10.20.53. 2:9000/HiveServer/ClientCommunicator" bindingConfiguration="NetTcpBinding_IClientCommunicator">109 <endpoint name="NetTcpBinding_IClientCommunicator" contract="ServerService.IClientCommunicator" bindingType="netTcpBinding" address="net.tcp://10.20.53.3:9000/HiveServer/ClientCommunicator" bindingConfiguration="NetTcpBinding_IClientCommunicator"> 110 110 <properties> 111 111 <property path="/address" isComplexType="false" isExplicitlyDefined="true" clrType="System.Uri, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 112 <serializedValue>net.tcp://10.20.53. 2:9000/HiveServer/ClientCommunicator</serializedValue>112 <serializedValue>net.tcp://10.20.53.3:9000/HiveServer/ClientCommunicator</serializedValue> 113 113 </property> 114 114 <property path="/behaviorConfiguration" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> … … 136 136 <serializedValue>System.ServiceModel.Configuration.UserPrincipalNameElement</serializedValue> 137 137 </property> 138 <property path="/identity/userPrincipalName/value" isComplexType="false" isExplicitlyDefined=" true" clrType="System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">139 <serializedValue >mse08023@fhs-hagenberg.ac.at</serializedValue>138 <property path="/identity/userPrincipalName/value" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 139 <serializedValue /> 140 140 </property> 141 141 <property path="/identity/servicePrincipalName" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.ServicePrincipalNameElement, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> -
trunk/sources/HeuristicLab.Hive.Client.Communication/Service References/ServerService/service1.wsdl
r1366 r1379 4 4 <wsp:ExactlyOne> 5 5 <wsp:All> 6 <wsrm:RMAssertion xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"> 7 <wsrm:InactivityTimeout Milliseconds="600000"> 8 </wsrm:InactivityTimeout> 9 <wsrm:AcknowledgementInterval Milliseconds="200"> 10 </wsrm:AcknowledgementInterval> 11 </wsrm:RMAssertion> 6 12 <msb:BinaryEncoding xmlns:msb="http://schemas.microsoft.com/ws/06/2004/mspolicy/netbinary1"> 7 13 </msb:BinaryEncoding> 8 <sp:TransportBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">9 <wsp:Policy>10 <sp:TransportToken>11 <wsp:Policy>12 <msf:WindowsTransportSecurity xmlns:msf="http://schemas.microsoft.com/ws/2006/05/framing/policy">13 <msf:ProtectionLevel>EncryptAndSign</msf:ProtectionLevel>14 </msf:WindowsTransportSecurity>15 </wsp:Policy>16 </sp:TransportToken>17 <sp:AlgorithmSuite>18 <wsp:Policy>19 <sp:Basic256>20 </sp:Basic256>21 </wsp:Policy>22 </sp:AlgorithmSuite>23 <sp:Layout>24 <wsp:Policy>25 <sp:Strict>26 </sp:Strict>27 </wsp:Policy>28 </sp:Layout>29 </wsp:Policy>30 </sp:TransportBinding>31 14 <wsaw:UsingAddressing> 32 15 </wsaw:UsingAddressing> … … 39 22 <xsd:import namespace="http://schemas.microsoft.com/2003/10/Serialization/" /> 40 23 <xsd:import namespace="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Contracts.BusinessObjects" /> 24 <xsd:import namespace="http://schemas.datacontract.org/2004/07/HeuristicLab.DataAccess" /> 41 25 <xsd:import namespace="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Contracts" /> 42 26 <xsd:import namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays" /> … … 62 46 <wsdl:part name="parameters" element="tns:SendJobResponse" /> 63 47 </wsdl:message> 64 <wsdl:message name="IClientCommunicator_ ProcessJobResult_InputMessage">65 <wsdl:part name="parameters" element="tns: ProcessJobResult" />48 <wsdl:message name="IClientCommunicator_StoreFinishedJobResult_InputMessage"> 49 <wsdl:part name="parameters" element="tns:StoreFinishedJobResult" /> 66 50 </wsdl:message> 67 <wsdl:message name="IClientCommunicator_ProcessJobResult_OutputMessage"> 68 <wsdl:part name="parameters" element="tns:ProcessJobResultResponse" /> 51 <wsdl:message name="IClientCommunicator_StoreFinishedJobResult_OutputMessage"> 52 <wsdl:part name="parameters" element="tns:StoreFinishedJobResultResponse" /> 53 </wsdl:message> 54 <wsdl:message name="IClientCommunicator_ProcessSnapshot_InputMessage"> 55 <wsdl:part name="parameters" element="tns:ProcessSnapshot" /> 56 </wsdl:message> 57 <wsdl:message name="IClientCommunicator_ProcessSnapshot_OutputMessage"> 58 <wsdl:part name="parameters" element="tns:ProcessSnapshotResponse" /> 69 59 </wsdl:message> 70 60 <wsdl:message name="IClientCommunicator_Logout_InputMessage"> … … 73 63 <wsdl:message name="IClientCommunicator_Logout_OutputMessage"> 74 64 <wsdl:part name="parameters" element="tns:LogoutResponse" /> 65 </wsdl:message> 66 <wsdl:message name="IClientCommunicator_IsJobStillNeeded_InputMessage"> 67 <wsdl:part name="parameters" element="tns:IsJobStillNeeded" /> 68 </wsdl:message> 69 <wsdl:message name="IClientCommunicator_IsJobStillNeeded_OutputMessage"> 70 <wsdl:part name="parameters" element="tns:IsJobStillNeededResponse" /> 71 </wsdl:message> 72 <wsdl:message name="IClientCommunicator_SendPlugins_InputMessage"> 73 <wsdl:part name="parameters" element="tns:SendPlugins" /> 74 </wsdl:message> 75 <wsdl:message name="IClientCommunicator_SendPlugins_OutputMessage"> 76 <wsdl:part name="parameters" element="tns:SendPluginsResponse" /> 75 77 </wsdl:message> 76 78 <wsdl:portType name="IClientCommunicator"> … … 87 89 <wsdl:output wsaw:Action="http://tempuri.org/IClientCommunicator/SendJobResponse" message="tns:IClientCommunicator_SendJob_OutputMessage" /> 88 90 </wsdl:operation> 89 <wsdl:operation name="ProcessJobResult"> 90 <wsdl:input wsaw:Action="http://tempuri.org/IClientCommunicator/ProcessJobResult" message="tns:IClientCommunicator_ProcessJobResult_InputMessage" /> 91 <wsdl:output wsaw:Action="http://tempuri.org/IClientCommunicator/ProcessJobResultResponse" message="tns:IClientCommunicator_ProcessJobResult_OutputMessage" /> 91 <wsdl:operation name="StoreFinishedJobResult"> 92 <wsdl:input wsaw:Action="http://tempuri.org/IClientCommunicator/StoreFinishedJobResult" message="tns:IClientCommunicator_StoreFinishedJobResult_InputMessage" /> 93 <wsdl:output wsaw:Action="http://tempuri.org/IClientCommunicator/StoreFinishedJobResultResponse" message="tns:IClientCommunicator_StoreFinishedJobResult_OutputMessage" /> 94 </wsdl:operation> 95 <wsdl:operation name="ProcessSnapshot"> 96 <wsdl:input wsaw:Action="http://tempuri.org/IClientCommunicator/ProcessSnapshot" message="tns:IClientCommunicator_ProcessSnapshot_InputMessage" /> 97 <wsdl:output wsaw:Action="http://tempuri.org/IClientCommunicator/ProcessSnapshotResponse" message="tns:IClientCommunicator_ProcessSnapshot_OutputMessage" /> 92 98 </wsdl:operation> 93 99 <wsdl:operation name="Logout"> 94 100 <wsdl:input wsaw:Action="http://tempuri.org/IClientCommunicator/Logout" message="tns:IClientCommunicator_Logout_InputMessage" /> 95 101 <wsdl:output wsaw:Action="http://tempuri.org/IClientCommunicator/LogoutResponse" message="tns:IClientCommunicator_Logout_OutputMessage" /> 102 </wsdl:operation> 103 <wsdl:operation name="IsJobStillNeeded"> 104 <wsdl:input wsaw:Action="http://tempuri.org/IClientCommunicator/IsJobStillNeeded" message="tns:IClientCommunicator_IsJobStillNeeded_InputMessage" /> 105 <wsdl:output wsaw:Action="http://tempuri.org/IClientCommunicator/IsJobStillNeededResponse" message="tns:IClientCommunicator_IsJobStillNeeded_OutputMessage" /> 106 </wsdl:operation> 107 <wsdl:operation name="SendPlugins"> 108 <wsdl:input wsaw:Action="http://tempuri.org/IClientCommunicator/SendPlugins" message="tns:IClientCommunicator_SendPlugins_InputMessage" /> 109 <wsdl:output wsaw:Action="http://tempuri.org/IClientCommunicator/SendPluginsResponse" message="tns:IClientCommunicator_SendPlugins_OutputMessage" /> 96 110 </wsdl:operation> 97 111 </wsdl:portType> … … 127 141 </wsdl:output> 128 142 </wsdl:operation> 129 <wsdl:operation name="ProcessJobResult"> 130 <soap12:operation soapAction="http://tempuri.org/IClientCommunicator/ProcessJobResult" style="document" /> 143 <wsdl:operation name="StoreFinishedJobResult"> 144 <soap12:operation soapAction="http://tempuri.org/IClientCommunicator/StoreFinishedJobResult" style="document" /> 145 <wsdl:input> 146 <soap12:body use="literal" /> 147 </wsdl:input> 148 <wsdl:output> 149 <soap12:body use="literal" /> 150 </wsdl:output> 151 </wsdl:operation> 152 <wsdl:operation name="ProcessSnapshot"> 153 <soap12:operation soapAction="http://tempuri.org/IClientCommunicator/ProcessSnapshot" style="document" /> 131 154 <wsdl:input> 132 155 <soap12:body use="literal" /> … … 145 168 </wsdl:output> 146 169 </wsdl:operation> 170 <wsdl:operation name="IsJobStillNeeded"> 171 <soap12:operation soapAction="http://tempuri.org/IClientCommunicator/IsJobStillNeeded" style="document" /> 172 <wsdl:input> 173 <soap12:body use="literal" /> 174 </wsdl:input> 175 <wsdl:output> 176 <soap12:body use="literal" /> 177 </wsdl:output> 178 </wsdl:operation> 179 <wsdl:operation name="SendPlugins"> 180 <soap12:operation soapAction="http://tempuri.org/IClientCommunicator/SendPlugins" style="document" /> 181 <wsdl:input> 182 <soap12:body use="literal" /> 183 </wsdl:input> 184 <wsdl:output> 185 <soap12:body use="literal" /> 186 </wsdl:output> 187 </wsdl:operation> 147 188 </wsdl:binding> 148 189 <wsdl:service name="ClientFacade"> 149 190 <wsdl:port name="NetTcpBinding_IClientCommunicator" binding="tns:NetTcpBinding_IClientCommunicator"> 150 <soap12:address location="net.tcp://10.20.53. 2:9000/HiveServer/ClientCommunicator" />191 <soap12:address location="net.tcp://10.20.53.3:9000/HiveServer/ClientCommunicator" /> 151 192 <wsa10:EndpointReference> 152 <wsa10:Address>net.tcp://10.20.53.2:9000/HiveServer/ClientCommunicator</wsa10:Address> 153 <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> 154 <Upn>mse08023@fhs-hagenberg.ac.at</Upn> 155 </Identity> 193 <wsa10:Address>net.tcp://10.20.53.3:9000/HiveServer/ClientCommunicator</wsa10:Address> 156 194 </wsa10:EndpointReference> 157 195 </wsdl:port> -
trunk/sources/HeuristicLab.Hive.Client.Communication/Service References/ServerService/service2.xsd
r1366 r1379 5 5 <xs:import namespace="http://schemas.microsoft.com/2003/10/Serialization/" /> 6 6 <xs:import namespace="http://schemas.datacontract.org/2004/07/System" /> 7 <xs:import namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays" /> 7 8 <xs:element name="Login"> 8 9 <xs:complexType> … … 47 48 </xs:complexType> 48 49 </xs:element> 49 <xs:element name=" ProcessJobResult">50 <xs:element name="StoreFinishedJobResult"> 50 51 <xs:complexType> 51 52 <xs:sequence> … … 55 56 <xs:element minOccurs="0" name="percentage" type="xs:double" /> 56 57 <xs:element xmlns:q8="http://schemas.datacontract.org/2004/07/System" minOccurs="0" name="exception" nillable="true" type="q8:Exception" /> 57 <xs:element minOccurs="0" name="finished" type="xs:boolean" />58 58 </xs:sequence> 59 59 </xs:complexType> 60 60 </xs:element> 61 <xs:element name=" ProcessJobResultResponse">61 <xs:element name="StoreFinishedJobResultResponse"> 62 62 <xs:complexType> 63 63 <xs:sequence> 64 <xs:element xmlns:q9="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Contracts" minOccurs="0" name="ProcessJobResultResult" nillable="true" type="q9:ResponseResultReceived" /> 64 <xs:element xmlns:q9="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Contracts" minOccurs="0" name="StoreFinishedJobResultResult" nillable="true" type="q9:ResponseResultReceived" /> 65 </xs:sequence> 66 </xs:complexType> 67 </xs:element> 68 <xs:element name="ProcessSnapshot"> 69 <xs:complexType> 70 <xs:sequence> 71 <xs:element xmlns:q10="http://schemas.microsoft.com/2003/10/Serialization/" minOccurs="0" name="clientId" type="q10:guid" /> 72 <xs:element minOccurs="0" name="jobId" type="xs:long" /> 73 <xs:element minOccurs="0" name="result" nillable="true" type="xs:base64Binary" /> 74 <xs:element minOccurs="0" name="percentage" type="xs:double" /> 75 <xs:element xmlns:q11="http://schemas.datacontract.org/2004/07/System" minOccurs="0" name="exception" nillable="true" type="q11:Exception" /> 76 </xs:sequence> 77 </xs:complexType> 78 </xs:element> 79 <xs:element name="ProcessSnapshotResponse"> 80 <xs:complexType> 81 <xs:sequence> 82 <xs:element xmlns:q12="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Contracts" minOccurs="0" name="ProcessSnapshotResult" nillable="true" type="q12:ResponseResultReceived" /> 65 83 </xs:sequence> 66 84 </xs:complexType> … … 69 87 <xs:complexType> 70 88 <xs:sequence> 71 <xs:element xmlns:q1 0="http://schemas.microsoft.com/2003/10/Serialization/" minOccurs="0" name="clientId" type="q10:guid" />89 <xs:element xmlns:q13="http://schemas.microsoft.com/2003/10/Serialization/" minOccurs="0" name="clientId" type="q13:guid" /> 72 90 </xs:sequence> 73 91 </xs:complexType> … … 76 94 <xs:complexType> 77 95 <xs:sequence> 78 <xs:element xmlns:q11="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Contracts" minOccurs="0" name="LogoutResult" nillable="true" type="q11:Response" /> 96 <xs:element xmlns:q14="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Contracts" minOccurs="0" name="LogoutResult" nillable="true" type="q14:Response" /> 97 </xs:sequence> 98 </xs:complexType> 99 </xs:element> 100 <xs:element name="IsJobStillNeeded"> 101 <xs:complexType> 102 <xs:sequence> 103 <xs:element minOccurs="0" name="jobId" type="xs:long" /> 104 </xs:sequence> 105 </xs:complexType> 106 </xs:element> 107 <xs:element name="IsJobStillNeededResponse"> 108 <xs:complexType> 109 <xs:sequence> 110 <xs:element xmlns:q15="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Contracts" minOccurs="0" name="IsJobStillNeededResult" nillable="true" type="q15:Response" /> 111 </xs:sequence> 112 </xs:complexType> 113 </xs:element> 114 <xs:element name="SendPlugins"> 115 <xs:complexType> 116 <xs:sequence> 117 <xs:element xmlns:q16="http://schemas.microsoft.com/2003/10/Serialization/Arrays" minOccurs="0" name="pluginList" nillable="true" type="q16:ArrayOfstring" /> 118 </xs:sequence> 119 </xs:complexType> 120 </xs:element> 121 <xs:element name="SendPluginsResponse"> 122 <xs:complexType> 123 <xs:sequence> 124 <xs:element xmlns:q17="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Contracts" minOccurs="0" name="SendPluginsResult" nillable="true" type="q17:ResponsePlugin" /> 79 125 </xs:sequence> 80 126 </xs:complexType> -
trunk/sources/HeuristicLab.Hive.Client.Communication/WcfService.cs
r1371 r1379 80 80 proxy.LoginCompleted += new EventHandler<LoginCompletedEventArgs>(proxy_LoginCompleted); 81 81 proxy.SendJobCompleted += new EventHandler<SendJobCompletedEventArgs>(proxy_SendJobCompleted); 82 proxy.ProcessJobResultCompleted += new EventHandler<ProcessJobResultCompletedEventArgs>(proxy_ProcessJobResultCompleted); 82 proxy.StoreFinishedJobResultCompleted += new EventHandler<StoreFinishedJobResultCompletedEventArgs>(proxy_StoreFinishedJobResultCompleted); 83 proxy.ProcessSnapshotCompleted += new EventHandler<ProcessSnapshotCompletedEventArgs>(proxy_ProcessSnapshotCompleted); 83 84 proxy.ProcessHeartBeatCompleted += new EventHandler<ProcessHeartBeatCompletedEventArgs>(proxy_ProcessHeartBeatCompleted); 84 85 proxy.Open(); … … 97 98 } 98 99 } 100 101 99 102 100 103 /// <summary> … … 184 187 /// </summary> 185 188 #region SendJobResults 186 public event System.EventHandler< ProcessJobResultCompletedEventArgs> ProcessJobResultCompleted;187 public void ProcessJobResultAsync(Guid clientId, long jobId, byte[] result, double percentage, Exception exception, bool finished) {189 public event System.EventHandler<StoreFinishedJobResultCompletedEventArgs> StoreFinishedJobResultCompleted; 190 public void StoreFinishedJobResultAsync(Guid clientId, long jobId, byte[] result, double percentage, Exception exception, bool finished) { 188 191 if (ConnState == NetworkEnum.WcfConnState.Loggedin) 189 proxy.ProcessJobResultAsync(clientId, jobId, result, percentage, exception, finished); 190 } 191 private void proxy_ProcessJobResultCompleted(object sender, ProcessJobResultCompletedEventArgs e) { 192 if (e.Error == null) 193 ProcessJobResultCompleted(sender, e); 194 else 195 HandleNetworkError(e.Error); 196 } 197 192 proxy.StoreFinishedJobResultAsync(clientId, jobId, result, percentage, exception, finished); 193 } 194 private void proxy_StoreFinishedJobResultCompleted(object sender, StoreFinishedJobResultCompletedEventArgs e) { 195 if (e.Error == null) 196 StoreFinishedJobResultCompleted(sender, e); 197 else 198 HandleNetworkError(e.Error); 199 } 200 201 #endregion 202 203 #region Processsnapshots 204 public event System.EventHandler<ProcessSnapshotCompletedEventArgs> ProcessSnapshotCompleted; 205 public void ProcessSnapshotAsync(Guid clientId, long jobId, byte[] result, double percentage, Exception exception, bool finished) { 206 if(ConnState == NetworkEnum.WcfConnState.Loggedin) 207 proxy.ProcessSnapshotAsync(clientId, jobId, result, percentage, exception); 208 } 209 void proxy_ProcessSnapshotCompleted(object sender, ProcessSnapshotCompletedEventArgs e) { 210 if (e.Error == null) 211 ProcessSnapshotCompleted(sender, e); 212 else 213 HandleNetworkError(e.Error); 214 } 215 198 216 #endregion 199 217 … … 221 239 /// Send back finished and Stored Job Results 222 240 /// </summary> 223 #region SendJobResults224 public event System.EventHandler< ProcessJobResultCompletedEventArgs> ProcessStoredJobResultCompleted;241 /*#region SendJobResults 242 public event System.EventHandler<StoreFinishedJobResultCompletedEventArgs> ProcessStoredJobResultCompleted; 225 243 public void ProcessStoredJobResultAsync(Guid clientId, long jobId, byte[] result, double percentage, Exception exception, bool finished) { 226 244 if (ConnState == NetworkEnum.WcfConnState.Loggedin) … … 228 246 proxy.ProcessJobResultAsync(clientId, jobId, result, percentage, exception, finished); 229 247 } 230 #endregion 248 #endregion */ 231 249 232 250 public ResponseResultReceived SendStoredJobResultsSync(Guid clientId, long jobId, byte[] result, double percentage, Exception exception, bool finished) { 233 return proxy. ProcessJobResult(clientId, jobId, result, percentage, exception, finished);251 return proxy.StoreFinishedJobResult(clientId, jobId, result, percentage, exception); 234 252 } 235 253 } -
trunk/sources/HeuristicLab.Hive.Client.Communication/app.config
r1366 r1379 13 13 maxBytesPerRead="4096" maxNameTableCharCount="16384" /> 14 14 <reliableSession ordered="true" inactivityTimeout="00:10:00" 15 enabled=" false" />16 <security mode=" Transport">15 enabled="true" /> 16 <security mode="None"> 17 17 <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" /> 18 18 <message clientCredentialType="Windows" /> … … 22 22 </bindings> 23 23 <client> 24 <endpoint address="net.tcp://10.20.53. 2:9000/HiveServer/ClientCommunicator"24 <endpoint address="net.tcp://10.20.53.3:9000/HiveServer/ClientCommunicator" 25 25 binding="netTcpBinding" bindingConfiguration="NetTcpBinding_IClientCommunicator" 26 contract="ServerService.IClientCommunicator" name="NetTcpBinding_IClientCommunicator"> 27 <identity> 28 <userPrincipalName value="mse08023@fhs-hagenberg.ac.at" /> 29 </identity> 30 </endpoint> 26 contract="ServerService.IClientCommunicator" name="NetTcpBinding_IClientCommunicator" /> 31 27 </client> 32 28 </system.serviceModel> -
trunk/sources/HeuristicLab.Hive.Client.Core/ClientConsoleService/ClientConsoleCommunicator.cs
r1132 r1379 13 13 #region IClientConsoleCommunicator Members 14 14 15 public StatusCommons GetStatusInfos() { 16 lock (Core.Locker) { 15 public StatusCommons GetStatusInfos() { 17 16 return ConfigManager.Instance.GetStatusForClientConsole(); 18 }19 17 } 20 18 -
trunk/sources/HeuristicLab.Hive.Client.Core/ConfigurationManager/ConfigManager.cs
r1132 r1379 100 100 /// <returns></returns> 101 101 public StatusCommons GetStatusForClientConsole() { 102 //Todo: Locking 102 103 StatusCommons st = new StatusCommons(); 103 104 st.ClientGuid = hardwareInfo.ClientId; … … 113 114 st.Jobs = new List<JobStatus>(); 114 115 115 foreach (KeyValuePair<long, Executor> kvp in engines) { 116 Executor e = kvp.Value; 117 st.Jobs.Add(new JobStatus { JobId = e.JobId, Progress = e.Progress, Since = e.CreationTime }); 116 lock (engines) { 117 foreach (KeyValuePair<long, Executor> kvp in engines) { 118 Executor e = kvp.Value; 119 st.Jobs.Add(new JobStatus { JobId = e.JobId, Progress = e.Progress, Since = e.CreationTime }); 120 } 118 121 } 119 122 return st; … … 123 126 Dictionary<long,double> prog = new Dictionary<long,double>(); 124 127 Dictionary<long, Executor> engines = Core.GetExecutionEngines(); 125 foreach (KeyValuePair<long, Executor> kvp in engines) { 126 Executor e = kvp.Value; 127 prog[e.JobId] = e.Progress; 128 lock (engines) { 129 foreach (KeyValuePair<long, Executor> kvp in engines) { 130 Executor e = kvp.Value; 131 prog[e.JobId] = e.Progress; 132 } 128 133 } 129 134 return prog; -
trunk/sources/HeuristicLab.Hive.Client.Core/Core.cs
r1371 r1379 50 50 /// The core component of the Hive Client 51 51 /// </summary> 52 public class Core: MarshalByRefObject { 53 //Todo: Ask wagner 54 public static Object Locker { get; set; } 52 public class Core: MarshalByRefObject { 55 53 public static bool abortRequested { get; set; } 56 54 … … 65 63 /// Main Method for the client 66 64 /// </summary> 67 public void Start() { 68 Core.Locker = new Object(); 65 public void Start() { 69 66 abortRequested = false; 70 67 … … 79 76 wcfService = WcfService.Instance; 80 77 wcfService.LoginCompleted += new EventHandler<LoginCompletedEventArgs>(wcfService_LoginCompleted); 81 wcfService.SendJobCompleted += new EventHandler<SendJobCompletedEventArgs>(wcfService_PullJobCompleted); 82 wcfService.ProcessJobResultCompleted += new EventHandler<ProcessJobResultCompletedEventArgs>(wcfService_SendJobResultCompleted); 78 wcfService.SendJobCompleted += new EventHandler<SendJobCompletedEventArgs>(wcfService_SendJobCompleted); 79 wcfService.StoreFinishedJobResultCompleted += new EventHandler<StoreFinishedJobResultCompletedEventArgs>(wcfService_StoreFinishedJobResultCompleted); 80 wcfService.ProcessSnapshotCompleted += new EventHandler<ProcessSnapshotCompletedEventArgs>(wcfService_ProcessSnapshotCompleted); 83 81 wcfService.ConnectionRestored += new EventHandler(wcfService_ConnectionRestored); 84 82 wcfService.ServerChanged += new EventHandler(wcfService_ServerChanged); … … 105 103 DetermineAction(container); 106 104 } 107 } 105 } 108 106 109 107 /// <summary> … … 127 125 //Snapshot is ready and can be sent back to the Server 128 126 case MessageContainer.MessageType.SnapshotReady: 129 ThreadPool.QueueUserWorkItem(new WaitCallback(GetSnapshot), container.JobId); 130 //Thread ssr = new Thread(new ParameterizedThreadStart(GetSnapshot)); 131 //ssr.Start(container.JobId); 127 ThreadPool.QueueUserWorkItem(new WaitCallback(GetSnapshot), container.JobId); 132 128 break; 133 129 //Pull a Job from the Server … … 137 133 //A Job has finished and can be sent back to the server 138 134 case MessageContainer.MessageType.FinishedJob: 139 ThreadPool.QueueUserWorkItem(new WaitCallback(GetFinishedJob), container.JobId); 140 //Thread finThread = new Thread(new ParameterizedThreadStart(GetFinishedJob)); 141 //finThread.Start(container.JobId); 135 ThreadPool.QueueUserWorkItem(new WaitCallback(GetFinishedJob), container.JobId); 142 136 break; 143 137 //Hard shutdown of the client … … 158 152 159 153 if (WcfService.Instance.ConnState == NetworkEnum.WcfConnState.Loggedin) { 160 wcfService. ProcessJobResultAsync(ConfigManager.Instance.GetClientInfo().ClientId,154 wcfService.StoreFinishedJobResultAsync(ConfigManager.Instance.GetClientInfo().ClientId, 161 155 jId, 162 156 sJob, … … 166 160 } else { 167 161 JobStorageManager.PersistObjectToDisc(wcfService.ServerIP, wcfService.ServerPort, jId, sJob); 168 lock ( Core.Locker) {162 lock (engines) { 169 163 AppDomain.Unload(appDomains[jId]); 170 164 appDomains.Remove(jId); … … 182 176 long jId = (long)jobId; 183 177 byte[] obj = engines[jId].GetSnapshot(); 184 wcfService.Process JobResultAsync(ConfigManager.Instance.GetClientInfo().ClientId,178 wcfService.ProcessSnapshotAsync(ConfigManager.Instance.GetClientInfo().ClientId, 185 179 jId, 186 180 obj, … … 202 196 } 203 197 204 void wcfService_ PullJobCompleted(object sender, SendJobCompletedEventArgs e) {198 void wcfService_SendJobCompleted(object sender, SendJobCompletedEventArgs e) { 205 199 if (e.Result.StatusMessage != ApplicationConstants.RESPONSE_COMMUNICATOR_NO_JOBS_LEFT) { 206 200 bool sandboxed = true; … … 209 203 AppDomain appDomain = PluginManager.Manager.CreateAndInitAppDomainWithSandbox(e.Result.Job.Id.ToString(), sandboxed, typeof(TestJob)); 210 204 appDomain.UnhandledException += new UnhandledExceptionEventHandler(appDomain_UnhandledException); 211 lock ( Locker) {205 lock (engines) { 212 206 if (!jobs.ContainsKey(e.Result.Job.Id)) { 213 207 jobs.Add(e.Result.Job.Id, e.Result.Job); … … 228 222 } 229 223 230 //Todo: Seperate this method into 2: Finished jobs and Snapshots 231 void wcfService_S endJobResultCompleted(object sender, ProcessJobResultCompletedEventArgs e) {224 225 void wcfService_StoreFinishedJobResultCompleted(object sender, StoreFinishedJobResultCompletedEventArgs e) { 232 226 if (e.Result.Success) { 233 lock (Locker) {227 lock(engines) { 234 228 //if the engine is running again -> we sent an snapshot. Otherwise the job was finished 235 229 //this method has a risk concerning race conditions. 236 230 //better expand the sendjobresultcompltedeventargs with a boolean "snapshot?" flag 237 if (e.Result.finished == false) { 238 Logging.Instance.Info(this.ToString(), "Snapshot for Job " + e.Result.JobId + " transmitted"); 239 } else { 240 AppDomain.Unload(appDomains[e.Result.JobId]); 241 appDomains.Remove(e.Result.JobId); 242 engines.Remove(e.Result.JobId); 243 jobs.Remove(e.Result.JobId); 244 ClientStatusInfo.JobsProcessed++; 245 Debug.WriteLine("ProcessedJobs to:" + ClientStatusInfo.JobsProcessed); 246 } 231 AppDomain.Unload(appDomains[e.Result.JobId]); 232 appDomains.Remove(e.Result.JobId); 233 engines.Remove(e.Result.JobId); 234 jobs.Remove(e.Result.JobId); 235 ClientStatusInfo.JobsProcessed++; 236 Debug.WriteLine("ProcessedJobs to:" + ClientStatusInfo.JobsProcessed); 247 237 } 248 238 } else { … … 251 241 } 252 242 243 void wcfService_ProcessSnapshotCompleted(object sender, ProcessSnapshotCompletedEventArgs e) { 244 Logging.Instance.Info(this.ToString(), "Snapshot " + e.Result.JobId + " has been transmitted according to plan"); 245 } 246 253 247 //Todo: First stop all threads, then terminate 254 248 void wcfService_ServerChanged(object sender, EventArgs e) { 255 249 Logging.Instance.Info(this.ToString(), "ServerChanged has been called"); 256 lock ( Locker) {250 lock (engines) { 257 251 foreach (KeyValuePair<long, AppDomain> entries in appDomains) 258 252 AppDomain.Unload(appDomains[entries.Key]); -
trunk/sources/HeuristicLab.Hive.Client.Core/Heartbeat.cs
r1368 r1379 61 61 heartbeatTimer.Elapsed += new ElapsedEventHandler(heartbeatTimer_Elapsed); 62 62 wcfService = WcfService.Instance; 63 wcfService.SendHeartBeatCompleted += new EventHandler<ProcessHeartBeatCompletedEventArgs>(wcfService_ SendHeartBeatCompleted);63 wcfService.SendHeartBeatCompleted += new EventHandler<ProcessHeartBeatCompletedEventArgs>(wcfService_ProcessHeartBeatCompleted); 64 64 heartbeatTimer.Start(); 65 65 } … … 75 75 // Todo: remove tempfix for free cores. 76 76 77 HeartBeatData heartBeatData = new HeartBeatData { 77 PerformanceCounter counter = new PerformanceCounter("Memory", "Available Bytes", true); 78 int mb = (int)(counter.NextValue() / 1024 / 1024); 79 80 81 HeartBeatData heartBeatData = new HeartBeatData { 78 82 ClientId = info.ClientId, 79 83 FreeCores = info.NrOfCores - (ClientStatusInfo.JobsFetched - ClientStatusInfo.JobsProcessed), 80 FreeMemory = 1000,84 FreeMemory = mb, 81 85 JobProgress = ConfigManager.Instance.GetProgressOfAllJobs() 82 86 }; … … 88 92 } 89 93 90 void wcfService_ SendHeartBeatCompleted(object sender, ProcessHeartBeatCompletedEventArgs e) {94 void wcfService_ProcessHeartBeatCompleted(object sender, ProcessHeartBeatCompletedEventArgs e) { 91 95 System.Diagnostics.Debug.WriteLine("Heartbeat received! "); 92 96 e.Result.ActionRequest.ForEach(mc => MessageQueue.GetInstance().AddMessage(mc)); -
trunk/sources/HeuristicLab.Hive.Client.Core/JobStorage/JobStorageManager.cs
r1371 r1379 21 21 22 22 JobStorageInfo info = new JobStorageInfo { JobID = jobId, ServerIP = serverIP, ServerPort = serverPort, TimeFinished = DateTime.Now }; 23 24 //Todo: Filestream won't be closed if exception occurs23 24 Stream jobstream = null; 25 25 try { 26 Streamjobstream = File.Create(path + filename + ".dat");26 jobstream = File.Create(path + filename + ".dat"); 27 27 jobstream.Write(job, 0, job.Length); 28 28 storedJobsList.Add(info); 29 jobstream.Close();30 29 Logging.Instance.Info("JobStorageManager", "Job " + info.JobID + " stored on the harddisc"); 31 30 } 32 31 catch (Exception e) { 33 32 Logging.Instance.Error("JobStorageManager", "Exception: ", e); 34 } 33 } 34 finally { 35 if(jobstream!=null) 36 jobstream.Close(); 37 } 35 38 } 36 39
Note: See TracChangeset
for help on using the changeset viewer.