Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Contact Us
Online Help
Domain Status
Man Pages

Virtual Servers

Topology Map

Server Agreement
Year 2038

USA Flag



Man Pages


.ds Aq ’


JMX::Jmx4Perl::Agent::ArtifactHandler - Handler for extracting and manipulating Jolokia artifacts



This module is responsible for mangaging a singe JAR or WAR Archive. It requires Archive::Zip for proper operation.

I.e. this module can
o Extract jolokia-access.xml and web.xml from WAR/JAR archives
o Check for the esistance of jolokia-access.xml
o Update web.xml for WAR files


$handler = JMX::Jmx4Perl::Agent::Jolokia::ArtifactHandler->new(...) Create a new handler with the following options:

  file => $file      : Path to archive to handle
  logger => $logger  : Logger to use
  meta => $meta      : Jolokia-Meta handler to extract the type of an archive

$info = $handler->info() Extract information about an archive. Return value is a has with the following keys:

  "version"      Agents version
  "type"         Agent type (war, osgi, osgi-bundle, mule, jdk6)
  "artifactId"   Maven artifact id
  "groupId"      Maven group Id

$handler->add_policy($policy) Add or update the policy given as string to this archive. Dependening on whether it is a WAR or another agent, it is put into the proper place

For war agents, this is WEB-INF/classes/jolokia-access.xml, for all others it is /jolokia-access.xml

$handler->remove_policy() Remove a policy file (no-op, when no policy is present)
$handler->has_policy() Returns true (i.e. the path to the policy file) if a policy file is contained, undef otherwise.
$handler->get_policy() Get the policy file as string or undef if no policy is contained.
$handler->extract_webxml() Extract web.xml from WAR agents, for other types, a fatal error is raised. Return value is a string containing the web.xml.
$handler->update_webxml($webxml) Update web.xml in WAR agents, for other types, a fatal error is raised. Return value is a string containing the web.xml. $webxml is the descriptor as a string.
$handler->type() Return the agent’s type, which is one of war, osgi, osgi-bundle, mule or jdk6


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 <>.

A commercial license is available as well. Please contact for further details.

Search for    or go to Top of page |  Section 3 |  Main Index

perl v5.20.3 JMX::JMX4PERL::AGENT::JOLOKIA::ARTIFACTHANDLER (3) 2016-04-03

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.