/*********************************************************************** * * Copyright (C) 2005-2006 Novell, Inc. Inc. All Rights Reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; version 2.1 * of the License. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, Novell, Inc. * * To contact Novell about this file by physical or electronic mail, * you may find current contact information at www.novell.com. * ***********************************************************************/ using System; namespace AppModule.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(); void Start(); #region Comments /// /// Closes all opened channels and stops the Channel Manager. /// #endregion 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); } }