/* * \file FragmentWorker.hpp * * Created on: Nov 18, 2011 * Author: heber */ #ifndef FRAGMENTWORKER_HPP_ #define FRAGMENTWORKER_HPP_ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include #include #include "Connection.hpp" #include "Jobs/FragmentJob.hpp" #include "Controller/Commands/WorkOnJobOperation.hpp" /** Receives a job from Server to execute and return FragmentResult. * */ class FragmentWorker { public: /// Constructor starts the asynchronous connect operation. FragmentWorker(boost::asio::io_service& io_service, const std::string& host, const std::string& service); /** Returns the flag of the handled operation. * */ size_t getExitflag() const { return operation.getExitflag(); } private: /// The Connection to the server. Connection connection_; //!> operation that handles connection, getting, and working on job. WorkOnJobOperation operation; }; #endif /* FRAGMENTWORKER_HPP_ */