Free cookie consent management tool by TermsFeed Policy Generator

Changeset 993


Ignore:
Timestamp:
12/15/08 19:13:28 (16 years ago)
Author:
kgrading
Message:

refactored for #437

Location:
trunk/sources
Files:
18 added
1 deleted
6 edited

Legend:

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

    r932 r993  
    5454      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    5555    </Reference>
     56    <Reference Include="System.Runtime.Serialization">
     57      <RequiredTargetFramework>3.0</RequiredTargetFramework>
     58    </Reference>
    5659    <Reference Include="System.ServiceModel">
    5760      <RequiredTargetFramework>3.0</RequiredTargetFramework>
     
    6972    <Compile Include="CommunicationsPlugin.cs" />
    7073    <Compile Include="Properties\AssemblyInfo.cs" />
    71     <Compile Include="ServerProxy.cs" />
     74    <Compile Include="Service References\ServerService\Reference.cs">
     75      <AutoGen>True</AutoGen>
     76      <DesignTime>True</DesignTime>
     77      <DependentUpon>Reference.svcmap</DependentUpon>
     78    </Compile>
    7279    <Compile Include="WcfService.cs" />
    7380  </ItemGroup>
    7481  <ItemGroup>
     82    <None Include="app.config" />
    7583    <None Include="HeuristicLab.snk" />
    7684    <None Include="Properties\AssemblyInfo.frame" />
     85    <None Include="Service References\ServerService\HeuristicLab.Hive.Contracts.BusinessObjects.xsd" />
     86    <None Include="Service References\ServerService\HeuristicLab.Hive.Contracts.xsd" />
     87    <None Include="Service References\ServerService\service.wsdl" />
     88    <None Include="Service References\ServerService\service.xsd" />
     89    <None Include="Service References\ServerService\service1.xsd" />
     90    <None Include="Service References\ServerService\System.xsd" />
    7791  </ItemGroup>
    7892  <ItemGroup>
     
    94108    </ProjectReference>
    95109  </ItemGroup>
     110  <ItemGroup>
     111    <WCFMetadata Include="Service References\" />
     112  </ItemGroup>
     113  <ItemGroup>
     114    <WCFMetadataStorage Include="Service References\ServerService\" />
     115  </ItemGroup>
     116  <ItemGroup>
     117    <None Include="Service References\ServerService\configuration91.svcinfo" />
     118  </ItemGroup>
     119  <ItemGroup>
     120    <None Include="Service References\ServerService\configuration.svcinfo" />
     121  </ItemGroup>
     122  <ItemGroup>
     123    <None Include="Properties\DataSources\HeuristicLab.Hive.Contracts.Response.datasource" />
     124    <None Include="Properties\DataSources\HeuristicLab.Hive.Contracts.ResponseHB.datasource" />
     125    <None Include="Properties\DataSources\HeuristicLab.Hive.Contracts.ResponseJob.datasource" />
     126    <None Include="Properties\DataSources\HeuristicLab.Hive.Contracts.ResponseResultReceived.datasource" />
     127    <None Include="Service References\ServerService\Reference.svcmap">
     128      <Generator>WCF Proxy Generator</Generator>
     129      <LastGenOutput>Reference.cs</LastGenOutput>
     130    </None>
     131  </ItemGroup>
    96132  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    97133  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
  • trunk/sources/HeuristicLab.Hive.Client.Communication/WcfService.cs

    r949 r993  
    88using HeuristicLab.Hive.Contracts.BusinessObjects;
    99using HeuristicLab.Hive.Client.Common;
     10using HeuristicLab.Hive.Client.Communication.ServerService;
    1011
    1112namespace HeuristicLab.Hive.Client.Communication {
     
    2930    public event EventHandler ServerChanged;   
    3031
    31     private ClientCommunicatorClient proxy = null;
     32    public ClientCommunicatorClient proxy = null;
    3233
    3334    private WcfService() {
     
    5152          ConnectionRestored(this, new EventArgs());
    5253        ConnState = NetworkEnum.WcfConnState.Connected;
    53         ConnectedSince = DateTime.Now;
     54        ConnectedSince = DateTime.Now;       
    5455      }
    5556      catch (Exception ex) {
     
    5960
    6061    public void Connect(String serverIP, int serverPort) {
    61       if(this.ServerIP != serverIP || this.ServerPort != ServerPort)
    62         ServerChanged(this, new EventArgs());
     62      String oldIp = this.ServerIP;
     63      int oldPort = this.ServerPort;
    6364      this.ServerIP = serverIP;
    6465      this.ServerPort = serverPort;     
    6566      Connect();
     67      if (oldIp != serverIP || oldPort != ServerPort)
     68        ServerChanged(this, new EventArgs());
    6669    }
    6770
     
    107110    public void SendJobResultAsync(JobResult result, bool finished) {
    108111      if (ConnState == NetworkEnum.WcfConnState.Connected)
    109         proxy.SendJobResult(result, finished);
     112        proxy.SendJobResultAsync(result, finished);
    110113    }
    111114    private void proxy_SendJobResultCompleted(object sender, SendJobResultCompletedEventArgs e) {
  • trunk/sources/HeuristicLab.Hive.Client.Core/ConfigurationManager/ConfigManager.cs

    r968 r993  
    6767
    6868    public ClientInfo GetClientInfo() {
     69      hardwareInfo.Login = WcfService.Instance.ConnectedSince;
    6970      return hardwareInfo;         
    7071    }
  • trunk/sources/HeuristicLab.Hive.Client.Core/Core.cs

    r960 r993  
    4141using HeuristicLab.Hive.Client.Core.ClientConsoleService;
    4242using HeuristicLab.Hive.Client.Core.ConfigurationManager;
     43using HeuristicLab.Hive.Client.Communication.ServerService;
    4344
    4445
     
    5152    Dictionary<long, AppDomain> appDomains = new Dictionary<long, AppDomain>();
    5253
     54    private ClientCommunicatorClient ccc;
    5355    private WcfService wcfService;
    5456
     
    6668        wcfService.Connect(cc.IPAdress, cc.Port);
    6769      }
     70
    6871      wcfService.LoginCompleted += new EventHandler<LoginCompletedEventArgs>(wcfService_LoginCompleted);
    6972      wcfService.PullJobCompleted += new EventHandler<PullJobCompletedEventArgs>(wcfService_PullJobCompleted);
    70       wcfService.SendJobResultCompleted += new EventHandler<SendJobResultCompletedEventArgs>(wcfService_SendJobResultCompleted);
     73      wcfService.SendJobResultCompleted += new EventHandler<SendJobResultCompletedEventArgs>(wcfService_SendJobResultCompleted);     
    7174      wcfService.ConnectionRestored += new EventHandler(wcfService_ConnectionRestored);
    7275      wcfService.ServerChanged += new EventHandler(wcfService_ServerChanged);
    73 
    74       wcfService.LoginAsync(ConfigManager.Instance.GetClientInfo());
    75 
     76       
    7677      Heartbeat beat = new Heartbeat { Interval = 10000 };
    7778      beat.StartHeartbeat();     
     
    120121     
    121122      JobResult jobResult = new JobResult { JobId = jId, Result = sJob, Client = ConfigManager.Instance.GetClientInfo() };
    122       wcfService.SendJobResultAsync(jobResult, true);
     123      wcfService.SendJobResultAsync(jobResult, true);     
    123124    }
    124125
     
    180181      appDomains = new Dictionary<long, AppDomain>();
    181182      engines = new Dictionary<long, Executor>();
     183      wcfService.LoginAsync(ConfigManager.Instance.GetClientInfo());
    182184    }
    183185
  • trunk/sources/HeuristicLab.Hive.Client.Core/Heartbeat.cs

    r960 r993  
    3131using HeuristicLab.Hive.Contracts;
    3232using HeuristicLab.Hive.Client.Core.ConfigurationManager;
     33using HeuristicLab.Hive.Client.Communication.ServerService;
    3334//using BO = HeuristicLab.Hive.Contracts.BusinessObjects;
    3435
  • trunk/sources/HeuristicLab.Hive.Server/HiveServerApplication.cs

    r977 r993  
    128128
    129129      Uri uriTcp =
    130           new Uri("net.tcp://" + addresses[index] + ":" + port + "/HiveServer/");
     130          new Uri("net.tcp://10.0.0.64:9000/HiveServer/");
    131131
    132132      ServiceHost clientCommunicator =
Note: See TracChangeset for help on using the changeset viewer.