00001 /* Copyright (C) GridGain Systems. All Rights Reserved. */ 00002 00003 /* _________ _____ __________________ _____ 00004 * __ ____/___________(_)______ /__ ____/______ ____(_)_______ 00005 * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \ 00006 * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / / 00007 * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/ 00008 */ 00009 00010 #ifndef GRID_CLIENT_MESSAGE_PROJECTION_CLOSURE_HPP_INCLUDED 00011 #define GRID_CLIENT_MESSAGE_PROJECTION_CLOSURE_HPP_INCLUDED 00012 00013 #include <string> 00014 00015 #include "gridgain/impl/cmd/gridclientmessage.hpp" 00016 #include "gridgain/impl/projectionclosure/gridclientprojectionclosure.hpp" 00017 #include "gridgain/impl/cmd/gridclientmessagecommand.hpp" 00018 00022 class ClientMessageProjectionClosure : public ClientProjectionClosure { 00023 public: 00029 ClientMessageProjectionClosure(std::string pClientId) : 00030 clientId(pClientId) {}; 00031 00037 ClientMessageProjectionClosure(GridClientUuid & clientId) : 00038 clientId(clientId) {}; 00039 00045 void fillRequestHeader(GridClientMessageCommand& cmd, TGridClientNodePtr node) { 00046 int requestId = cmd.generateNewId(); 00047 00048 cmd.setRequestId(requestId); 00049 cmd.setClientId(clientId); 00050 cmd.setDestinationId(node->getNodeId()); 00051 } 00052 00053 private: 00055 GridClientUuid clientId; 00056 }; 00057 00058 #endif
1.7.1