dotrado / simplejmx Goto Github PK
View Code? Open in Web Editor NEWThis project forked from j256/simplejmx
Simple JMX Java Library
Home Page: http://256.com/sources/simplejmx/
License: Other
This project forked from j256/simplejmx
Simple JMX Java Library
Home Page: http://256.com/sources/simplejmx/
License: Other
This package provides some Java classes to help with the publishing of objects using JMX. For more information, visit the home page: http://256stuff.com/sources/simplejmx/ Online documentation can be found off the home page. Here are the Javadocs: http://256stuff.com/sources/simplejmx/javadoc/simplejmx/ The git repository is: https://github.com/j256/simplejmx Maven packages are published via the central repo: http://repo1.maven.org/maven2/com/j256/simplejmx/simplejmx/ Here's a little working example program: http://256stuff.com/sources/simplejmx/docs/example-simple Enjoy, Gray Watson ----------------------------------------------------------------------------- Little Sample Program http://256stuff.com/sources/simplejmx/docs/example-simple ----------------------------------------------------------------------------- // create a new JMX server listening on a specific port JmxServer jmxServer = new JmxServer(JMX_PORT); // NOTE: you could also do: new JmxServer(ManagementFactory.getPlatformMBeanServer()); // start our server jmxServer.start(); // create the object we will be exposing with JMX RuntimeCounter counter = new RuntimeCounter(); // register our object jmxServer.register(counter); ... // shutdown our server jmxServer.stop(); ... @JmxResource(domainName = "j256") public class RuntimeCounter { private long startMillis = System.currentTimeMillis(); // we can annotate fields directly to be published, isReadible defaults to true @JmxAttributeField(description = "Show runtime in seconds", isWritable = true) private boolean showSeconds; // we can annotate getter methods @JmxAttributeMethod(description = "Run time in seconds or milliseconds") public long getRunTime() { long diffMillis = System.currentTimeMillis() - startMillis; return diffMillis / (showSeconds ? 1 : 1000); } // this is an operation that shows up in the operations tab in jconsole. @JmxOperation(description = "Reset our start time to the current millis") public String resetStartTime() { startMillis = System.currentTimeMillis(); return "Timer has been reset to current millis"; } }
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.