/*
 * Created on 2004-6-7
 *
 * To change the template for this generated file go to
 * Window - Preferences - Java - Code Generation - Code and Comments
 */
package org.huihoo.willow;

/**
 * @author reic
 *
 * To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Generation - Code and Comments
 */
public interface Service {


		// ------------------------------------------------------------- Properties


		/**
		 * Return the <code>Container</code> that handles requests for all
		 * <code>Provider</code> associated with this Service.
		 */
		public Container getContainer();


		/**
		 * Set the <code>Container</code> that handles requests for all
		 * <code>Connectors</code> associated with this Service.
		 *
		 * @param container The new Container
		 */
		public void setContainer(Container container);


		/**
		 * Return descriptive information about this Service implementation and
		 * the corresponding version number, in the format
		 * <code>&lt;description&gt;/&lt;version&gt;</code>.
		 */
		public String getInfo();


		/**
		 * Return the name of this Service.
		 */
		public String getName();


		/**
		 * Set the name of this Service.
		 *
		 * @param name The new service name
		 */
		public void setName(String name);


		/**
		 * Return the <code>NamingServer</code> with which we are associated (if any).
		 */
		public Server getServer();


		/**
		 * Set the <code>NamingServer</code> with which we are associated (if any).
		 *
		 * @param server The server that owns this Service
		 */
		public void setServer(Server server);

    
		// --------------------------------------------------------- Public Methods


		/**
		 * Add a new Provider to the set of defined Providers, and associate it
		 * with this Service's Container.
		 *
		 * @param connector The Connector to be added
		 */
		public void addProvider(Provider provider);


		/**
		 * Find and return the set of Provider associated with this Service.
		 */
		public Provider[] findProviders();


		/**
		 * Remove the specified Provider from the set associated from this
		 * Service.  The removed Provider will also be disassociated from our
		 * Container.
		 *
		 * @param provider The Provider to be removed
		 */
		public void removeProvider(Provider provider);

}

