[11489] | 1 | #region License Information
|
---|
| 2 | /* HeuristicLab
|
---|
| 3 | * Copyright (C) 2002-2014 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 HeuristicLab.Common;
|
---|
| 23 | using System;
|
---|
| 24 | using System.Threading;
|
---|
| 25 | using System.Threading.Tasks;
|
---|
| 26 |
|
---|
[11526] | 27 | namespace HeuristicLab.Core.Networks {
|
---|
[11489] | 28 | public interface IGenericPort : IParameterizedPort {
|
---|
[11529] | 29 | new PortParameterCollection Parameters { get; }
|
---|
| 30 |
|
---|
[11490] | 31 | IConnectedPort ConnectedPort { get; set; }
|
---|
[11489] | 32 | bool PortConnectionValid { get; }
|
---|
[11519] | 33 | bool LogMessages { get; set; }
|
---|
[11501] | 34 | MessageCollection Messages { get; }
|
---|
[11489] | 35 |
|
---|
| 36 | event EventHandler ConnectedPortChanged;
|
---|
[11519] | 37 | event EventHandler PortConnectionValidChanged;
|
---|
| 38 | event EventHandler LogMessagesChanged;
|
---|
[11489] | 39 |
|
---|
| 40 | bool CanConnectToPort(IPort port);
|
---|
| 41 | void CloneConnectedPortParameters();
|
---|
| 42 |
|
---|
| 43 | IMessage PrepareMessage();
|
---|
| 44 | void SendMessage(IMessage message);
|
---|
| 45 | void SendMessage(IMessage message, CancellationToken token);
|
---|
| 46 | Task SendMessageAsync(IMessage message);
|
---|
| 47 | Task SendMessageAsync(IMessage message, CancellationToken token);
|
---|
| 48 |
|
---|
| 49 | event EventHandler<EventArgs<IMessage, CancellationToken>> MessageReceived;
|
---|
| 50 | }
|
---|
| 51 | }
|
---|