Changeset 1132 for trunk/sources/HeuristicLab.Hive.Client.Communication
- Timestamp:
- 01/15/09 14:46:57 (16 years ago)
- 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 22 using System; 2 23 using System.Collections.Generic; 3 24 using System.Linq; … … 11 32 12 33 namespace 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> 13 37 public class WcfService { 14 38 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> 15 43 public static WcfService Instance { 16 44 get { … … 33 61 public ClientCommunicatorClient proxy = null; 34 62 63 /// <summary> 64 /// Constructor 65 /// </summary> 35 66 private WcfService() { 36 67 ConnState = NetworkEnum.WcfConnState.Disconnected; 37 68 } 69 70 /// <summary> 71 /// Connects with the Server, registers the events and fires the Connected (and quiet possibly the ConnectionRestored) Event. 72 /// </summary> 38 73 public void Connect() { 39 74 try { … … 63 98 } 64 99 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> 65 105 public void Connect(String serverIP, int serverPort) { 66 106 String oldIp = this.ServerIP; … … 73 113 ServerChanged(this, new EventArgs()); 74 114 } 75 115 116 /// <summary> 117 /// Disconnects the Client from the Server 118 /// </summary> 76 119 public void Disconnect() { 77 120 ConnState = NetworkEnum.WcfConnState.Disconnected; 78 121 } 79 122 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> 80 127 private void NetworkErrorHandling(Exception e) { 81 128 ConnState = NetworkEnum.WcfConnState.Failed; … … 83 130 } 84 131 132 133 134 /// <summary> 135 /// Methods for the Server Login 136 /// </summary> 85 137 #region Login 86 138 public event System.EventHandler<LoginCompletedEventArgs> LoginCompleted; … … 110 162 #endregion 111 163 164 /// <summary> 165 /// Pull a Job from the Server 166 /// </summary> 112 167 #region PullJob 113 168 public event System.EventHandler<PullJobCompletedEventArgs> PullJobCompleted; … … 124 179 #endregion 125 180 181 /// <summary> 182 /// Send back finished Job Results 183 /// </summary> 126 184 #region SendJobResults 127 185 public event System.EventHandler<SendJobResultCompletedEventArgs> SendJobResultCompleted; … … 147 205 #endregion 148 206 207 /// <summary> 208 /// Methods for sending the periodically Heartbeat 209 /// </summary> 149 210 #region Heartbeat 150 211
Note: See TracChangeset
for help on using the changeset viewer.