Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.Hive.Client.Core/ClientConsoleService/ClientConsoleCommunicator.cs @ 1379

Last change on this file since 1379 was 1379, checked in by kgrading, 15 years ago

splitted the sendfinishedjob / snapshot method in two seperate methods, fixed the locking, added real memory management (#529)

File size: 1.3 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using HeuristicLab.Hive.Client.Core.ClientConsoleService.Interfaces;
6using HeuristicLab.Hive.Client.Core.ConfigurationManager;
7using HeuristicLab.Hive.Client.Communication;
8using HeuristicLab.Hive.Client.Common;
9using HeuristicLab.Hive.Contracts;
10
11namespace HeuristicLab.Hive.Client.Core.ClientConsoleService {
12  public class ClientConsoleCommunicator: IClientConsoleCommunicator {
13    #region IClientConsoleCommunicator Members
14
15    public StatusCommons GetStatusInfos() {     
16        return ConfigManager.Instance.GetStatusForClientConsole();
17    }
18
19    public void SetConnection(ConnectionContainer container) {
20      ConfigManager.Instance.SetServerIPAndPort(container);
21      WcfService.Instance.Connect(container.IPAdress, container.Port);
22    }
23
24    public void Disconnect() {
25      WcfService.Instance.Disconnect();
26    }   
27
28    public ConnectionContainer GetCurrentConnection() {
29      return new ConnectionContainer { IPAdress = WcfService.Instance.ServerIP, Port = WcfService.Instance.ServerPort };
30    }
31
32    public void ShutdownClient() {
33      MessageQueue.GetInstance().AddMessage(MessageContainer.MessageType.Shutdown);
34    }
35
36    #endregion
37  }
38}
Note: See TracBrowser for help on using the repository browser.