Java Doc for MonitoredHost.java in  » 6.0-JDK-Modules-sun » jvmstat » sun » jvmstat » monitor » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules sun » jvmstat » sun.jvmstat.monitor 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   sun.jvmstat.monitor.MonitoredHost

All known Subclasses:   sun.jvmstat.perfdata.monitor.protocol.rmi.MonitoredHostProvider,  sun.jvmstat.perfdata.monitor.protocol.local.MonitoredHostProvider,  sun.jvmstat.perfdata.monitor.protocol.file.MonitoredHostProvider,
MonitoredHost
abstract public class MonitoredHost (Code)
An abstraction for a host that contains instrumented Java Virtual Machines. The class provides abstract factory methods for creating concrete instances of this class and factory methods for creating MonitoredVm instances. Concrete implementations of this class provide methods for managing the communications protocols and provide for event notification.
author:
   Brian Doherty
version:
   1.10, 05/09/07
since:
   1.5
See Also:   HostIdentifier
See Also:   VmIdentifier
See Also:   MonitoredVm
See Also:   HostListener


Field Summary
protected  HostIdentifierhostId
     The HostIdentifier for this MonitoredHost instance.
protected  intinterval
     The polling interval, in milliseconds, for this MonitoredHost instance.
protected  ExceptionlastException
     The last Exception encountered while polling this MonitoredHost.


Method Summary
abstract public  Set<Integer>activeVms()
     Return the current set of active Java Virtual Machines for this MonitoredHost.
abstract public  voidaddHostListener(HostListener listener)
     Add a HostListener.
public  voidclearLastException()
     Clear the last exception.
abstract public  voiddetach(MonitoredVm vm)
     Detach from the indicated MonitoredVm.
public  HostIdentifiergetHostIdentifier()
     Return the resolved HostIdentifier for this MonitoredHost.
public  intgetInterval()
     Get the polling interval.
public  ExceptiongetLastException()
     Get the last exception encountered while polling this MonitoredHost.
public static  MonitoredHostgetMonitoredHost(String hostIdString)
     Factory method to construct MonitoredHost instances to manage connections to the host indicated by hostIdString
Parameters:
  hostIdString - a String representation of a HostIdentifier MonitoredHost - the MonitoredHost instance for communicatingwith the indicated host using the protocolspecified in hostIdString.
throws:
  MonitorException - Thrown if monitoring errors occur.
throws:
  URISyntaxException - Thrown when the hostIdString is poorlyformed.
public static  MonitoredHostgetMonitoredHost(VmIdentifier vmid)
     Factory method to construct a MonitoredHost instance to manage the connection to the Java Virtual Machine indicated by vmid. This method provide a convenient short cut for attaching to a specific instrumented Java Virtual Machine.
public static  MonitoredHostgetMonitoredHost(HostIdentifier hostId)
     Factory method to construct a MonitoredHost instance to manage the connection to the host indicated by hostId.
Parameters:
  hostId - the identifier for the target host.
abstract public  MonitoredVmgetMonitoredVm(VmIdentifier id)
     Get the MonitoredVm for the given Java Virtual Machine.
abstract public  MonitoredVmgetMonitoredVm(VmIdentifier id, int interval)
     Get the MonitoredVm for the given Java Virtual Machine.
public  booleanisErrored()
     Test if this MonitoredHost is in the errored state.
abstract public  voidremoveHostListener(HostListener listener)
     Remove a HostListener.
protected static  HostIdentifierresolveHostId(HostIdentifier hostId)
     Method to resolve unspecified components of the given HostIdentifier by constructing a new HostIdentifier that replaces the unspecified components with the default values.
Parameters:
  hostId - the unresolved HostIdentifier.
public  voidsetInterval(int interval)
     Set the polling interval for this MonitoredHost.
public  voidsetLastException(Exception lastException)
     Set the last exception encountered while polling this MonitoredHost.

Field Detail
hostId
protected HostIdentifier hostId(Code)
The HostIdentifier for this MonitoredHost instance.



interval
protected int interval(Code)
The polling interval, in milliseconds, for this MonitoredHost instance.



lastException
protected Exception lastException(Code)
The last Exception encountered while polling this MonitoredHost.





Method Detail
activeVms
abstract public Set<Integer> activeVms() throws MonitorException(Code)
Return the current set of active Java Virtual Machines for this MonitoredHost. The returned Set contains Integer instances holding the local virtual machine identifier, or lvmid for each instrumented Java Virtual Machine currently available. Set - the current set of active Java Virtual Machines associatedwith this MonitoredHost, or the empty set of none.
throws:
  MonitorException - Thrown if monitoring errors occur.



addHostListener
abstract public void addHostListener(HostListener listener) throws MonitorException(Code)
Add a HostListener. The given listener is added to the list of HostListener objects to be notified of MonitoredHost related events.
Parameters:
  listener - the HostListener to add.
throws:
  MonitorException - Thrown if monitoring errors occur.



