57 * to that object will be return. Otherwise, the method returns 58 * <tt>null</tt>. 59 * 60 * @param name the name of the Instrumentation object to find. 61 * @return Monitor - the {@link Monitor} object that can be used to 62 * monitor the named instrumentation object, or 63 * <tt>null</tt> if the named object doesn't exist. 64 * @throws MonitorException Thrown if an error occurs while communicating 65 * with the target Java Virtual Machine. 66 */ 67 Monitor findByName(String name) throws MonitorException; 68 69 /** 70 * Find all Instrumentation objects with names matching the given pattern. 71 * 72 * This method returns a {@link List} of Monitor objects such that 73 * the name of each object matches the given pattern. 74 * 75 * @param patternString a string containing a pattern as described in 76 * {@link java.util.regex.Pattern}. 77 * @return List<Monitor> - a List of {@link Monitor} objects that can be used to 78 * monitor the instrumentation objects whose names match 79 * the given pattern. If no instrumentation objects have` 80 * names matching the given pattern, then an empty List 81 * is returned. 82 * @throws MonitorException Thrown if an error occurs while communicating 83 * with the target Java Virtual Machine. 84 * @see java.util.regex.Pattern 85 */ 86 List<Monitor> findByPattern(String patternString) throws MonitorException; 87 88 /** 89 * Detach from target Java Virtual Machine. 90 * 91 * After calling this method, updates of the instrumentation data values 92 * may be halted. All event notifications are halted. Further interactions 93 * with this object should be avoided. 94 */ 95 void detach(); 96 97 98 /* ---- Methods to support polled MonitoredVm Implementations ---- */ 99 | 57 * to that object will be return. Otherwise, the method returns 58 * <tt>null</tt>. 59 * 60 * @param name the name of the Instrumentation object to find. 61 * @return Monitor - the {@link Monitor} object that can be used to 62 * monitor the named instrumentation object, or 63 * <tt>null</tt> if the named object doesn't exist. 64 * @throws MonitorException Thrown if an error occurs while communicating 65 * with the target Java Virtual Machine. 66 */ 67 Monitor findByName(String name) throws MonitorException; 68 69 /** 70 * Find all Instrumentation objects with names matching the given pattern. 71 * 72 * This method returns a {@link List} of Monitor objects such that 73 * the name of each object matches the given pattern. 74 * 75 * @param patternString a string containing a pattern as described in 76 * {@link java.util.regex.Pattern}. 77 * @return {@code List<Monitor>} - a List of {@link Monitor} 78 * objects that can be used to 79 * monitor the instrumentation objects whose names match 80 * the given pattern. If no instrumentation objects have 81 * names matching the given pattern, then an empty List 82 * is returned. 83 * @throws MonitorException Thrown if an error occurs while communicating 84 * with the target Java Virtual Machine. 85 * @see java.util.regex.Pattern 86 */ 87 List<Monitor> findByPattern(String patternString) throws MonitorException; 88 89 /** 90 * Detach from target Java Virtual Machine. 91 * 92 * After calling this method, updates of the instrumentation data values 93 * may be halted. All event notifications are halted. Further interactions 94 * with this object should be avoided. 95 */ 96 void detach(); 97 98 99 /* ---- Methods to support polled MonitoredVm Implementations ---- */ 100 |