< prev index next >

src/hotspot/share/services/attachListener.hpp

Print this page




 173       _arg[i][0] = '\0';
 174     } else {
 175       assert(strlen(arg) <= arg_length_max, "exceeds maximum argument length");
 176       size_t len = MIN2(strlen(arg), (size_t)arg_length_max);
 177       memcpy(_arg[i], arg, len);
 178       _arg[i][len] = '\0';
 179     }
 180   }
 181 
 182   // create an operation of a given name
 183   AttachOperation(const char* name) {
 184     set_name(name);
 185     for (int i=0; i<arg_count_max; i++) {
 186       set_arg(i, NULL);
 187     }
 188   }
 189 
 190   // complete operation by sending result code and any result data to the client
 191   virtual void complete(jint result, bufferedStream* result_stream) = 0;
 192 };





























 193 #endif // INCLUDE_SERVICES
 194 
 195 #endif // SHARE_SERVICES_ATTACHLISTENER_HPP


 173       _arg[i][0] = '\0';
 174     } else {
 175       assert(strlen(arg) <= arg_length_max, "exceeds maximum argument length");
 176       size_t len = MIN2(strlen(arg), (size_t)arg_length_max);
 177       memcpy(_arg[i], arg, len);
 178       _arg[i][len] = '\0';
 179     }
 180   }
 181 
 182   // create an operation of a given name
 183   AttachOperation(const char* name) {
 184     set_name(name);
 185     for (int i=0; i<arg_count_max; i++) {
 186       set_arg(i, NULL);
 187     }
 188   }
 189 
 190   // complete operation by sending result code and any result data to the client
 191   virtual void complete(jint result, bufferedStream* result_stream) = 0;
 192 };
 193 
 194 // Base Class for arguments parsing.
 195 class CommandArgs : public CHeapObj<mtInternal> {
 196 };
 197 
 198 // Arguments of HeapInspect.
 199 struct HeapInspectArgs : public CommandArgs {
 200   bool _live_object_only;
 201   size_t _parallel_thread_num;
 202   fileStream* _fs;
 203   char* _path;
 204 
 205   HeapInspectArgs() : _live_object_only(false),
 206                       _parallel_thread_num(0),
 207                       _fs(NULL),
 208                       _path(NULL) { }
 209   ~HeapInspectArgs() {
 210     if (_path != NULL) {
 211       FREE_C_HEAP_ARRAY(char, _path);
 212       _path = NULL;
 213     }
 214 
 215     if (_fs != NULL) {
 216       delete _fs;
 217       _fs = NULL;
 218     }
 219   }
 220 };
 221 
 222 #endif // INCLUDE_SERVICES
 223 
 224 #endif // SHARE_SERVICES_ATTACHLISTENER_HPP
< prev index next >