1 /* |
|
2 * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved. |
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
|
4 * |
|
5 * This code is free software; you can redistribute it and/or modify it |
|
6 * under the terms of the GNU General Public License version 2 only, as |
|
7 * published by the Free Software Foundation. Oracle designates this |
|
8 * particular file as subject to the "Classpath" exception as provided |
|
9 * by Oracle in the LICENSE file that accompanied this code. |
|
10 * |
|
11 * This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 * version 2 for more details (a copy is included in the LICENSE file that |
|
15 * accompanied this code). |
|
16 * |
|
17 * You should have received a copy of the GNU General Public License version |
|
18 * 2 along with this work; if not, write to the Free Software Foundation, |
|
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 * |
|
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
22 * or visit www.oracle.com if you need additional information or have any |
|
23 * questions. |
|
24 */ |
|
25 |
|
26 package sun.jvmstat.perfdata.monitor.protocol.file; |
|
27 |
|
28 import sun.jvmstat.monitor.*; |
|
29 import sun.jvmstat.monitor.event.VmListener; |
|
30 import sun.jvmstat.perfdata.monitor.*; |
|
31 import java.util.List; |
|
32 import java.lang.reflect.*; |
|
33 import java.io.*; |
|
34 |
|
35 /** |
|
36 * Concrete implementation of the AbstractMonitoredVm class for the |
|
37 * <em>file:</em> protocol for the HotSpot PerfData monitoring implementation. |
|
38 * <p> |
|
39 * This class provides the ability to attach to the instrumentation buffer |
|
40 * (saved or live) of a target Java Virtual Machine by providing a |
|
41 * <em>file</em> URI to a file containing the instrmentation buffer data. |
|
42 * |
|
43 * @author Brian Doherty |
|
44 * @since 1.5 |
|
45 */ |
|
46 public class FileMonitoredVm extends AbstractMonitoredVm { |
|
47 |
|
48 /** |
|
49 * Create a FileMonitoredVm instance. |
|
50 * |
|
51 * @param vmid the vm identifier referring to the file |
|
52 * @param interval sampling interval (unused in this protocol). |
|
53 */ |
|
54 public FileMonitoredVm(VmIdentifier vmid, int interval) |
|
55 throws MonitorException { |
|
56 super(vmid, interval); |
|
57 this.pdb = new PerfDataBuffer(vmid); |
|
58 } |
|
59 |
|
60 /** |
|
61 * {@inheritDoc}. |
|
62 *<p> |
|
63 * Note - the <em>file:</em> protocol currently does not support |
|
64 * the registration or notification of listeners. |
|
65 */ |
|
66 public void addVmListener(VmListener l) { } |
|
67 |
|
68 /** |
|
69 * {@inheritDoc}. |
|
70 *<p> |
|
71 * Note - the <em>file:</em> protocol currently does not support |
|
72 * the registration or notification of listeners. |
|
73 */ |
|
74 public void removeVmListener(VmListener l) { } |
|
75 } |
|