////////////////////////////////////////////////// // Created by Ivan Latunov - IvanWeb.com // //----------------------------------------------// // This program is free software. You can // // redistribute it and/or modify it as you wish // ////////////////////////////////////////////////// using System; namespace sscs.communication.win.InterProcessComm { #region Comments /// /// Interface, which defines methods for a Channel Manager class. /// /// /// A Channel Manager is responsible for creating and maintaining channels for inter-process communication. The opened channels are meant to be reusable for performance optimization. Each channel needs to procees requests by calling the HandleRequest method of the Channel Manager. /// #endregion public interface IChannelManager { #region Comments /// /// Initializes the Channel Manager. /// #endregion void Initialize(); #region Comments /// /// Closes all opened channels and stops the Channel Manager. /// #endregion void Start(); void Stop(); #region Comments /// /// Handles a request. /// /// /// This method currently caters for text based requests. XML strings can be used in case complex request structures are needed. /// /// The incoming request. /// The resulting response. #endregion string HandleRequest(string request); #region Comments /// /// Indicates whether the Channel Manager is in listening mode. /// /// /// This property is left public so that other classes, like a server channel can start or stop listening based on the Channel Manager mode. /// #endregion bool Listen {get; set;} #region Comments /// /// Forces the Channel Manager to exit a sleeping mode and create a new channel. /// /// /// Normally the Channel Manager will create a number of reusable channels, which will handle the incoming reqiests, and go into a sleeping mode. However if the request load is high, the Channel Manager needs to be asked to create additional channels. /// #endregion void WakeUp(); #region Comments /// /// Removes an existing channel. /// /// A parameter identifying the channel. #endregion void RemoveServerChannel(object param); } }