Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/SlaveConsoleService/Interfaces/ISlaveConsoleCommunicator.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/SlaveConsoleService/Interfaces/ISlaveConsoleCommunicator.cs	(revision 4260)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/SlaveConsoleService/Interfaces/ISlaveConsoleCommunicator.cs	(revision 4260)
@@ -0,0 +1,71 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.ServiceModel;
+using HeuristicLab.Calendar;
+
+namespace HeuristicLab.Hive.Slave.Core.ClientConsoleService.Interfaces {
+  /// <summary>
+  /// Defines the interfaces for the Client Console
+  /// </summary>
+  [ServiceContract]
+  public interface ISlaveConsoleCommunicator {
+    /// <summary>
+    /// Gets all status information concerning the client Service
+    /// </summary>
+    /// <returns>the StatusCommons Object, filled with the client details</returns>
+    [OperationContract]
+    StatusCommons GetStatusInfos();
+    /// <summary>
+    /// Set the connection settings in the wcfService
+    /// </summary>
+    /// <param name="container">the container with the connection details</param>
+    [OperationContract]
+    void SetConnection(ConnectionContainer container);
+    /// <summary>
+    /// Signals the client to disconnect from the server
+    /// </summary>
+    [OperationContract]
+    void Disconnect();
+    /// <summary>
+    /// Get the current connection details
+    /// </summary>
+    /// <returns>the ConnectionContainer Object</returns>
+    [OperationContract]
+    ConnectionContainer GetCurrentConnection();
+    /// <summary>
+    /// Signals the client to exit all jobs and shutdown
+    /// </summary>
+    [OperationContract]
+    void ShutdownClient();
+
+    [OperationContract]
+    void SetUptimeCalendar(List<Appointment> appointments);
+
+    [OperationContract]
+    List<Appointment> GetUptimeCalendar();
+
+  }
+}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/SlaveConsoleService/SlaveConsoleCommunicator.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/SlaveConsoleService/SlaveConsoleCommunicator.cs	(revision 4260)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/SlaveConsoleService/SlaveConsoleCommunicator.cs	(revision 4260)
@@ -0,0 +1,47 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Hive.Slave.Core.ClientConsoleService.Interfaces;
+using HeuristicLab.Hive.Slave.Core.ConfigurationManager;
+using HeuristicLab.Hive.Slave.Communication;
+using HeuristicLab.Hive.Slave.Common;
+using HeuristicLab.Hive.Contracts;
+using HeuristicLab.Calendar;
+
+namespace HeuristicLab.Hive.Slave.Core.ClientConsoleService {
+  public class SlaveConsoleCommunicator: ISlaveConsoleCommunicator {
+    #region IClientConsoleCommunicator Members
+
+    public StatusCommons GetStatusInfos() {      
+        return ConfigManager.Instance.GetStatusForClientConsole();
+    }
+
+    public void SetConnection(ConnectionContainer container) {
+      ConfigManager.Instance.SetServerIPAndPort(container);
+      WcfService.Instance.Connect(container.IPAdress, container.Port);
+    }
+
+    public void Disconnect() {
+      WcfService.Instance.Disconnect();
+    }   
+
+    public ConnectionContainer GetCurrentConnection() {
+      return new ConnectionContainer { IPAdress = WcfService.Instance.ServerIP, Port = WcfService.Instance.ServerPort };
+    }
+
+    public void ShutdownClient() {
+      MessageQueue.GetInstance().AddMessage(MessageContainer.MessageType.Shutdown);
+    }    
+
+    public void SetUptimeCalendar(List<Appointment> appointments) {
+      UptimeManager.Instance.SetAppointments(true, false, appointments);
+    }
+
+    public List<Appointment> GetUptimeCalendar() {
+      return UptimeManager.Instance.AppContainer.Appointments;
+    }
+
+    #endregion
+  }
+}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/SlaveConsoleService/SlaveConsoleServer.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/SlaveConsoleService/SlaveConsoleServer.cs	(revision 4260)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/SlaveConsoleService/SlaveConsoleServer.cs	(revision 4260)
@@ -0,0 +1,41 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.ServiceModel.Description;
+using System.ServiceModel;
+using HeuristicLab.PluginInfrastructure;
+using HeuristicLab.Hive.Slave.Core.ClientConsoleService.Interfaces;
+using HeuristicLab.Hive.Contracts;
+
+namespace HeuristicLab.Hive.Slave.Core.ClientConsoleService {
+  public class SlaveConsoleServer {
+
+    private bool AddMexEndpoint(ServiceHost serviceHost) {
+      if (serviceHost != null) {
+        ServiceMetadataBehavior behavior = new ServiceMetadataBehavior();
+        serviceHost.Description.Behaviors.Add(behavior);
+
+        return serviceHost.AddServiceEndpoint(typeof(IMetadataExchange), MetadataExchangeBindings.CreateMexTcpBinding(), "mex") != null;
+      } else
+        return false;
+    }
+
+    public ServiceHost StartClientConsoleServer(Uri uriTcp) {
+      IEnumerable<ISlaveConsoleCommunicator> clientConsoleServerInstances = ApplicationManager.Manager.GetInstances<ISlaveConsoleCommunicator>();
+
+      if (clientConsoleServerInstances.Count() > 0) {
+        ServiceHost serviceHost = new ServiceHost(clientConsoleServerInstances.First().GetType(), uriTcp);
+
+        serviceHost.AddServiceEndpoint(typeof(ISlaveConsoleCommunicator), WcfSettings.GetBinding(), "SlaveConsoleCommunicator");
+
+        AddMexEndpoint(serviceHost);
+
+        serviceHost.Open();
+        return serviceHost;
+      } else {
+        return null;
+      }
+    }
+  }
+}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/SlaveConsoleService/TransferObjects/ConnectionContainer.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/SlaveConsoleService/TransferObjects/ConnectionContainer.cs	(revision 4260)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/SlaveConsoleService/TransferObjects/ConnectionContainer.cs	(revision 4260)
@@ -0,0 +1,36 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Runtime.Serialization;
+
+namespace HeuristicLab.Hive.Slave.Core.ClientConsoleService {
+  [DataContract]
+  public class ConnectionContainer {
+    [DataMember]
+    public string IPAdress { get; set; }
+    [DataMember]
+    public int Port { get; set; }
+  }
+}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/SlaveConsoleService/TransferObjects/JobStatus.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/SlaveConsoleService/TransferObjects/JobStatus.cs	(revision 4260)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/SlaveConsoleService/TransferObjects/JobStatus.cs	(revision 4260)
@@ -0,0 +1,47 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Runtime.Serialization;
+
+namespace HeuristicLab.Hive.Slave.Core.ClientConsoleService {
+  [DataContract]
+  public class JobStatus {
+    /// <summary>
+    /// Id of the Job
+    /// </summary>
+    [DataMember]
+    public Guid JobId { get; set; }
+    /// <summary>
+    /// When has the calculation of the Job begun?
+    /// </summary>
+    [DataMember]
+    public DateTime Since { get; set; }
+    /// <summary>
+    /// Current progress
+    /// </summary>
+    [DataMember]
+    public double Progress { get; set; }
+  }
+}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/SlaveConsoleService/TransferObjects/StatusCommons.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/SlaveConsoleService/TransferObjects/StatusCommons.cs	(revision 4260)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/SlaveConsoleService/TransferObjects/StatusCommons.cs	(revision 4260)
@@ -0,0 +1,54 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Hive.Slave.Common;
+using System.Runtime.Serialization;
+
+namespace HeuristicLab.Hive.Slave.Core.ClientConsoleService {
+  /// <summary>
+  /// Various Status Information for the ClientConsole
+  /// </summary>
+  [DataContract]
+  public class StatusCommons {    
+    [DataMember]
+    public Guid ClientGuid { get; set; }
+    [DataMember]
+    public NetworkEnum.WcfConnState Status { get; set; }
+    [DataMember]    
+    public DateTime ConnectedSince { get; set; }
+    [DataMember]
+    public int TotalCores { get; set; }
+    [DataMember]
+    public int FreeCores { get; set; }
+    [DataMember]
+    public int JobsFetched { get; set; }
+    [DataMember]
+    public int JobsDone { get; set; }
+    [DataMember]
+    public int JobsAborted { get; set; }
+    [DataMember]
+    public List<JobStatus> Jobs { get; set; }   
+  }
+}
