#ifndef REQUEST_HPP
#define REQUEST_HPP

#include <string>

namespace mole {
    namespace serv {
	class Response;
    }

    namespace ctx {
	class Client;
	/**
	 * A request is used to hide communications between client & servers,
	 * and it is particulary used by services.
	 *
	 * A request contains input arguments that need to be given to service
	 * before execution. You are free in your implementation for that job,
	 * but a method called <b>init</b> could be nice for convention.
	 *
	 * After execution, return values are stored into the
	 * request, so it is necessary to create getters into your request
	 * implementation.
	 */
	class Request {

	    public :
		Request();
		~Request();

		virtual mole::serv::Response * execute(Client *);

		virtual Request * newRequest();

		void setName(std::string n){ methodName = n;};

		std::string name(){ return methodName; };

	    protected :
		std::string methodName;
	};

    } // end of mole

} // end of ctx 

#endif
