/*********************************************************************/
/* */
/* 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 System;
using AgentService.Platform.DF;
using AgentService.Platform.AMS;
namespace AgentService.Agent.Runtime
{
///
/// Class YellowPagesServerProxy. Proxy object which
/// implements the IYellowPagesServer interface.
///
class YellowPageServerProxy : MarshalByRefObject, IYellowPagesServer
{
#region Members
///
/// Reference to YellowPageServer
///
private IYellowPagesServer yellow;
#endregion
#region Constructor
///
/// Construct a YellowPageServerProxy
///
/// the yellowpageserver to proxy
public YellowPageServerProxy(IYellowPagesServer yps)
{
this.yellow = yps;
}
#endregion
#region IYellowPageServer Members
///
/// Looks for agents that offer the requested service.
///
/// Description of the requested service
/// An array of DFAgentDescription objects
public DFAgentDescription[] SearchAgent(ServiceDescription sd)
{
return this.yellow.SearchAgent(sd);
}
///
/// Looks for agents that offer the requested service.
///
/// Description of the requested service
/// Flags that specify which fields are used to compare the services
/// An array of DFAgentDescription objects
public DFAgentDescription[] SearchAgent(ServiceDescription sd, ServiceComparison flags)
{
return this.yellow.SearchAgent(sd, flags);
}
///
/// Looks for agents that offer the requested service and applies the given constraint to the search.
///
/// Description of the requested service
/// Constraint applied to the search process
/// An array of DFAgentDescription objects
public DFAgentDescription[] SearchAgent(ServiceDescription sd, SearchConstraints constraint)
{
return this.yellow.SearchAgent(sd, constraint);
}
///
/// Looks for agents that offer the requested service and applies the given constraint to the search.
///
/// Description of the requested service
/// Constraint applied to the search process
/// Flags that specify which fields are used to compare the services
/// An array of DFAgentDescription objects
public DFAgentDescription[] SearchAgent(ServiceDescription sd, ServiceComparison flags, SearchConstraints constraint)
{
return this.yellow.SearchAgent(sd, flags, constraint);
}
///
/// Registers an agent with the directory facilitator service.
///
/// description of the services promoted by the agent
public void Register(DFAgentDescription description)
{
this.yellow.Register(description);
}
///
/// Modifies the agent description previously registered with the directory facilitator service.
///
/// description of the services promoted by the agent
public void Edit(DFAgentDescription description)
{
this.yellow.Edit(description);
}
///
/// Registers an agent with the directory facilitator service.
///
/// identifier of the agents whoes description has to be removed
public void Deregister(AID aid)
{
this.yellow.Deregister(aid);
}
#endregion
}
}