/*********************************************************************/ /* */ /* AgentService Framework */ /* www.agentservice.it */ /* */ /* Copyright (C) 2007 l.i.d.o. - DIST, University of Genoa, Italy */ /* GNU Lesser General Public License */ /* */ /* 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 */ /* 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, write to the */ /* Free Software Foundation, Inc., 59 Temple Place - Suite 330, */ /* Boston, MA 02111-1307, USA. */ /* */ /*********************************************************************/ using AgentService; using AgentService.Agent; namespace AgentService.Agent.Runtime { /// /// Interface IAgentEventProxy. Offers a safe /// and controlled access for runtime components /// to the agent's events. /// public interface IAgentEventProxy { /// /// Fires when the agent is activated. /// event AgentDelegate OnActivateAgent; /// /// Fires when the agent is stopped. /// event AgentDelegate OnStopAgent; /// /// Fires when the system reosurces of the agent /// need to be released. /// event AgentDelegate OnReleaseAgent; /// /// Fires when the agent is terminated. /// event AgentDelegate OnTerminateAgent; /// /// Fires when a new behaviour in the agent is /// created. /// event BehaviourDelegate OnNewBehaviour; /// /// Fires when an agent's behaviour is started. /// event BehaviourDelegate OnStartBehaviour; /// /// Fires when an agent's behaviour is suspended. /// event BehaviourDelegate OnSuspendBehaviour; /// /// Fires when an agent's behaviour is terminated. /// event BehaviourDelegate OnTerminateBehaviour; } /// ///

/// Interface IRuntimeBindable. Defines a /// contract for runtime components that /// specifies how to attach to the events /// of the agent class. ///

///

/// This interface avoids direct references /// to agent instances. ///

///
public interface IRuntimeBindable { /// /// Connects the runtime component to the events /// originated by the agent instance. /// /// proxy to the agent instance void BindEvents(IAgentEventProxy proxy); /// /// Disconnects the runtime component to the events /// originated by the agent instance. /// /// proxy to the agent instance void UnbindEvents(IAgentEventProxy proxy); } }