clearLastException
public void clearLastException()(Code)
Clear the last exception.



detach
abstract public void detach(MonitoredVm vm) throws MonitorException(Code)
Detach from the indicated MonitoredVm.
Parameters:
  vm - the monitored Java Virtual Machine.
throws:
  MonitorException - Thrown if monitoring errors occur.



getHostIdentifier
public HostIdentifier getHostIdentifier()(Code)
Return the resolved HostIdentifier for this MonitoredHost. HostIdentifier - the resolved HostIdentifier.



getInterval
public int getInterval()(Code)
Get the polling interval. int - the polling interval in milliseconds for this MonitoredHost



getLastException
public Exception getLastException()(Code)
Get the last exception encountered while polling this MonitoredHost. Exception - the last exception occurred while polling thisMonitoredHost, or null if no exceptionhas occurred or the exception has been cleared,



getMonitoredHost
public static MonitoredHost getMonitoredHost(String hostIdString) throws MonitorException, URISyntaxException(Code)
Factory method to construct MonitoredHost instances to manage connections to the host indicated by hostIdString
Parameters:
  hostIdString - a String representation of a HostIdentifier MonitoredHost - the MonitoredHost instance for communicatingwith the indicated host using the protocolspecified in hostIdString.
throws:
  MonitorException - Thrown if monitoring errors occur.
throws:
  URISyntaxException - Thrown when the hostIdString is poorlyformed. This exception may get encapsulatedinto MonitorException in a future revision.



getMonitoredHost
public static MonitoredHost getMonitoredHost(VmIdentifier vmid) throws MonitorException(Code)
Factory method to construct a MonitoredHost instance to manage the connection to the Java Virtual Machine indicated by vmid. This method provide a convenient short cut for attaching to a specific instrumented Java Virtual Machine. The information in the VmIdentifier is used to construct a corresponding HostIdentifier, which in turn is used to create the MonitoredHost instance.
Parameters:
  vmid - The identifier for the target Java Virtual Machine. MonitoredHost - The MonitoredHost object needed to attach tothe target Java Virtual Machine.
throws:
  MonitorException - Thrown if monitoring errors occur.



getMonitoredHost
public static MonitoredHost getMonitoredHost(HostIdentifier hostId) throws MonitorException(Code)
Factory method to construct a MonitoredHost instance to manage the connection to the host indicated by hostId.
Parameters:
  hostId - the identifier for the target host. MonitoredHost - The MonitoredHost object needed to attach tothe target host.
throws:
  MonitorException - Thrown if monitoring errors occur.



getMonitoredVm
abstract public MonitoredVm getMonitoredVm(VmIdentifier id) throws MonitorException(Code)
Get the MonitoredVm for the given Java Virtual Machine. The default sampling interval is used for the MonitoredVm instance.
Parameters:
  id - the VmIdentifier specifying the target Java Virtual Machine. MonitoredVm - the MonitoredVm instance for the target JavaVirtual Machine.
throws:
  MonitorException - Thrown if monitoring errors occur.



getMonitoredVm
abstract public MonitoredVm getMonitoredVm(VmIdentifier id, int interval) throws MonitorException(Code)
Get the MonitoredVm for the given Java Virtual Machine. The sampling interval is set to the given interval.
Parameters:
  id - the VmIdentifier specifying the target Java Virtual Machine.
Parameters:
  interval - the sampling interval for the target Java Virtual Machine. MonitoredVm - the MonitoredVm instance for the target JavaVirtual Machine.
throws:
  MonitorException - Thrown if monitoring errors occur.



isErrored
public boolean isErrored()(Code)
Test if this MonitoredHost is in the errored state. If this method returns true, then the Exception returned by getLastException() indicates the Exception that caused the error condition. boolean - true if the MonitoredHost instance has experiencedan error, or false if it hasn't or if any pasterror has been cleared.



removeHostListener
abstract public void removeHostListener(HostListener listener) throws MonitorException(Code)
Remove a HostListener. The given listener is removed from the list of HostListener objects to be notified of MonitoredHost related events.
Parameters:
  listener - the HostListener to add.
throws:
  MonitorException - Thrown if monitoring errors occur.



resolveHostId
protected static HostIdentifier resolveHostId(HostIdentifier hostId) throws MonitorException(Code)
Method to resolve unspecified components of the given HostIdentifier by constructing a new HostIdentifier that replaces the unspecified components with the default values.
Parameters:
  hostId - the unresolved HostIdentifier. HostIdentifier - a resolved HostIdentifier.
throws:
  MonitorException - Thrown if monitoring errors occur.



setInterval
public void setInterval(int interval)(Code)
Set the polling interval for this MonitoredHost.
Parameters:
  interval - the polling interval, in milliseconds



setLastException
public void setLastException(Exception lastException)(Code)
Set the last exception encountered while polling this MonitoredHost.
Parameters:
  lastException - the last exception encountered;



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.