JMX::Jmx4Perl::Agent::Jolokia::Meta - Fetches, caches and parses Meta data from
www.jolokia.org
This class is responsible for fetching meta data about available agents from
Jolokia. It knows how to parse those meta data and caches it for subsequent
usage in the local file system.
- $meta = JMX::Jmx4Perl::Agent::Jolokia::Meta->new(....)
- Create a new meta object which handles downloading of Jolokia meta
information and caching this data.
- $meta->load($force)
- Load the meta data from the server or retrieve it from the cache. The data
is taken from the cache, if it is no older than
$self->{cache_interval} seconds. If
$force is given and true, the data is always
fetched fresh from the server.
This method return $self so that it
can be used for chaining. Any error or progress infos are given through
to the "log_handler" provided during
construction time. This method will return
"undef" if the data can't be
loaded.
- $meta->initialized()
- Returns "true" if the meta data has been
initialized, either by loading it or by using a cached data. If false the
data can be loaded via load
- $value = $meta->get($key)
- Get a value from the meta data.
- $jolokia_version =
$meta->latest_matching_version($jmx4perl_version)
- Get the latest matching Jolokia version for a given Jmx4Perl version
- $meta->versions_compatible($jmx4perl_version,$jolokia_version)
- Check, whether the Jolokia and Jmx4Perl versions are compaptible, i.e.
whether Jmx4Perl with the given version can interoperate with the given
Jolokia version
- $type = $meta->extract_type($artifact_name)
- Extract the type for a given artifactId
- $meta->template_url($template_name,$version)
- Download a template with the given name. The download URL is looked up in
the meta data. If a version is given, the template for this specific
version is returned (if present, if not the default template is returned).
If no version is given, the default template is returned. The downloaded
template is verified as any other downloaded artifact.
The template is returned as a string.
This file is part of jmx4perl. Jmx4perl is free software: you can redistribute
it and/or modify it under the terms of the GNU General Public License as
published by The Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
jmx4perl is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.
You should have received a copy of the GNU General Public License
along with jmx4perl. If not, see <http://www.gnu.org/licenses/>.
A commercial license is available as well. Please contact
roland@cpan.org for further details.