Free cookie consent management tool by TermsFeed Policy Generator

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

added licence information and comments (#467)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.