Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/18/10 17:23:09 (14 years ago)
Author:
cneumuel
Message:

some small refactorings (#1159)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Communication/3.3/WcfService.cs

    r4253 r4254  
    6666    public event EventHandler Connected;
    6767
    68     public ClientFacadeClient proxy = null;
     68    public SlaveFacadeClient proxy = null;
    6969
    7070    /// <summary>
     
    8787
    8888        Logger.Debug("Creating the new connection proxy");
    89         proxy = new ClientFacadeClient(
     89        proxy = new SlaveFacadeClient(
    9090          HeuristicLab.Hive.Contracts.WcfSettings.GetStreamedBinding(),
    9191          new EndpointAddress("net.tcp://" + ServerIP + ":" + ServerPort + "/HiveServer/ClientCommunicator")
     
    204204    /// </summary>
    205205    #region PullJob
    206     public event System.EventHandler<SendJobCompletedEventArgs> SendJobCompleted;
     206    public event System.EventHandler<GetJobCompletedEventArgs> SendJobCompleted;
    207207    public void SendJobAsync(Guid guid) {
    208208      if (ConnState == NetworkEnum.WcfConnState.Loggedin) {
     
    223223          //first deserialize the response
    224224          BinaryFormatter formatter = new BinaryFormatter();
    225           ResponseJob response = (ResponseJob)formatter.Deserialize(stream);
     225          ResponseObject<JobDto> response = (ResponseObject<JobDto>)formatter.Deserialize(stream);
    226226
    227227          //second deserialize the BLOB
     
    236236          memStream.Close();
    237237
    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);
    239239          SendJobCompleted(sender, completedEventArgs);
    240240        } catch (Exception ex) {
     
    390390    }
    391391
    392     public List<HeuristicLab.PluginInfrastructure.CachedHivePluginInfoDto> RequestPlugins(List<HivePluginInfoDto> requestedPlugins) {
     392    public IEnumerable<CachedHivePluginInfoDto> RequestPlugins(List<HivePluginInfoDto> requestedPlugins) {
    393393      try {
    394394        Logger.Debug("STARTED: Requesting Plugins for Job");
     
    396396        Stream stream = proxy.SendStreamedPlugins(requestedPlugins.ToArray());
    397397        Logger.Debug("ENDED: Getting the stream");
    398         BinaryFormatter formatter =
    399           new BinaryFormatter();
     398        BinaryFormatter formatter = new BinaryFormatter();
    400399        Logger.Debug("STARTED: Deserializing the stream");
    401         ResponsePlugin response = (ResponsePlugin)formatter.Deserialize(stream);
     400        ResponseList<CachedHivePluginInfoDto> response = (ResponseList<CachedHivePluginInfoDto>)formatter.Deserialize(stream);
    402401        Logger.Debug("ENDED: Deserializing the stream");
    403402        if (stream != null)
    404403          stream.Dispose();
    405         return response.Plugins;
     404        return response.List;
    406405      } catch (Exception e) {
    407406        HandleNetworkError(e);
Note: See TracChangeset for help on using the changeset viewer.