---
name: "FusionInventory::Agent::Task"
section: "3pm"
platform: "linux"
package: "fusioninventory-agent"
version: "2.2.3-8"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/FusionInventory::Agent::Task"
---

# FusionInventory::Agent::Task(3pm)

Base class for agent task

## NAME

FusionInventory::Agent::Task - Base class for agent task

## DESCRIPTION

This is an abstract class for all task performed by the agent.

## METHODS

### new(%params)

The constructor. The following parameters are allowed, as keys of the `%params` hash:

- *logger*

  the logger object to use (default: a new stderr logger)

- *config*

  - *target*

  - *storage*

  - *prologresp*

  - *client*

  - *deviceid*

  ### *isEnabled()*

This is a method to be implemented by each subclass.

### *run()*

This is a method to be implemented by each subclass.

### getOptionsFromServer($response, $name, $feature)

Get task-specific options in server response to prolog message.

### getModules($prefix)

Return a list of modules for this task. All modules installed at the same location than this package, belonging to \_\_PACKAGE\_\_ namespace, will be returned. If optional `$prefix` is given, base search namespace will be \_\_PACKAGE\_\_/$prefix instead.
