Changeset 4254 for branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Communication/3.3/WcfService.cs
- Timestamp:
- 08/18/10 17:23:09 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Communication/3.3/WcfService.cs
r4253 r4254 66 66 public event EventHandler Connected; 67 67 68 public ClientFacadeClient proxy = null;68 public SlaveFacadeClient proxy = null; 69 69 70 70 /// <summary> … … 87 87 88 88 Logger.Debug("Creating the new connection proxy"); 89 proxy = new ClientFacadeClient(89 proxy = new SlaveFacadeClient( 90 90 HeuristicLab.Hive.Contracts.WcfSettings.GetStreamedBinding(), 91 91 new EndpointAddress("net.tcp://" + ServerIP + ":" + ServerPort + "/HiveServer/ClientCommunicator") … … 204 204 /// </summary> 205 205 #region PullJob 206 public event System.EventHandler< SendJobCompletedEventArgs> SendJobCompleted;206 public event System.EventHandler<GetJobCompletedEventArgs> SendJobCompleted; 207 207 public void SendJobAsync(Guid guid) { 208 208 if (ConnState == NetworkEnum.WcfConnState.Loggedin) { … … 223 223 //first deserialize the response 224 224 BinaryFormatter formatter = new BinaryFormatter(); 225 Response Job response = (ResponseJob)formatter.Deserialize(stream);225 ResponseObject<JobDto> response = (ResponseObject<JobDto>)formatter.Deserialize(stream); 226 226 227 227 //second deserialize the BLOB … … 236 236 memStream.Close(); 237 237 238 SendJobCompletedEventArgs completedEventArgs = new SendJobCompletedEventArgs(new object[] { response, memStream.GetBuffer() }, e.Error, e.Cancelled, e.UserState);238 GetJobCompletedEventArgs completedEventArgs = new GetJobCompletedEventArgs(new object[] { response, memStream.GetBuffer() }, e.Error, e.Cancelled, e.UserState); 239 239 SendJobCompleted(sender, completedEventArgs); 240 240 } catch (Exception ex) { … … 390 390 } 391 391 392 public List<HeuristicLab.PluginInfrastructure.CachedHivePluginInfoDto> RequestPlugins(List<HivePluginInfoDto> requestedPlugins) {392 public IEnumerable<CachedHivePluginInfoDto> RequestPlugins(List<HivePluginInfoDto> requestedPlugins) { 393 393 try { 394 394 Logger.Debug("STARTED: Requesting Plugins for Job"); … … 396 396 Stream stream = proxy.SendStreamedPlugins(requestedPlugins.ToArray()); 397 397 Logger.Debug("ENDED: Getting the stream"); 398 BinaryFormatter formatter = 399 new BinaryFormatter(); 398 BinaryFormatter formatter = new BinaryFormatter(); 400 399 Logger.Debug("STARTED: Deserializing the stream"); 401 Response Plugin response = (ResponsePlugin)formatter.Deserialize(stream);400 ResponseList<CachedHivePluginInfoDto> response = (ResponseList<CachedHivePluginInfoDto>)formatter.Deserialize(stream); 402 401 Logger.Debug("ENDED: Deserializing the stream"); 403 402 if (stream != null) 404 403 stream.Dispose(); 405 return response. Plugins;404 return response.List; 406 405 } catch (Exception e) { 407 406 HandleNetworkError(e);
Note: See TracChangeset
for help on using the changeset viewer.