Free cookie consent management tool by TermsFeed Policy Generator

Changeset 1132 for trunk/sources


Ignore:
Timestamp:
01/15/09 14:46:57 (16 years ago)
Author:
kgrading
Message:

added licence information and comments (#467)

Location:
trunk/sources
Files:
15 edited

Legend:

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

    r932 r1132  
    1 using System;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using System;
    223using System.Collections.Generic;
    324using System.Linq;
  • trunk/sources/HeuristicLab.Hive.Client.Communication/WcfService.cs

    r1103 r1132  
    1 using System;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using System;
    223using System.Collections.Generic;
    324using System.Linq;
     
    1132
    1233namespace HeuristicLab.Hive.Client.Communication {
     34  /// <summary>
     35  /// WcfService class is implemented as a Singleton and works as a communication Layer with the Server
     36  /// </summary>
    1337  public class WcfService {
    1438    private static WcfService instance;
     39    /// <summary>
     40    /// Getter for the Instance of the WcfService
     41    /// </summary>
     42    /// <returns>the Instance of the WcfService class</returns>
    1543    public static WcfService Instance {
    1644      get {
     
    3361    public ClientCommunicatorClient proxy = null;
    3462
     63    /// <summary>
     64    /// Constructor
     65    /// </summary>
    3566    private WcfService() {
    3667      ConnState = NetworkEnum.WcfConnState.Disconnected;
    3768    }
     69
     70    /// <summary>
     71    /// Connects with the Server, registers the events and fires the Connected (and quiet possibly the ConnectionRestored) Event.
     72    /// </summary>
    3873    public void Connect() {
    3974      try {
     
    6398    }
    6499
     100    /// <summary>
     101    /// Changes the Connectionsettings (serverIP & serverPort) and reconnects
     102    /// </summary>
     103    /// <param name="serverIP">current Server IP</param>
     104    /// <param name="serverPort">current Server Port</param>
    65105    public void Connect(String serverIP, int serverPort) {
    66106      String oldIp = this.ServerIP;
     
    73113          ServerChanged(this, new EventArgs());
    74114    }
    75 
     115   
     116    /// <summary>
     117    /// Disconnects the Client from the Server
     118    /// </summary>
    76119    public void Disconnect() {
    77120      ConnState = NetworkEnum.WcfConnState.Disconnected;
    78121    }
    79122
     123    /// <summary>
     124    /// Network communication Error Handler - Every network error gets logged and the connection switches to faulted state
     125    /// </summary>
     126    /// <param name="e">The Exception</param>
    80127    private void NetworkErrorHandling(Exception e) {
    81128      ConnState = NetworkEnum.WcfConnState.Failed;
     
    83130    }
    84131
     132   
     133
     134    /// <summary>
     135    /// Methods for the Server Login
     136    /// </summary>
    85137    #region Login
    86138    public event System.EventHandler<LoginCompletedEventArgs> LoginCompleted;
     
    110162    #endregion
    111163
     164    /// <summary>
     165    /// Pull a Job from the Server
     166    /// </summary>
    112167    #region PullJob
    113168    public event System.EventHandler<PullJobCompletedEventArgs> PullJobCompleted;
     
    124179    #endregion
    125180
     181    /// <summary>
     182    /// Send back finished Job Results
     183    /// </summary>
    126184    #region SendJobResults
    127185    public event System.EventHandler<SendJobResultCompletedEventArgs> SendJobResultCompleted;
     
    147205    #endregion
    148206
     207    /// <summary>
     208    /// Methods for sending the periodically Heartbeat
     209    /// </summary>
    149210    #region Heartbeat
    150211
  • trunk/sources/HeuristicLab.Hive.Client.Console/Service References/ClientService/Reference.cs

    r1087 r1132  
    322322        HeuristicLab.Hive.Client.Console.ClientService.StatusCommons EndGetStatusInfos(System.IAsyncResult result);
    323323       
    324         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IClientConsoleCommunicator/GetConnection", ReplyAction="http://tempuri.org/IClientConsoleCommunicator/GetConnectionResponse")]
    325         HeuristicLab.Hive.Client.Console.ClientService.ConnectionContainer GetConnection();
    326        
    327         [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://tempuri.org/IClientConsoleCommunicator/GetConnection", ReplyAction="http://tempuri.org/IClientConsoleCommunicator/GetConnectionResponse")]
    328         System.IAsyncResult BeginGetConnection(System.AsyncCallback callback, object asyncState);
    329        
    330         HeuristicLab.Hive.Client.Console.ClientService.ConnectionContainer EndGetConnection(System.IAsyncResult result);
    331        
    332324        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IClientConsoleCommunicator/SetConnection", ReplyAction="http://tempuri.org/IClientConsoleCommunicator/SetConnectionResponse")]
    333325        void SetConnection(HeuristicLab.Hive.Client.Console.ClientService.ConnectionContainer container);
     
    388380    [System.Diagnostics.DebuggerStepThroughAttribute()]
    389381    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    390     public partial class GetConnectionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
    391        
    392         private object[] results;
    393        
    394         public GetConnectionCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
    395                 base(exception, cancelled, userState) {
    396             this.results = results;
    397         }
    398        
    399         public HeuristicLab.Hive.Client.Console.ClientService.ConnectionContainer Result {
    400             get {
    401                 base.RaiseExceptionIfNecessary();
    402                 return ((HeuristicLab.Hive.Client.Console.ClientService.ConnectionContainer)(this.results[0]));
    403             }
    404         }
    405     }
    406    
    407     [System.Diagnostics.DebuggerStepThroughAttribute()]
    408     [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    409382    public partial class GetCurrentConnectionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
    410383       
     
    434407        private System.Threading.SendOrPostCallback onGetStatusInfosCompletedDelegate;
    435408       
    436         private BeginOperationDelegate onBeginGetConnectionDelegate;
    437        
    438         private EndOperationDelegate onEndGetConnectionDelegate;
    439        
    440         private System.Threading.SendOrPostCallback onGetConnectionCompletedDelegate;
    441        
    442409        private BeginOperationDelegate onBeginSetConnectionDelegate;
    443410       
     
    484451       
    485452        public event System.EventHandler<GetStatusInfosCompletedEventArgs> GetStatusInfosCompleted;
    486        
    487         public event System.EventHandler<GetConnectionCompletedEventArgs> GetConnectionCompleted;
    488453       
    489454        public event System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs> SetConnectionCompleted;
     
    543508        }
    544509       
    545         public HeuristicLab.Hive.Client.Console.ClientService.ConnectionContainer GetConnection() {
    546             return base.Channel.GetConnection();
    547         }
    548        
    549         [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    550         public System.IAsyncResult BeginGetConnection(System.AsyncCallback callback, object asyncState) {
    551             return base.Channel.BeginGetConnection(callback, asyncState);
    552         }
    553        
    554         [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    555         public HeuristicLab.Hive.Client.Console.ClientService.ConnectionContainer EndGetConnection(System.IAsyncResult result) {
    556             return base.Channel.EndGetConnection(result);
    557         }
    558        
    559         private System.IAsyncResult OnBeginGetConnection(object[] inValues, System.AsyncCallback callback, object asyncState) {
    560             return this.BeginGetConnection(callback, asyncState);
    561         }
    562        
    563         private object[] OnEndGetConnection(System.IAsyncResult result) {
    564             HeuristicLab.Hive.Client.Console.ClientService.ConnectionContainer retVal = this.EndGetConnection(result);
    565             return new object[] {
    566                     retVal};
    567         }
    568        
    569         private void OnGetConnectionCompleted(object state) {
    570             if ((this.GetConnectionCompleted != null)) {
    571                 InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
    572                 this.GetConnectionCompleted(this, new GetConnectionCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
    573             }
    574         }
    575        
    576         public void GetConnectionAsync() {
    577             this.GetConnectionAsync(null);
    578         }
    579        
    580         public void GetConnectionAsync(object userState) {
    581             if ((this.onBeginGetConnectionDelegate == null)) {
    582                 this.onBeginGetConnectionDelegate = new BeginOperationDelegate(this.OnBeginGetConnection);
    583             }
    584             if ((this.onEndGetConnectionDelegate == null)) {
    585                 this.onEndGetConnectionDelegate = new EndOperationDelegate(this.OnEndGetConnection);
    586             }
    587             if ((this.onGetConnectionCompletedDelegate == null)) {
    588                 this.onGetConnectionCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnGetConnectionCompleted);
    589             }
    590             base.InvokeAsync(this.onBeginGetConnectionDelegate, null, this.onEndGetConnectionDelegate, this.onGetConnectionCompletedDelegate, userState);
    591         }
    592        
    593510        public void SetConnection(HeuristicLab.Hive.Client.Console.ClientService.ConnectionContainer container) {
    594511            base.Channel.SetConnection(container);
  • trunk/sources/HeuristicLab.Hive.Client.Console/Service References/ClientService/configuration.svcinfo

    r954 r1132  
    66  </bindings>
    77  <endpoints>
    8     <endpoint normalizedDigest="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;net.tcp://127.0.0.1:8000/ClientConsole/ClientConsoleCommunicator&quot; binding=&quot;netTcpBinding&quot; bindingConfiguration=&quot;NetTcpBinding_IClientConsoleCommunicator&quot; contract=&quot;ClientService.IClientConsoleCommunicator&quot; name=&quot;NetTcpBinding_IClientConsoleCommunicator&quot;&gt;&lt;identity&gt;&lt;userPrincipalName value=&quot;mse08004@fhs-hagenberg.ac.at&quot; /&gt;&lt;/identity&gt;&lt;/Data&gt;" digest="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;net.tcp://127.0.0.1:8000/ClientConsole/ClientConsoleCommunicator&quot; binding=&quot;netTcpBinding&quot; bindingConfiguration=&quot;NetTcpBinding_IClientConsoleCommunicator&quot; contract=&quot;ClientService.IClientConsoleCommunicator&quot; name=&quot;NetTcpBinding_IClientConsoleCommunicator&quot;&gt;&lt;identity&gt;&lt;userPrincipalName value=&quot;mse08004@fhs-hagenberg.ac.at&quot; /&gt;&lt;/identity&gt;&lt;/Data&gt;" contractName="ClientService.IClientConsoleCommunicator" name="NetTcpBinding_IClientConsoleCommunicator" />
     8    <endpoint normalizedDigest="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;net.tcp://127.0.0.1:8000/ClientConsole/ClientConsoleCommunicator&quot; binding=&quot;netTcpBinding&quot; bindingConfiguration=&quot;NetTcpBinding_IClientConsoleCommunicator&quot; contract=&quot;ClientService.IClientConsoleCommunicator&quot; name=&quot;NetTcpBinding_IClientConsoleCommunicator&quot;&gt;&lt;identity&gt;&lt;userPrincipalName value=&quot;mse08003@fhs-hagenberg.ac.at&quot; /&gt;&lt;/identity&gt;&lt;/Data&gt;" digest="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;net.tcp://127.0.0.1:8000/ClientConsole/ClientConsoleCommunicator&quot; binding=&quot;netTcpBinding&quot; bindingConfiguration=&quot;NetTcpBinding_IClientConsoleCommunicator&quot; contract=&quot;ClientService.IClientConsoleCommunicator&quot; name=&quot;NetTcpBinding_IClientConsoleCommunicator&quot;&gt;&lt;identity&gt;&lt;userPrincipalName value=&quot;mse08003@fhs-hagenberg.ac.at&quot; /&gt;&lt;/identity&gt;&lt;/Data&gt;" contractName="ClientService.IClientConsoleCommunicator" name="NetTcpBinding_IClientConsoleCommunicator" />
    99  </endpoints>
    1010</configurationSnapshot>
  • trunk/sources/HeuristicLab.Hive.Client.Console/Service References/ClientService/configuration91.svcinfo

    r954 r1132  
    11<?xml version="1.0" encoding="utf-8"?>
    2 <SavedWcfConfigurationInformation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="9.1" CheckSum="LJHqHAg9UO+arib7mQMPUcNSFqQ=">
     2<SavedWcfConfigurationInformation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="9.1" CheckSum="hpOV9r43IeNDEU5uqNBUck5ld7s=">
    33  <bindingConfigurations>
    44    <bindingConfiguration bindingType="netTcpBinding" name="NetTcpBinding_IClientConsoleCommunicator">
     
    137137        </property>
    138138        <property path="/identity/userPrincipalName/value" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    139           <serializedValue>mse08004@fhs-hagenberg.ac.at</serializedValue>
     139          <serializedValue>mse08003@fhs-hagenberg.ac.at</serializedValue>
    140140        </property>
    141141        <property path="/identity/servicePrincipalName" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.ServicePrincipalNameElement, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
  • trunk/sources/HeuristicLab.Hive.Client.Console/Service References/ClientService/service.wsdl

    r1087 r1132  
    4848    <wsdl:part name="parameters" element="tns:GetStatusInfosResponse" />
    4949  </wsdl:message>
    50   <wsdl:message name="IClientConsoleCommunicator_GetConnection_InputMessage">
    51     <wsdl:part name="parameters" element="tns:GetConnection" />
    52   </wsdl:message>
    53   <wsdl:message name="IClientConsoleCommunicator_GetConnection_OutputMessage">
    54     <wsdl:part name="parameters" element="tns:GetConnectionResponse" />
    55   </wsdl:message>
    5650  <wsdl:message name="IClientConsoleCommunicator_SetConnection_InputMessage">
    5751    <wsdl:part name="parameters" element="tns:SetConnection" />
     
    8377      <wsdl:output wsaw:Action="http://tempuri.org/IClientConsoleCommunicator/GetStatusInfosResponse" message="tns:IClientConsoleCommunicator_GetStatusInfos_OutputMessage" />
    8478    </wsdl:operation>
    85     <wsdl:operation name="GetConnection">
    86       <wsdl:input wsaw:Action="http://tempuri.org/IClientConsoleCommunicator/GetConnection" message="tns:IClientConsoleCommunicator_GetConnection_InputMessage" />
    87       <wsdl:output wsaw:Action="http://tempuri.org/IClientConsoleCommunicator/GetConnectionResponse" message="tns:IClientConsoleCommunicator_GetConnection_OutputMessage" />
    88     </wsdl:operation>
    8979    <wsdl:operation name="SetConnection">
    9080      <wsdl:input wsaw:Action="http://tempuri.org/IClientConsoleCommunicator/SetConnection" message="tns:IClientConsoleCommunicator_SetConnection_InputMessage" />
     
    110100    <wsdl:operation name="GetStatusInfos">
    111101      <soap12:operation soapAction="http://tempuri.org/IClientConsoleCommunicator/GetStatusInfos" style="document" />
    112       <wsdl:input>
    113         <soap12:body use="literal" />
    114       </wsdl:input>
    115       <wsdl:output>
    116         <soap12:body use="literal" />
    117       </wsdl:output>
    118     </wsdl:operation>
    119     <wsdl:operation name="GetConnection">
    120       <soap12:operation soapAction="http://tempuri.org/IClientConsoleCommunicator/GetConnection" style="document" />
    121102      <wsdl:input>
    122103        <soap12:body use="literal" />
     
    169150        <wsa10:Address>net.tcp://127.0.0.1:8000/ClientConsole/ClientConsoleCommunicator</wsa10:Address>
    170151        <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity">
    171           <Upn>mse08004@fhs-hagenberg.ac.at</Upn>
     152          <Upn>mse08003@fhs-hagenberg.ac.at</Upn>
    172153        </Identity>
    173154      </wsa10:EndpointReference>
  • trunk/sources/HeuristicLab.Hive.Client.Console/Service References/ClientService/service.xsd

    r1087 r1132  
    1414    </xs:complexType>
    1515  </xs:element>
    16   <xs:element name="GetConnection">
    17     <xs:complexType>
    18       <xs:sequence />
    19     </xs:complexType>
    20   </xs:element>
    21   <xs:element name="GetConnectionResponse">
    22     <xs:complexType>
    23       <xs:sequence>
    24         <xs:element xmlns:q2="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Client.Core.ClientConsoleService" minOccurs="0" name="GetConnectionResult" nillable="true" type="q2:ConnectionContainer" />
    25       </xs:sequence>
    26     </xs:complexType>
    27   </xs:element>
    2816  <xs:element name="SetConnection">
    2917    <xs:complexType>
    3018      <xs:sequence>
    31         <xs:element xmlns:q3="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Client.Core.ClientConsoleService" minOccurs="0" name="container" nillable="true" type="q3:ConnectionContainer" />
     19        <xs:element xmlns:q2="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Client.Core.ClientConsoleService" minOccurs="0" name="container" nillable="true" type="q2:ConnectionContainer" />
    3220      </xs:sequence>
    3321    </xs:complexType>
     
    5644    <xs:complexType>
    5745      <xs:sequence>
    58         <xs:element xmlns:q4="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Client.Core.ClientConsoleService" minOccurs="0" name="GetCurrentConnectionResult" nillable="true" type="q4:ConnectionContainer" />
     46        <xs:element xmlns:q3="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Client.Core.ClientConsoleService" minOccurs="0" name="GetCurrentConnectionResult" nillable="true" type="q3:ConnectionContainer" />
    5947      </xs:sequence>
    6048    </xs:complexType>
  • trunk/sources/HeuristicLab.Hive.Client.Core/ClientConsoleService/ClientConsoleCommunicator.cs

    r1085 r1132  
    1717        return ConfigManager.Instance.GetStatusForClientConsole();
    1818      }
    19     }
    20 
    21     public ConnectionContainer GetConnection() {
    22       return new ConnectionContainer{IPAdress = WcfService.Instance.ServerIP, Port = WcfService.Instance.ServerPort } ;
    2319    }
    2420
  • trunk/sources/HeuristicLab.Hive.Client.Core/ClientConsoleService/Interfaces/IClientConsoleCommunicator.cs

    r1083 r1132  
    1 using System;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using System;
    223using System.Collections.Generic;
    324using System.Linq;
     
    627
    728namespace HeuristicLab.Hive.Client.Core.ClientConsoleService.Interfaces {
     29  /// <summary>
     30  /// Defines the interfaces for the Client Console
     31  /// </summary>
    832  [ServiceContract]
    933  public interface IClientConsoleCommunicator {
     34    /// <summary>
     35    /// Gets all status information concerning the client Service
     36    /// </summary>
     37    /// <returns>the StatusCommons Object, filled with the client details</returns>
    1038    [OperationContract]
    1139    StatusCommons GetStatusInfos();
    12     [OperationContract]
    13     ConnectionContainer GetConnection();
     40    /// <summary>
     41    /// Set the connection settings in the wcfService
     42    /// </summary>
     43    /// <param name="container">the container with the connection details</param>
    1444    [OperationContract]
    1545    void SetConnection(ConnectionContainer container);
     46    /// <summary>
     47    /// Signals the client to disconnect from the server
     48    /// </summary>
    1649    [OperationContract]
    1750    void Disconnect();
     51    /// <summary>
     52    /// Get the current connection details
     53    /// </summary>
     54    /// <returns>the ConnectionContainer Object</returns>
    1855    [OperationContract]
    1956    ConnectionContainer GetCurrentConnection();
     57    /// <summary>
     58    /// Signals the client to exit all jobs and shutdown
     59    /// </summary>
    2060    [OperationContract]
    2161    void ShutdownClient();
  • trunk/sources/HeuristicLab.Hive.Client.Core/ClientConsoleService/TransferObjects/ConnectionContainer.cs

    r950 r1132  
    1 using System;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using System;
    223using System.Collections.Generic;
    324using System.Linq;
  • trunk/sources/HeuristicLab.Hive.Client.Core/ClientConsoleService/TransferObjects/JobStatus.cs

    r950 r1132  
    1 using System;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using System;
    223using System.Collections.Generic;
    324using System.Linq;
     
    829  [DataContract]
    930  public class JobStatus {
     31    /// <summary>
     32    /// Id of the Job
     33    /// </summary>
    1034    [DataMember]
    1135    public long JobId { get; set; }
     36    /// <summary>
     37    /// When has the calculation of the Job begun?
     38    /// </summary>
    1239    [DataMember]
    1340    public DateTime Since { get; set; }
     41    /// <summary>
     42    /// Current progress
     43    /// </summary>
    1444    [DataMember]
    1545    public double Progress { get; set; }
  • trunk/sources/HeuristicLab.Hive.Client.Core/ClientConsoleService/TransferObjects/StatusCommons.cs

    r950 r1132  
    1 using System;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using System;
    223using System.Collections.Generic;
    324using System.Linq;
     
    728
    829namespace HeuristicLab.Hive.Client.Core.ClientConsoleService {
     30  /// <summary>
     31  /// Various Status Information for the ClientConsole
     32  /// </summary>
    933  [DataContract]
    1034  public class StatusCommons {   
  • trunk/sources/HeuristicLab.Hive.Client.Core/ConfigurationManager/ConfigManager.cs

    r1119 r1132  
    5151    /// Constructor for the singleton, must recover Guid, Calendar, ...
    5252    /// </summary>
    53     private ConfigManager() {
    54       //retrive GUID from XML file, or burn in hell. as in hell. not heaven.
    55       //this won't work this way. We need a plugin for XML Handling.     
     53    private ConfigManager() {     
    5654      hardwareInfo = new ClientInfo();
    5755
     
    6866    }
    6967
     68    /// <summary>
     69    /// Get all the Information about the client
     70    /// </summary>
     71    /// <returns>the ClientInfo object</returns>
    7072    public ClientInfo GetClientInfo() {
    7173      hardwareInfo.Login = WcfService.Instance.ConnectedSince;
     
    7375    }
    7476
     77    /// <summary>
     78    /// Returns the connectioncontainer with the IP and Port, storred in the Settings framework
     79    /// </summary>
     80    /// <returns>The IP and Port of the server</returns>
    7581    public ConnectionContainer GetServerIPAndPort() {
    7682      ConnectionContainer cc = new ConnectionContainer();
     
    8086    }
    8187
     88    /// <summary>
     89    /// Sets and saves IP and Port in the Settings framework
     90    /// </summary>
     91    /// <param name="cc"></param>
    8292    public void SetServerIPAndPort(ConnectionContainer cc) {
    8393      Settings.Default.ServerIP = cc.IPAdress;
     
    8595      Settings.Default.Save();
    8696    }
    87 
     97    /// <summary>
     98    /// collects and returns information that get displayed by the Client Console
     99    /// </summary>
     100    /// <returns></returns>
    88101    public StatusCommons GetStatusForClientConsole() {
    89102      StatusCommons st = new StatusCommons();
  • trunk/sources/HeuristicLab.Hive.Client.Core/Core.cs

    r1120 r1132  
    4646
    4747namespace HeuristicLab.Hive.Client.Core {
     48  /// <summary>
     49  /// The core component of the Hive Client
     50  /// </summary>
    4851  public class Core: MarshalByRefObject {
    4952    public delegate string GetASnapshotDelegate();
     
    5962    private WcfService wcfService;
    6063    private Heartbeat beat;
    61 
     64   
     65    /// <summary>
     66    /// Main Method for the client
     67    /// </summary>
    6268    public void Start() {
    6369      Core.Locker = new Object();
     
    7076      ConfigManager manager = ConfigManager.Instance;
    7177      manager.Core = this;
    72 
     78     
     79      //Register all Wcf Service references
    7380      wcfService = WcfService.Instance;
    7481      wcfService.LoginCompleted += new EventHandler<LoginCompletedEventArgs>(wcfService_LoginCompleted);
     
    7885      wcfService.ServerChanged += new EventHandler(wcfService_ServerChanged);
    7986      wcfService.Connected += new EventHandler(wcfService_Connected);
    80       ConnectionContainer cc = ConfigManager.Instance.GetServerIPAndPort();
     87      //Recover Server IP and Port from the Settings Framework
     88      ConnectionContainer cc = ConfigManager.Instance.GetServerIPAndPort();     
    8189      if (cc.IPAdress != String.Empty && cc.Port != 0) {
    8290        wcfService.Connect(cc.IPAdress, cc.Port);
    8391      }
    8492   
     93      //Initialize the heartbeat
    8594      beat = new Heartbeat { Interval = 10000 };
    8695      beat.StartHeartbeat();     
    8796
    8897      MessageQueue queue = MessageQueue.GetInstance();
     98     
     99      //Main processing loop
    89100      while (!ShutdownFlag) {
    90101        MessageContainer container = queue.GetMessage();
     
    95106    }
    96107
     108    /// <summary>
     109    /// Reads and analyzes the Messages from the MessageQueue and starts corresponding actions
     110    /// </summary>
     111    /// <param name="container">The Container, containing the message</param>
    97112    private void DetermineAction(MessageContainer container) {
    98113      switch (container.Message) {
     114        //Server requests to abort a job
    99115        case MessageContainer.MessageType.AbortJob:
    100116          engines[container.JobId].Abort();
    101117          break;
     118        //Job has been successfully aborted
    102119        case MessageContainer.MessageType.JobAborted:
    103120          Debug.WriteLine("-- Job Aborted Message received");
    104121          break;
    105 
     122        //Request a Snapshot from the Execution Engine
    106123        case MessageContainer.MessageType.RequestSnapshot:
    107124          engines[container.JobId].RequestSnapshot();
    108125          break;
     126        //Snapshot is ready and can be sent back to the Server
    109127        case MessageContainer.MessageType.SnapshotReady:
    110128          Thread ssr = new Thread(new ParameterizedThreadStart(GetSnapshot));
    111129          ssr.Start(container.JobId);         
    112130          break;
    113 
     131        //Pull a Job from the Server
    114132        case MessageContainer.MessageType.FetchJob:
    115133          wcfService.PullJobAsync(Guid.NewGuid());
    116134          break;         
     135        //A Job has finished and can be sent back to the server
    117136        case MessageContainer.MessageType.FinishedJob:
    118137          Thread finThread = new Thread(new ParameterizedThreadStart(GetFinishedJob));
    119138          finThread.Start(container.JobId);         
    120139          break;     
     140        //Hard shutdown of the client
    121141        case MessageContainer.MessageType.Shutdown:
    122142          ShutdownFlag = true;
     
    126146    }
    127147
     148    //Asynchronous Threads for interaction with the Execution Engine
    128149    #region Async Threads for the EE
    129150   
     
    146167    #endregion
    147168
     169    //Eventhandlers for the communication with the wcf Layer
    148170    #region wcfService Events
    149171
  • trunk/sources/HeuristicLab.Hive.Client.ExecutionEngine/Executor.cs

    r1119 r1132  
    5353    public void Start(byte[] serializedJob) {
    5454      CreationTime = DateTime.Now;
    55       //Job = (IJob)PersistenceManager.RestoreFromGZip(serializedJob);
     55      Job = (IJob)PersistenceManager.RestoreFromGZip(serializedJob);
    5656      //debug
    57       Job = new TestJob();
     57      //Job = new TestJob();
    5858      Job.JobStopped += new EventHandler(Job_JobStopped);
    5959      Job.Start();
Note: See TracChangeset for help on using the changeset viewer.