Free cookie consent management tool by TermsFeed Policy Generator

Changeset 793


Ignore:
Timestamp:
11/20/08 16:27:31 (15 years ago)
Author:
whackl
Message:

Removing and Refactoring MessageContainer (#379)

Location:
trunk/sources
Files:
1 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Client.Common/HeuristicLab.Hive.Client.Common.csproj

    r789 r793  
    6969    <Compile Include="JobBase.cs" />
    7070    <Compile Include="Logging.cs" />
    71     <Compile Include="MessageContainer.cs" />
    7271    <Compile Include="MessageQueue.cs" />
    7372    <Compile Include="Properties\AssemblyInfo.cs" />
     
    7978      <Project>{F43B59AB-2B8C-4570-BC1E-15592086517C}</Project>
    8079      <Name>HeuristicLab.Core</Name>
     80    </ProjectReference>
     81    <ProjectReference Include="..\HeuristicLab.Hive.Contracts\HeuristicLab.Hive.Contracts.csproj">
     82      <Project>{134F93D7-E7C8-4ECD-9923-7F63259A60D8}</Project>
     83      <Name>HeuristicLab.Hive.Contracts</Name>
    8184    </ProjectReference>
    8285    <ProjectReference Include="..\HeuristicLab.PluginInfrastructure\HeuristicLab.PluginInfrastructure.csproj">
  • trunk/sources/HeuristicLab.Hive.Client.Common/MessageQueue.cs

    r739 r793  
    2424using System.Text;
    2525using System.Threading;
     26using HeuristicLab.Hive.Contracts;
    2627
    2728namespace HeuristicLab.Hive.Client.Common {
  • trunk/sources/HeuristicLab.Hive.Client.Communication/ServiceLocator.cs

    r790 r793  
    1313        proxy = new ClientCommunicatorClient(
    1414          new NetTcpBinding(),
    15           new EndpointAddress("net.tcp://10.20.53.2:9000/HiveServer/ClientCommunicator")
     15          new EndpointAddress("net.tcp://10.20.53.1:9000/HiveServer/ClientCommunicator")
    1616          );
    1717      }
  • trunk/sources/HeuristicLab.Hive.Client.Core/Core.cs

    r791 r793  
    3333using System.Security;
    3434using HeuristicLab.Hive.Client.Communication;
    35 using BO = HeuristicLab.Hive.Contracts.BusinessObjects;
     35using HeuristicLab.Hive.Contracts.BusinessObjects;
     36using HeuristicLab.Hive.Contracts;
    3637
    3738
     
    6465      beat.StartHeartbeat();
    6566
    66       BO.ClientInfo clientInfo = new BO.ClientInfo { ClientId = Guid.NewGuid() };
     67      ClientInfo clientInfo = new ClientInfo { ClientId = Guid.NewGuid() };
    6768
    6869      ClientCommunicatorClient clientCommunicator = ServiceLocator.GetClientCommunicator();
  • trunk/sources/HeuristicLab.Hive.Client.Core/Heartbeat.cs

    r790 r793  
    2929using System.Diagnostics;
    3030using HeuristicLab.Hive.Contracts.BusinessObjects;
     31using HeuristicLab.Hive.Contracts;
    3132//using BO = HeuristicLab.Hive.Contracts.BusinessObjects;
    3233
     
    4748    }
    4849
     50    private ClientCommunicatorClient clientCommunicator;
     51
    4952    /// <summary>
    5053    /// Starts the Heartbeat signal.
     
    5558      heartbeatTimer.AutoReset = true;
    5659      heartbeatTimer.Elapsed += new ElapsedEventHandler(heartbeatTimer_Elapsed);
    57       heartbeatTimer.Start();               
     60      clientCommunicator = ServiceLocator.GetClientCommunicator();
     61      clientCommunicator.SendHeartBeatCompleted += new EventHandler<SendHeartBeatCompletedEventArgs>(ClientCommunicator_SendHeartBeatCompleted);
     62      heartbeatTimer.Start();
    5863    }
    5964
     
    6570    void heartbeatTimer_Elapsed(object sender, ElapsedEventArgs e) {
    6671      Console.WriteLine("tick");
    67       ClientCommunicatorClient clientCommunicator = ServiceLocator.GetClientCommunicator();
    6872      HeartBeatData heartBeatData = new HeartBeatData { ClientId = Guid.NewGuid(),
    6973                                                              freeCores = 4,
    7074                                                              freeMemory = 1000,
    7175                                                              jobProgress = 1};
    72 
    73       clientCommunicator.SendHeartBeatCompleted += new EventHandler<SendHeartBeatCompletedEventArgs>(ClientCommunicator_SendHeartBeatCompleted);
    7476      clientCommunicator.SendHeartBeatAsync(heartBeatData);
    75 
    76       //MessageQueue.GetInstance().AddMessage(MessageContainer.MessageType.FetchJob);
    77 
    7877    }
    7978
    8079    void ClientCommunicator_SendHeartBeatCompleted(object sender, SendHeartBeatCompletedEventArgs e) {
    81       System.Diagnostics.Debug.WriteLine("Heartbeat received");
     80      System.Diagnostics.Debug.WriteLine("Heartbeat received! " + e.Result.ActionRequest.ToString());
     81      foreach (MessageContainer mc in e.Result.ActionRequest) {
     82        MessageQueue.GetInstance().AddMessage(mc);
     83
     84      }
    8285    }
    83 
    8486  }
    8587}
  • trunk/sources/HeuristicLab.Hive.Client.ExecutionEngine/Executor.cs

    r779 r793  
    2828using System.Xml.Serialization;
    2929using System.IO;
     30using HeuristicLab.Hive.Contracts;
    3031
    3132namespace HeuristicLab.Hive.Client.ExecutionEngine {
  • trunk/sources/HeuristicLab.Hive.Client.ExecutionEngine/HeuristicLab.Hive.Client.ExecutionEngine.csproj

    r768 r793  
    6161      <Name>HeuristicLab.Hive.Client.Common</Name>
    6262    </ProjectReference>
     63    <ProjectReference Include="..\HeuristicLab.Hive.Contracts\HeuristicLab.Hive.Contracts.csproj">
     64      <Project>{134F93D7-E7C8-4ECD-9923-7F63259A60D8}</Project>
     65      <Name>HeuristicLab.Hive.Contracts</Name>
     66    </ProjectReference>
    6367    <ProjectReference Include="..\HeuristicLab.PluginInfrastructure\HeuristicLab.PluginInfrastructure.csproj">
    6468      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
Note: See TracChangeset for help on using the changeset viewer.