12 int64_t startedAt,
unsigned char logPriority,
const std::string& iniFile) :
13 Handler(name, ctx, clientIdentity, connectionString, startedAt, logPriority, iniFile), _adminServerSock(nullptr), _clientsManagerInproc(nullptr){
96 std::string clientIdentity((
const char*)msg.
pop_front().c_str());
105 if (!propertyMessage.
isError()){
122 std::vector<std::string> parts;
124 std::istringstream partsStream(command);
125 std::string tmpString;
127 parts.push_back(tmpString);
137 std::string clientIdentity((
const char*)msg.
pop_front().c_str());
140 std::string messageId((
const char*)msg.
pop_front().c_str());
147 if (requestItems.size() < 3){
152 if(requestItems.size() > 2){
159 if (adminCommandParameters.
isError()){
175 msg.
append(requestItems[0].c_str());
177 msg.
append(messageId.c_str());
179 msg.
append(requestItems[1].c_str());
181 msg.
append(requestItems[2].c_str());
183 msg.
append(clientIdentity.c_str());
186 << requestItems[1].c_str() <<
"], params [" << requestItems[2].c_str() <<
"] " <<
" bytes" <<
flush;
195 msg.
append(clientIdentity.c_str());
197 msg.
append(messageId.c_str());
199 msg.
append(responseMsg.c_str());
208 if(responseMsg ==
""){
211 logger.
log(
NODE_LOG_MODE_DEBUG) <<
"Internal admin command [" << requestItems[1].c_str() <<
"], params [" << requestItems[2].c_str() <<
"] " <<
" not supported" <<
flush;
217 msg.
append(clientIdentity.c_str());
219 msg.
append(messageId.c_str());
221 msg.
append(responseMsg.c_str());
230 msg.
append(clientIdentity.c_str());
232 msg.
append(messageId.c_str());
234 msg.
append(responseMsg.c_str());
239 msg.
append(clientIdentity.c_str());
241 msg.
append(messageId.c_str());
262 clientMsg.
wrap(it->identity.c_str(), NULL);
275 std::string
ret =
"";
283 std::istringstream(parameters) >>
timeout;
299 std::stringstream result;
305 std::stringstream timeStream;
306 timeStream << (
unsigned int)(s_clock() -
getStartedAt());
308 std::stringstream result;
322 std::istringstream(parameters) >> logp;
327 Poco::Logger::root().setLevel(logp);
334 std::istringstream(parameters) >> pollTimeout;
345 std::istringstream(parameters) >> dumpInterval;
357 std::stringstream result;
388 std::string clientIdentity((
const char*)msg.
pop_front().c_str());
390 std::string messageId((
const char*)msg.
pop_front().c_str());
394 std::string sourceClientIdentity((
const char*)msg.
pop_front().c_str());
401 responseMsg.
append(sourceClientIdentity.c_str());
403 responseMsg.
append(messageId.c_str());
448 if(items[0].revents & ZMQ_POLLIN){
453 if(items[1].revents & ZMQ_POLLIN){
461 if (EINTR!=error.
num()){
464 }
catch(std::exception& e){
465 std::cout <<
"Admin E: " << e.what() <<
std::endl;
467 std::cout <<
"Admin E: Unknown exception" <<
std::endl;