Changeset 1367
- Timestamp:
- 03/19/09 16:11:26 (16 years ago)
- Location:
- trunk/sources
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Hive.Client.Communication/WcfService.cs
r1366 r1367 168 168 /// </summary> 169 169 #region PullJob 170 public event System.EventHandler<SendJobCompletedEventArgs> PullJobCompleted;171 public void PullJobAsync(Guid guid) {170 public event System.EventHandler<SendJobCompletedEventArgs> SendJobCompleted; 171 public void SendJobAsync(Guid guid) { 172 172 if (ConnState == NetworkEnum.WcfConnState.Loggedin) 173 173 proxy.SendJobAsync(guid); … … 175 175 void proxy_SendJobCompleted(object sender, SendJobCompletedEventArgs e) { 176 176 if (e.Error == null) 177 PullJobCompleted(sender, e);177 SendJobCompleted(sender, e); 178 178 else 179 179 NetworkErrorHandling(e.Error); … … 185 185 /// </summary> 186 186 #region SendJobResults 187 public event System.EventHandler<ProcessJobResultCompletedEventArgs> SendJobResultCompleted;188 public void SendJobResultAsync(Guid clientId, long jobId, byte[] result, double percentage, Exception exception, bool finished) {187 public event System.EventHandler<ProcessJobResultCompletedEventArgs> ProcessJobResultCompleted; 188 public void ProcessJobResultAsync(Guid clientId, long jobId, byte[] result, double percentage, Exception exception, bool finished) { 189 189 if (ConnState == NetworkEnum.WcfConnState.Loggedin) 190 190 proxy.ProcessJobResultAsync(clientId, jobId, result, percentage, exception, finished); … … 192 192 private void proxy_ProcessJobResultCompleted(object sender, ProcessJobResultCompletedEventArgs e) { 193 193 if (e.Error == null) 194 SendJobResultCompleted(sender, e);194 ProcessJobResultCompleted(sender, e); 195 195 else 196 196 NetworkErrorHandling(e.Error); … … 223 223 /// </summary> 224 224 #region SendJobResults 225 public event System.EventHandler<ProcessJobResultCompletedEventArgs> SendStoredJobResultCompleted;226 public void SendStoredJobResultAsync(Guid clientId, long jobId, byte[] result, double percentage, Exception exception, bool finished) {225 public event System.EventHandler<ProcessJobResultCompletedEventArgs> ProcessStoredJobResultCompleted; 226 public void ProcessStoredJobResultAsync(Guid clientId, long jobId, byte[] result, double percentage, Exception exception, bool finished) { 227 227 if (ConnState == NetworkEnum.WcfConnState.Loggedin) 228 228 //TODO: some sort of algo for the stored jobs -
trunk/sources/HeuristicLab.Hive.Client.Core/Core.cs
r1366 r1367 82 82 wcfService = WcfService.Instance; 83 83 wcfService.LoginCompleted += new EventHandler<LoginCompletedEventArgs>(wcfService_LoginCompleted); 84 wcfService. PullJobCompleted += new EventHandler<SendJobCompletedEventArgs>(wcfService_PullJobCompleted);85 wcfService. SendJobResultCompleted += new EventHandler<ProcessJobResultCompletedEventArgs>(wcfService_SendJobResultCompleted);84 wcfService.SendJobCompleted += new EventHandler<SendJobCompletedEventArgs>(wcfService_PullJobCompleted); 85 wcfService.ProcessJobResultCompleted += new EventHandler<ProcessJobResultCompletedEventArgs>(wcfService_SendJobResultCompleted); 86 86 wcfService.ConnectionRestored += new EventHandler(wcfService_ConnectionRestored); 87 87 wcfService.ServerChanged += new EventHandler(wcfService_ServerChanged); … … 136 136 //Pull a Job from the Server 137 137 case MessageContainer.MessageType.FetchJob: 138 wcfService. PullJobAsync(ConfigManager.Instance.GetClientInfo().ClientId);138 wcfService.SendJobAsync(ConfigManager.Instance.GetClientInfo().ClientId); 139 139 break; 140 140 //A Job has finished and can be sent back to the server … … 160 160 161 161 if (WcfService.Instance.ConnState == NetworkEnum.WcfConnState.Loggedin) { 162 wcfService. SendJobResultAsync(ConfigManager.Instance.GetClientInfo().ClientId,162 wcfService.ProcessJobResultAsync(ConfigManager.Instance.GetClientInfo().ClientId, 163 163 jId, 164 164 sJob, … … 179 179 long jId = (long)jobId; 180 180 byte[] obj = engines[jId].GetSnapshot(); 181 wcfService. SendJobResultAsync(ConfigManager.Instance.GetClientInfo().ClientId,181 wcfService.ProcessJobResultAsync(ConfigManager.Instance.GetClientInfo().ClientId, 182 182 jId, 183 183 obj,
Note: See TracChangeset
for help on using the changeset viewer.